| | |
| | | |
| | | </select> |
| | | |
| | | <!-- |
| | | 异常问题处理情况查询(tracedeallist)的「有效填写数」: |
| | | 原来对每个 scriptid 都执行一次 selectServiceSubtaskDetailList(查回全部列再去 size), |
| | | 一个问题一次、而且整个接口会被调用两遍,几十上百个问题就是上百次大表扫描; |
| | | 这里合并成一条 group by。 |
| | | 注意:为与原口径完全一致,这里不加 del_flag 条件(原 selectServiceSubtaskDetailList |
| | | 虽然 Java 里 setDelFlag("0"),但 SQL 里并没有 del_flag 过滤)。 |
| | | --> |
| | | <select id="countDetailByScriptIds" resultType="java.util.Map"> |
| | | select scriptid as scriptid, count(*) as cnt |
| | | from service_subtask_detail |
| | | where scriptid in |
| | | <foreach collection="scriptIds" item="scriptId" open="(" separator="," close=")"> |
| | | #{scriptId} |
| | | </foreach> |
| | | group by scriptid |
| | | </select> |
| | | |
| | | <select id="getServiceSubtaskDetails" parameterType="com.smartor.domain.ServiceSubtaskDetailVO" |
| | | resultType="java.util.HashMap"> |
| | | select |
| | |
| | | #{scriptId} |
| | | </foreach> |
| | | </if> |
| | | <if test="isFilled != null and isFilled != '0'"> |
| | | AND IFNULL(ssd.matchedtext,ssd.asrtext) is not null |
| | | AND IFNULL(ssd.matchedtext,ssd.asrtext) != '' |
| | | </if> |
| | | <if test="configValue != null and configValue != ''"> |
| | | AND ssd.categoryid IN (${configValue}) |
| | | </if> |
| | | order by ssd.sub_id desc, ssd.id desc |
| | | </select> |
| | | <select id="selectServiceSubtaskDetailByCalldetailid" parameterType="String" resultMap="ServiceSubtaskDetailResult"> |
| | |
| | | <if test="questiontext != null">and questiontext = #{questiontext}</if> |
| | | </select> |
| | | |
| | | <select id="isExistServiceSubtaskDetail" resultType="com.smartor.domain.DTO.ServiceSubtaskDetailDTO"> |
| | | <select id="isExistServiceSubtaskDetail" resultType="com.smartor.domain.DTO.ServiceSubtaskDetailDTO"> |
| | | select id, questiontext, matchedtext, score |
| | | from service_subtask_detail |
| | | where del_flag = 0 |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | |
| | | <update id="updateSSDByCondition" parameterType="com.smartor.domain.ServiceSubtaskDetail"> |
| | | update service_subtask_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | |
| | | ivr_liba_target.targetname, |
| | | service_subtask_detail.matchedtext |
| | | </select> |
| | | </mapper> |
| | | |
| | | </mapper> |