|
@@ -0,0 +1,373 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.caimei.modules.landing.mapper.CmQuestionnaireMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.caimei.modules.landing.domain.CmQuestionnaire" id="CmQuestionnaireResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="userId" column="userId" />
|
|
|
+ <result property="userName" column="userName" />
|
|
|
+ <result property="corporateName" column="corporateName" />
|
|
|
+ <result property="mobile" column="mobile" />
|
|
|
+ <result property="level" column="level" />
|
|
|
+ <result property="content" column="content" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="delFlag" column="delFlag" />
|
|
|
+ <result property="updateTime" column="updateTime" />
|
|
|
+ <result property="createTime" column="createTime" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectCmQuestionnaireVo">
|
|
|
+ select
|
|
|
+ cm_questionnaire.id,
|
|
|
+ cm_questionnaire.type,
|
|
|
+ cm_questionnaire.userId,
|
|
|
+ cm_questionnaire.userName,
|
|
|
+ cm_questionnaire.corporateName,
|
|
|
+ cm_questionnaire.mobile,
|
|
|
+ cm_questionnaire.level,
|
|
|
+ cm_questionnaire.content,
|
|
|
+ cm_questionnaire.status,
|
|
|
+ cm_questionnaire.delFlag,
|
|
|
+ cm_questionnaire.updateTime,
|
|
|
+ cm_questionnaire.createTime,
|
|
|
+ cm_questionnaire.remark
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="getByCmQuestionnaire" parameterType="com.caimei.modules.landing.domain.CmQuestionnaire" resultMap="CmQuestionnaireResult">
|
|
|
+ <include refid="selectCmQuestionnaireVo"/>
|
|
|
+ from cm_questionnaire AS cm_questionnaire
|
|
|
+ <where> cm_questionnaire.delFlag = 0
|
|
|
+ <if test="id != null and id != ''">
|
|
|
+ and cm_questionnaire.id
|
|
|
+ <if test="id.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="id.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="idIn" collection="id.substring(id.toUpperCase().indexOf('=')+1,id.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{idIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != ''"> and cm_questionnaire.type = #{type}</if>
|
|
|
+ <if test="userId != null "> and cm_questionnaire.userId = #{userId}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and cm_questionnaire.userName like concat('%', #{userName}, '%')</if>
|
|
|
+ <if test="corporateName != null and corporateName != ''"> and cm_questionnaire.corporateName like concat('%', #{corporateName}, '%')</if>
|
|
|
+ <if test="mobile != null and mobile != ''"> and cm_questionnaire.mobile = #{mobile}</if>
|
|
|
+ <if test="level != null "> and cm_questionnaire.level = #{level}</if>
|
|
|
+ <if test="content != null and content != ''"> and cm_questionnaire.content = #{content}</if>
|
|
|
+ <if test="status != null "> and cm_questionnaire.status = #{status}</if>
|
|
|
+ <if test="delFlag != null "> and cm_questionnaire.delFlag = #{delFlag}</if>
|
|
|
+ <if test="updateTime != null "> and cm_questionnaire.updateTime = #{updateTime}</if>
|
|
|
+ <if test="createTime != null "> and cm_questionnaire.createTime = #{createTime}</if>
|
|
|
+ </where>
|
|
|
+ group by cm_questionnaire.id
|
|
|
+ order by cm_questionnaire.createTime desc
|
|
|
+ limit 0,1
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCmQuestionnaireList" parameterType="com.caimei.modules.landing.domain.CmQuestionnaire" resultMap="CmQuestionnaireResult">
|
|
|
+ <include refid="selectCmQuestionnaireVo"/>
|
|
|
+ from cm_questionnaire AS cm_questionnaire
|
|
|
+ <where> cm_questionnaire.delFlag = 0
|
|
|
+ <if test="id != null and id != ''">
|
|
|
+ and cm_questionnaire.id
|
|
|
+ <if test="id.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="id.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="idIn" collection="id.substring(id.toUpperCase().indexOf('=')+1,id.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{idIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ and cm_questionnaire.type
|
|
|
+ <if test="type.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="type.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="typeIn" collection="type.substring(type.toUpperCase().indexOf('=')+1,type.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{typeIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="userId != null "> and cm_questionnaire.userId = #{userId}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and cm_questionnaire.userName like concat('%', #{userName}, '%')</if>
|
|
|
+ <if test="corporateName != null and corporateName != ''"> and cm_questionnaire.corporateName like concat('%', #{corporateName}, '%')</if>
|
|
|
+ <if test="mobile != null and mobile != ''"> and cm_questionnaire.mobile = #{mobile}</if>
|
|
|
+ <if test="level != null "> and cm_questionnaire.level = #{level}</if>
|
|
|
+ <if test="content != null and content != ''"> and cm_questionnaire.content = #{content}</if>
|
|
|
+ <if test="status != null "> and cm_questionnaire.status = #{status}</if>
|
|
|
+ <if test="delFlag != null "> and cm_questionnaire.delFlag = #{delFlag}</if>
|
|
|
+ <if test="updateTime != null "> and cm_questionnaire.updateTime = #{updateTime}</if>
|
|
|
+ <if test="createTime != null "> and cm_questionnaire.createTime = #{createTime}</if>
|
|
|
+ </where>
|
|
|
+ group by cm_questionnaire.id
|
|
|
+ order by cm_questionnaire.createTime desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findList" parameterType="com.caimei.modules.landing.domain.CmQuestionnaire" resultMap="CmQuestionnaireResult">
|
|
|
+ <include refid="selectCmQuestionnaireVo"/>
|
|
|
+ from cm_questionnaire AS cm_questionnaire
|
|
|
+ <where> cm_questionnaire.delFlag = 0
|
|
|
+ <if test="id != null and id != ''">
|
|
|
+ and cm_questionnaire.id
|
|
|
+ <if test="id.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="id.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="idIn" collection="id.substring(id.toUpperCase().indexOf('=')+1,id.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{idIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ and cm_questionnaire.type
|
|
|
+ <if test="type.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="type.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="typeIn" collection="type.substring(type.toUpperCase().indexOf('=')+1,type.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{typeIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="userId != null "> and cm_questionnaire.userId = #{userId}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and cm_questionnaire.userName like concat('%', #{userName}, '%')</if>
|
|
|
+ <if test="corporateName != null and corporateName != ''"> and cm_questionnaire.corporateName like concat('%', #{corporateName}, '%')</if>
|
|
|
+ <if test="mobile != null and mobile != ''"> and cm_questionnaire.mobile = #{mobile}</if>
|
|
|
+ <if test="level != null "> and cm_questionnaire.level = #{level}</if>
|
|
|
+ <if test="content != null and content != ''"> and cm_questionnaire.content = #{content}</if>
|
|
|
+ <if test="status != null "> and cm_questionnaire.status = #{status}</if>
|
|
|
+ <if test="delFlag != null "> and cm_questionnaire.delFlag = #{delFlag}</if>
|
|
|
+ <if test="updateTime != null "> and cm_questionnaire.updateTime = #{updateTime}</if>
|
|
|
+ <if test="createTime != null "> and cm_questionnaire.createTime = #{createTime}</if>
|
|
|
+ </where>
|
|
|
+ group by cm_questionnaire.id
|
|
|
+ order by cm_questionnaire.createTime desc
|
|
|
+ </select>
|
|
|
+ <select id="getCmQuestionnaireCount" parameterType="com.caimei.modules.landing.domain.CmQuestionnaire" resultType="int">
|
|
|
+ select count(1)
|
|
|
+ from cm_questionnaire AS cm_questionnaire
|
|
|
+ <where> cm_questionnaire.delFlag = 0
|
|
|
+ <if test="id != null and id != ''">
|
|
|
+ and cm_questionnaire.id
|
|
|
+ <if test="id.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="id.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="idIn" collection="id.substring(id.toUpperCase().indexOf('=')+1,id.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{idIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ and cm_questionnaire.type
|
|
|
+ <if test="type.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="type.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="typeIn" collection="type.substring(type.toUpperCase().indexOf('=')+1,type.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{typeIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="userId != null "> and cm_questionnaire.userId = #{userId}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and cm_questionnaire.userName like concat('%', #{userName}, '%')</if>
|
|
|
+ <if test="corporateName != null and corporateName != ''"> and cm_questionnaire.corporateName like concat('%', #{corporateName}, '%')</if>
|
|
|
+ <if test="mobile != null and mobile != ''"> and cm_questionnaire.mobile = #{mobile}</if>
|
|
|
+ <if test="level != null "> and cm_questionnaire.level = #{level}</if>
|
|
|
+ <if test="content != null and content != ''"> and cm_questionnaire.content = #{content}</if>
|
|
|
+ <if test="status != null "> and cm_questionnaire.status = #{status}</if>
|
|
|
+ <if test="delFlag != null "> and cm_questionnaire.delFlag = #{delFlag}</if>
|
|
|
+ <if test="updateTime != null "> and cm_questionnaire.updateTime = #{updateTime}</if>
|
|
|
+ <if test="createTime != null "> and cm_questionnaire.createTime = #{createTime}</if>
|
|
|
+ </where>
|
|
|
+ group by cm_questionnaire.id
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCmQuestionnaireById" parameterType="String" resultMap="CmQuestionnaireResult">
|
|
|
+ <include refid="selectCmQuestionnaireVo"/>
|
|
|
+ from cm_questionnaire AS cm_questionnaire
|
|
|
+ where cm_questionnaire.delFlag = 0 and cm_questionnaire.id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getByIds" parameterType="com.caimei.modules.landing.domain.CmQuestionnaire" resultMap="CmQuestionnaireResult">
|
|
|
+ select id
|
|
|
+ from cm_questionnaire AS cm_questionnaire
|
|
|
+ <where> cm_questionnaire.delFlag = 0
|
|
|
+ <if test="id != null and id != ''">
|
|
|
+ and cm_questionnaire.id
|
|
|
+ <if test="id.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="id.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="idIn" collection="id.substring(id.toUpperCase().indexOf('=')+1,id.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{idIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ and cm_questionnaire.type
|
|
|
+ <if test="type.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="type.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="typeIn" collection="type.substring(type.toUpperCase().indexOf('=')+1,type.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{typeIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="userId != null "> and cm_questionnaire.userId = #{userId}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and cm_questionnaire.userName like concat('%', #{userName}, '%')</if>
|
|
|
+ <if test="corporateName != null and corporateName != ''"> and cm_questionnaire.corporateName like concat('%', #{corporateName}, '%')</if>
|
|
|
+ <if test="mobile != null and mobile != ''"> and cm_questionnaire.mobile = #{mobile}</if>
|
|
|
+ <if test="level != null "> and cm_questionnaire.level = #{level}</if>
|
|
|
+ <if test="content != null and content != ''"> and cm_questionnaire.content = #{content}</if>
|
|
|
+ <if test="status != null "> and cm_questionnaire.status = #{status}</if>
|
|
|
+ <if test="delFlag != null "> and cm_questionnaire.delFlag = #{delFlag}</if>
|
|
|
+ <if test="updateTime != null "> and cm_questionnaire.updateTime = #{updateTime}</if>
|
|
|
+ <if test="createTime != null "> and cm_questionnaire.createTime = #{createTime}</if>
|
|
|
+ </where>
|
|
|
+ group by cm_questionnaire.id
|
|
|
+ </select>
|
|
|
+ <select id="getById" parameterType="com.caimei.modules.landing.domain.CmQuestionnaire" resultMap="CmQuestionnaireResult">
|
|
|
+ select id
|
|
|
+ from cm_questionnaire AS cm_questionnaire
|
|
|
+ <where> cm_questionnaire.delFlag = 0
|
|
|
+ <if test="id != null and id != ''">
|
|
|
+ and cm_questionnaire.id
|
|
|
+ <if test="id.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="id.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="id.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="idIn" collection="id.substring(id.toUpperCase().indexOf('=')+1,id.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{idIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ and cm_questionnaire.type
|
|
|
+ <if test="type.toUpperCase().indexOf('=')==-1">
|
|
|
+ = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('=')!=-1">
|
|
|
+ <if test="type.toUpperCase().indexOf('NOT')!=-1"> not </if>
|
|
|
+ <if test="type.toUpperCase().indexOf('IN')!=-1"> in </if>
|
|
|
+ <foreach item="typeIn" collection="type.substring(type.toUpperCase().indexOf('=')+1,type.length()).trim().split(',')" open="(" separator="," close=")">
|
|
|
+ #{typeIn}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="userId != null "> and cm_questionnaire.userId = #{userId}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and cm_questionnaire.userName like concat('%', #{userName}, '%')</if>
|
|
|
+ <if test="corporateName != null and corporateName != ''"> and cm_questionnaire.corporateName like concat('%', #{corporateName}, '%')</if>
|
|
|
+ <if test="mobile != null and mobile != ''"> and cm_questionnaire.mobile = #{mobile}</if>
|
|
|
+ <if test="level != null "> and cm_questionnaire.level = #{level}</if>
|
|
|
+ <if test="content != null and content != ''"> and cm_questionnaire.content = #{content}</if>
|
|
|
+ <if test="status != null "> and cm_questionnaire.status = #{status}</if>
|
|
|
+ <if test="delFlag != null "> and cm_questionnaire.delFlag = #{delFlag}</if>
|
|
|
+ <if test="updateTime != null "> and cm_questionnaire.updateTime = #{updateTime}</if>
|
|
|
+ <if test="createTime != null "> and cm_questionnaire.createTime = #{createTime}</if>
|
|
|
+ </where>
|
|
|
+ group by cm_questionnaire.id
|
|
|
+ limit 0,1
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="addCmQuestionnaire" parameterType="com.caimei.modules.landing.domain.CmQuestionnaire" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into cm_questionnaire
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null andid != ''">id,</if>
|
|
|
+ <if test="type != null and type != ''">type,</if>
|
|
|
+ <if test="userId != null">userId,</if>
|
|
|
+ <if test="userName != null and userName != ''">userName,</if>
|
|
|
+ <if test="corporateName != null and corporateName != ''">corporateName,</if>
|
|
|
+ <if test="mobile != null and mobile != ''">mobile,</if>
|
|
|
+ <if test="level != null">level,</if>
|
|
|
+ <if test="content != null and content != ''">content,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="delFlag != null">delFlag,</if>
|
|
|
+ <if test="updateTime != null">updateTime,</if>
|
|
|
+ <if test="createTime != null">createTime,</if>
|
|
|
+ <if test="remark != null and remark != ''">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null andid != ''">#{id},</if>
|
|
|
+ <if test="type != null and type != ''">#{type},</if>
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="userName != null and userName != ''">#{userName},</if>
|
|
|
+ <if test="corporateName != null and corporateName != ''">#{corporateName},</if>
|
|
|
+ <if test="mobile != null and mobile != ''">#{mobile},</if>
|
|
|
+ <if test="level != null">#{level},</if>
|
|
|
+ <if test="content != null and content != ''">#{content},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="remark != null and remark != ''">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateCmQuestionnaire" parameterType="com.caimei.modules.landing.domain.CmQuestionnaire">
|
|
|
+ update cm_questionnaire
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="type != null and type != ''">type = #{type},</if>
|
|
|
+ <if test="userId != null">userId = #{userId},</if>
|
|
|
+ <if test="userName != null and userName != ''">userName = #{userName},</if>
|
|
|
+ <if test="corporateName != null and corporateName != ''">corporateName = #{corporateName},</if>
|
|
|
+ <if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
|
|
|
+ <if test="level != null">level = #{level},</if>
|
|
|
+ <if test="content != null and content != ''">content = #{content},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="delFlag != null">delFlag = #{delFlag},</if>
|
|
|
+ <if test="updateTime != null">updateTime = #{updateTime},</if>
|
|
|
+ <if test="createTime != null">createTime = #{createTime},</if>
|
|
|
+ <if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updateDelCmQuestionnaireByIds" parameterType="String">
|
|
|
+ update cm_questionnaire set delFlag=#{delFlag} where id in
|
|
|
+ <foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="delCmQuestionnaireById" parameterType="String">
|
|
|
+ delete
|
|
|
+ from cm_questionnaire where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="delCmQuestionnaireByIds" parameterType="String">
|
|
|
+ delete from cm_questionnaire where id in
|
|
|
+ <foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|