| | |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="longTemp" column="long_temp"/> |
| | | <result property="sendDay" column="send_day"/> |
| | | <result property="scoreType" column="score_type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyTaskTemplateVo"> |
| | | select id, |
| | | templateid, |
| | | prologue, |
| | | score_type, |
| | | dept_code, |
| | | long_temp, |
| | | send_day, |
| | |
| | | <where> |
| | | del_flag=0 |
| | | <if test="templateid != null ">and templateid = #{templateid}</if> |
| | | <if test="scoreType != null ">and score_type = #{scoreType}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="svycode != null and svycode != ''">and svycode = #{svycode}</if> |
| | | <if test="svyname != null and svyname != ''">and svyname like concat('%', #{svyname}, '%')</if> |
| | |
| | | |
| | | <select id="selectSvyTaskTemplateBySvyid" parameterType="Long" resultMap="SvyTaskTemplateResult"> |
| | | <include refid="selectSvyTaskTemplateVo"/> |
| | | where del_flag=0 and id = #{id} |
| | | where del_flag=0 and id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertSvyTaskTemplate" parameterType="com.smartor.domain.SvyTaskTemplate" useGeneratedKeys="true" |
| | |
| | | <if test="deptCode != null ">dept_code,</if> |
| | | <if test="longTemp != null ">long_temp,</if> |
| | | <if test="sendDay != null ">send_day,</if> |
| | | <if test="scoreType != null ">score_type,</if> |
| | | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="templateid != null">#{templateid},</if> |
| | |
| | | <if test="deptCode != null ">#{deptCode},</if> |
| | | <if test="longTemp != null ">#{longTemp},</if> |
| | | <if test="sendDay != null ">#{sendDay},</if> |
| | | <if test="scoreType != null ">#{scoreType},</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="deptCode != null ">dept_code = #{deptCode},</if> |
| | | <if test="longTemp != null ">long_temp = #{longTemp},</if> |
| | | <if test="sendDay != null ">send_day = #{sendDay},</if> |
| | | <if test="scoreType != null ">,score_type = #{scoreType},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |