| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <!-- |
| | | 满意度统计:一次取回多个问题的选项分值(只取 scriptid、score)。 |
| | | 等价于逐个问题执行 selectSvyLibTemplateTargetoptionList(scriptid),但只取用得到的列; |
| | | scriptIds 为空时不加 scriptid 过滤(对应原查询 scriptid 为 null 时丢弃该条件的行为)。 |
| | | --> |
| | | <select id="selectSvyLibTargetoptionScores" resultType="java.util.Map"> |
| | | select scriptid as scriptid, score as score |
| | | from svy_lib_template_targetoption |
| | | where del_flag = 0 |
| | | <if test="scriptIds != null and scriptIds.size() > 0"> |
| | | and scriptid IN |
| | | <foreach collection="scriptIds" item="scriptId" open="(" separator="," close=")"> |
| | | #{scriptId} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | <insert id="insertSvyLibTemplateTargetoption" parameterType="com.smartor.domain.SvyLibTemplateTargetoption" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into svy_lib_template_targetoption |