liusheng
2026-10-10 87b79ea739ec32bd7d0e493a6ea8525212f6c763
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package com.smartor.mapper;
 
import com.smartor.domain.SvyLibTemplateTargetoption;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
import java.util.Map;
 
/**
 * 问卷问题指标选项库Mapper接口
 *
 * @author ruoyi
 * @date 2024-06-18
 */
@Mapper
public interface SvyLibTemplateTargetoptionMapper {
    /**
     * 查询问卷问题指标选项库
     *
     * @param id 问卷问题指标选项库主键
     * @return 问卷问题指标选项库
     */
    public SvyLibTemplateTargetoption selectSvyLibTemplateTargetoptionById(Long id);
 
    /**
     * 查询问卷问题指标选项库列表
     *
     * @param svyLibTemplateTargetoption 问卷问题指标选项库
     * @return 问卷问题指标选项库集合
     */
    public List<SvyLibTemplateTargetoption> selectSvyLibTemplateTargetoptionList(SvyLibTemplateTargetoption svyLibTemplateTargetoption);
 
    /**
     * 满意度统计:一次取回多个问题的选项分值(只取 scriptid、score 两列)
     * <p>
     * 原实现是每个问题查一次整行,而调用方只用到 score 算最高/最低分。
     * scriptIds 传空时表示不加 scriptid 过滤(等价于原查询在 scriptid 为 null 时不拼该条件)。
     *
     * @param scriptIds 问题id集合(对应 svy_lib_template_script.id),可为空
     * @return 每行含 scriptid、score
     */
    public List<Map<String, Object>> selectSvyLibTargetoptionScores(@Param("scriptIds") List<Long> scriptIds);
 
    /**
     * 新增问卷问题指标选项库
     *
     * @param svyLibTemplateTargetoption 问卷问题指标选项库
     * @return 结果
     */
    public int insertSvyLibTemplateTargetoption(SvyLibTemplateTargetoption svyLibTemplateTargetoption);
 
    /**
     * 修改问卷问题指标选项库
     *
     * @param svyLibTemplateTargetoption 问卷问题指标选项库
     * @return 结果
     */
    public int updateSvyLibTemplateTargetoption(SvyLibTemplateTargetoption svyLibTemplateTargetoption);
 
    /**
     * 删除问卷问题指标选项库
     *
     * @param id 问卷问题指标选项库主键
     * @return 结果
     */
    public int deleteSvyLibTemplateTargetoptionById(Long id);
 
    /**
     * 批量删除问卷问题指标选项库
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSvyLibTemplateTargetoptionByIds(Long[] ids);
 
    /**
     * 根据话术ID列表和机构ID批量查询选项
     *
     * @param scriptIds 话术ID列表
     * @param orgid     机构ID
     * @return 选项集合
     */
    public List<SvyLibTemplateTargetoption> selectByScriptIds(@Param("scriptIds") List<Long> scriptIds, @Param("orgid") String orgid);
}