package com.ruoyi.satisfaction.mapper; import com.ruoyi.satisfaction.domain.row.SatisfactionCategoryRow; import com.ruoyi.satisfaction.domain.row.SatisfactionIvrScriptRow; import com.ruoyi.satisfaction.domain.row.SatisfactionOptionScoreRow; import com.ruoyi.satisfaction.domain.row.SatisfactionScriptQuery; import com.ruoyi.satisfaction.domain.row.SatisfactionSvyScriptRow; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; /** * 满意度统计取「满意度分类 / 模板问题 / 选项分值」的只读 Mapper。 *
* 为什么不复用 smartor 的模板/分类 Mapper: *
* ⚠️ 本 Mapper 全部是只读查询,不会对 {@code ivr_liba_*} / {@code svy_lib_*} 做任何写操作。 *
* 对应 XML:{@code mapper/satisfaction/SatisfactionScriptMapper.xml} */ @Mapper public interface SatisfactionScriptMapper { // ================================================================ 满意度分类 /** * 查询指定机构下的满意度分类(语音侧)。 *
* 原实现:{@code IvrLibaScriptAssortMapper.selectIvrLibaScriptAssortList} *
* select id, index_assort_name, type from ivr_liba_script_assort
* where del_flag = 0 and orgid = ? and type like '%myd%' order by seqno asc
*
* 调用方再按 {@code type.contains("myd")} 过滤出满意度分类 id。
*
* @param query orgid 与 type(type 传 "myd")
* @return 每行含 id、index_assort_name、type
*/
List* 原实现:{@code SvyLibScriptCategoryMapper.selectSvyLibScriptCategoryList} * (注意:该 statement 定义在 {@code SvyLibTopicCategoryMapper.xml} 里,namespace 与文件名不一致) *
* select id, name, type from svy_lib_script_category
* where del_flag = 0 and orgid = ? and type like '%myd%' order by seqno asc
*
*
* @param query orgid 与 type(type 传 "myd")
* @return 每行含 id、name、type
*/
List* 原实现:{@code IvrLibaTemplateScriptMapper.queryLibTemplateIds} *
* select templateid, scriptid, script_content, script_assortname, dimension
* from ivr_liba_template_script
* where del_flag = 0 [and script_assortid in (...)]
*
* 口径注意:{@code scriptAssortids} 为空时不再拼该条件(原实现是
* {@code if test="scriptAssortids != null and scriptAssortids.size > 0"})。
*/
List* 原实现:{@code SvyLibTemplateScriptMapper.querySvyLibTemplateIds} *
* select id, svyid, script_content, categoryName, dimension
* from svy_lib_template_script
* where del_flag = 0 [and categoryid in (...)]
*
* 口径注意:原实现取选项分值时用的是 {@code id}(主键),
* 而聚合统计的模板 id 用的是 {@code svyid}——两者都保留在结果行里。
*/
List* 原实现:{@code IvrLibaTemplateScriptMapper.selectILTSBydimension} *
* ... where del_flag = 0
* [and dimension in (...)]
* [dimension IS NOT NULL] ← dimensionList 为空时拼这个
*
* 口径注意:{@code dimensionList} 为空时,语音侧会拼
* {@code dimension IS NOT NULL}(问卷侧不会)——这是原实现的行为,必须保留。
* 同时原实现还支持 duty/report 相关过滤,满意度调用时不传,故不再暴露。
*/
List* 原实现:{@code SvyLibTemplateScriptMapper.selectSLTScriptListBydimension} *
* ... where del_flag = 0 [and dimension in (...)]
*
* 口径注意:与语音侧不同,{@code dimensionList} 为空时不拼
* {@code dimension IS NOT NULL}(等于取该表全部 del_flag=0 的问题)。
* 另外此处聚合统计用的模板 id 与取选项分值用的关联 id 都是 {@code svyid}。
*/
List* 原实现:{@code IvrLibaTemplateTargetoptionMapper.selectIvrLibaTargetoptionScores} *
* 口径注意:{@code scriptIds} 为 null 时原实现不拼 scriptid 条件
* (等于取该表全部分值),调用方用 null 作 key 存这一份。
*/
List
* 原实现:{@code SvyLibTemplateTargetoptionMapper.selectSvyLibTargetoptionScores}
*/
List