| | |
| | | <result property="targetoptions" column="targetoptions"/> |
| | | <result property="prompt" column="prompt"/> |
| | | <result property="groupName" column="group_name"/> |
| | | <result property="dutyDeptName" column="duty_dept_name"/> |
| | | <result property="dutyDeptCode" column="duty_dept_code"/> |
| | | <result property="reportDeptCode" column="report_dept_name"/> |
| | | <result property="reportDeptName" column="report_dept_code"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibTemplateScriptVo"> |
| | | select id, |
| | | script_type, |
| | | duty_dept_name, |
| | | duty_dept_code, |
| | | report_dept_name, |
| | | report_dept_code, |
| | | targetid, |
| | | group_name, |
| | | targetname, |
| | |
| | | pid, |
| | | guid, |
| | | categoryid, |
| | | categoryName, |
| | | script_content, |
| | | suitway, |
| | | script_picture, |
| | |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="prompt != null and prompt != ''">and prompt = #{prompt}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="categoryName != null ">and categoryName = #{categoryName}</if> |
| | | <if test="scriptContent != null and scriptContent != ''">and script_content = #{scriptContent}</if> |
| | | <if test="suitway != null and suitway != ''">and suitway = #{suitway}</if> |
| | | <if test="isavailable != null and isavailable != ''">and isavailable = #{isavailable}</if> |
| | |
| | | <if test="targetoptions != null and targetoptions != ''">and targetoptions = #{targetoptions}</if> |
| | | <if test="score != null">and score = #{score}</if> |
| | | <if test="groupName != null">and group_name = #{groupName}</if> |
| | | <if test="dutyDeptName != null and dutyDeptName != ''">and duty_dept_name like concat('%', #{dutyDeptName}, |
| | | '%') |
| | | </if> |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">and duty_dept_code like concat('%', #{dutyDeptCode}, |
| | | '%') |
| | | </if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">and report_dept_name like concat('%', |
| | | #{reportDeptName}, |
| | | '%') |
| | | </if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">and report_dept_code like concat('%', |
| | | #{reportDeptCode}, |
| | | '%') |
| | | </if> |
| | | <if test="categoryids != null"> |
| | | and categoryid in |
| | | <foreach collection="categoryids" item="categoryid" open="(" separator="," |
| | | close=")"> |
| | | #{categoryid} |
| | | </foreach> |
| | | </if> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateScriptByTopicid" parameterType="Long" resultMap="SvyLibTemplateScriptResult"> |
| | |
| | | <if test="targetoptions != null and targetoptions != ''">targetoptions,</if> |
| | | <if test="prompt != null and prompt != ''">prompt,</if> |
| | | <if test="groupName != null and groupName != ''">group_name,</if> |
| | | <if test="dutyDeptName != null and dutyDeptName != ''">duty_dept_name,</if> |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">duty_dept_code,</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name,</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">report_dept_code,</if> |
| | | <if test="categoryName != null and categoryName != ''">categoryName,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="nextScriptno != null">#{nextScriptno},</if> |
| | |
| | | <if test="targetoptions != null and targetoptions != ''">#{targetoptions},</if> |
| | | <if test="prompt != null and prompt != ''">#{prompt},</if> |
| | | <if test="groupName != null and groupName != ''">#{groupName},</if> |
| | | <if test="dutyDeptName != null and dutyDeptName != ''">#{dutyDeptName},</if> |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">#{dutyDeptCode},</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">#{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">#{reportDeptCode},</if> |
| | | <if test="categoryName != null and categoryName != ''">#{categoryName},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="targetoptions != null and targetoptions != ''">targetoptions = #{targetoptions},</if> |
| | | <if test="prompt != null and prompt != ''">prompt = #{prompt},</if> |
| | | <if test="groupName != null and groupName != ''">group_name = #{groupName},</if> |
| | | <if test="dutyDeptName != null and dutyDeptName != ''">duty_dept_name = #{dutyDeptName},</if> |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">duty_dept_code = #{dutyDeptCode},</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name = #{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">report_dept_code = #{reportDeptCode},</if> |
| | | <if test="categoryName != null and categoryName != ''">categoryName = #{categoryName},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="querySvyLibTemplateIds" resultMap="SvyLibTemplateScriptResult"> |
| | | <include refid="selectSvyLibTemplateScriptVo"/> |
| | | where del_flag=0 |
| | | <if test="scriptCategoryids != null and scriptCategoryids.size > 0"> |
| | | and categoryid in |
| | | <foreach item="scriptCategoryid" collection="scriptCategoryids" open="(" separator="," close=")"> |
| | | #{scriptCategoryid} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |