| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?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.fs.qw.mapper.QwAcquisitionSendMsgLogMapper">
- <resultMap type="com.fs.qw.domain.QwAcquisitionSendMsgLog" id="QwAcquisitionSendMsgLogResult">
- <result property="id" column="id" />
- <result property="companySmsLogsId" column="company_sms_logs_id" />
- <result property="qwAcquisitionId" column="qw_acquisition_id" />
- <result property="phone" column="phone" />
- <result property="number" column="number" />
- <result property="tempId" column="temp_id" />
- <result property="type" column="type" />
- <result property="content" column="content" />
- <result property="result" column="result" />
- <result property="remark" column="remark" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- </resultMap>
- <sql id="selectQwAcquisitionSendMsgLogVo">
- select id, company_sms_logs_id,qw_acquisition_id, phone, number, temp_id, type, content, result, remark, create_by, create_time from qw_acquisition_send_msg_log
- </sql>
- <select id="selectQwAcquisitionSendMsgLogList" parameterType="com.fs.qw.domain.QwAcquisitionSendMsgLog" resultMap="QwAcquisitionSendMsgLogResult">
- <include refid="selectQwAcquisitionSendMsgLogVo"/>
- <where>
- <if test="companySmsLogsId != null and companySmsLogsId != ''"> and company_sms_logs_id = #{companySmsLogsId}</if>
- <if test="qwAcquisitionId != null and qwAcquisitionId != ''"> and qw_acquisition_id = #{qwAcquisitionId}</if>
- <if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
- <if test="number != null "> and number = #{number}</if>
- <if test="tempId != null "> and temp_id = #{tempId}</if>
- <if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
- <if test="content != null and content != ''"> and content like concat('%', #{content}, '%')</if>
- <if test="result != null and result != ''"> and result like concat('%', #{result}, '%')</if>
- <if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
- </where>
- order by create_time desc
- </select>
- <select id="selectQwAcquisitionSendMsgLogById" parameterType="Long" resultMap="QwAcquisitionSendMsgLogResult">
- <include refid="selectQwAcquisitionSendMsgLogVo"/>
- where id = #{id}
- </select>
- <insert id="insertQwAcquisitionSendMsgLog" parameterType="com.fs.qw.domain.QwAcquisitionSendMsgLog" useGeneratedKeys="true" keyProperty="id">
- insert into qw_acquisition_send_msg_log
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="companySmsLogsId != null and companySmsLogsId != ''">company_sms_logs_id,</if>
- <if test="qwAcquisitionId != null and qwAcquisitionId != ''">qw_acquisition_id,</if>
- <if test="phone != null and phone != ''">phone,</if>
- <if test="number != null">number,</if>
- <if test="tempId != null">temp_id,</if>
- <if test="type != null and type != ''">type,</if>
- <if test="content != null and content != ''">content,</if>
- <if test="result != null and result != ''">result,</if>
- <if test="remark != null and remark != ''">remark,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- create_time,
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="companySmsLogsId != null and companySmsLogsId != ''">#{companySmsLogsId},</if>
- <if test="qwAcquisitionId != null and qwAcquisitionId != ''">#{qwAcquisitionId},</if>
- <if test="phone != null and phone != ''">#{phone},</if>
- <if test="number != null">#{number},</if>
- <if test="tempId != null">#{tempId},</if>
- <if test="type != null and type != ''">#{type},</if>
- <if test="content != null and content != ''">#{content},</if>
- <if test="result != null and result != ''">#{result},</if>
- <if test="remark != null and remark != ''">#{remark},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- sysdate(),
- </trim>
- </insert>
- <update id="updateQwAcquisitionSendMsgLog" parameterType="com.fs.qw.domain.QwAcquisitionSendMsgLog">
- update qw_acquisition_send_msg_log
- <trim prefix="SET" suffixOverrides=",">
- <if test="companySmsLogsId != null and companySmsLogsId != ''">company_sms_logs_id = #{companySmsLogsId},</if>
- <if test="qwAcquisitionId != null and qwAcquisitionId != ''">qw_acquisition_id = #{qwAcquisitionId},</if>
- <if test="phone != null and phone != ''">phone = #{phone},</if>
- <if test="number != null">number = #{number},</if>
- <if test="tempId != null">temp_id = #{tempId},</if>
- <if test="type != null and type != ''">type = #{type},</if>
- <if test="content != null and content != ''">content = #{content},</if>
- <if test="result != null and result != ''">result = #{result},</if>
- <if test="remark != null and remark != ''">remark = #{remark},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- update_time = sysdate(),
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteQwAcquisitionSendMsgLogById" parameterType="Long">
- delete from qw_acquisition_send_msg_log where id = #{id}
- </delete>
- <delete id="deleteQwAcquisitionSendMsgLogByIds" parameterType="String">
- delete from qw_acquisition_send_msg_log where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|