| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <?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.company.mapper.CompanySmsCommonLogsMapper">
- <resultMap type="CompanySmsCommonLogs" id="CompanySmsCommonLogsResult">
- <result property="logsId" column="logs_id" />
- <result property="companyId" column="company_id" />
- <result property="companyUserId" column="company_user_id" />
- <result property="recipientId" column="recipient_id" />
- <result property="recipientName" column="recipient_name" />
- <result property="sendType" column="send_type" />
- <result property="tempId" column="temp_id" />
- <result property="tempCode" column="temp_code" />
- <result property="phone" column="phone" />
- <result property="content" column="content" />
- <result property="createTime" column="create_time" />
- <result property="sendTime" column="send_time" />
- <result property="status" column="status" />
- <result property="mid" column="mid" />
- <result property="stat" column="stat" />
- <result property="replyContent" column="reply_content" />
- <result property="number" column="number" />
- <result property="type" column="type" />
- <result property="companyUserName" column="company_user_name" />
- </resultMap>
- <sql id="selectCompanySmsCommonLogsVo">
- select logs_id, company_id, company_user_id, recipient_id, recipient_name, send_type, temp_id, temp_code, phone, content, create_time, send_time, status, mid, stat, reply_content, number, type,company_user_name from company_sms_common_logs
- </sql>
- <select id="selectCompanySmsCommonLogsList" parameterType="CompanySmsCommonLogs" resultMap="CompanySmsCommonLogsResult">
- <include refid="selectCompanySmsCommonLogsVo"/>
- <where>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
- <if test="recipientId != null "> and recipient_id = #{recipientId}</if>
- <if test="recipientName != null "> and recipient_name like concat('%', #{recipientName}, '%')</if>
- <if test="sendType != null "> and send_type = #{sendType}</if>
- <if test="tempId != null "> and temp_id = #{tempId}</if>
- <if test="tempCode != null and tempCode != ''"> and temp_code = #{tempCode}</if>
- <if test="phone != null and phone != ''"> and phone = #{phone}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="sendTime != null "> and send_time = #{sendTime}</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="mid != null and mid != ''"> and mid = #{mid}</if>
- <if test="stat != null and stat != ''"> and stat = #{stat}</if>
- <if test="replyContent != null and replyContent != ''"> and reply_content = #{replyContent}</if>
- <if test="number != null "> and number = #{number}</if>
- <if test="type != null and type != ''"> and type = #{type}</if>
- <if test="companyUserName != null and companyUserName != ''"> and company_user_name = #{companyUserName}</if>
- <if test="beginTime != null and beginTime != '' "> and send_time >= #{beginTime}</if>
- <if test="endTime != null and endTime != '' "> and send_time < #{endTime}</if>
- <if test="isReply != null and isReply == 0 "> and content is not null</if>
- <if test="isReply != null and isReply == 1 "> and content is null</if>
- </where>
- order by logs_id desc
- </select>
- <select id="selectCompanySmsCommonLogsByLogsId" parameterType="Long" resultMap="CompanySmsCommonLogsResult">
- <include refid="selectCompanySmsCommonLogsVo"/>
- where logs_id = #{logsId}
- </select>
- <insert id="insertCompanySmsCommonLogs" parameterType="CompanySmsCommonLogs" useGeneratedKeys="true" keyProperty="logsId">
- insert into company_sms_common_logs
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="companyId != null">company_id,</if>
- <if test="companyUserId != null">company_user_id,</if>
- <if test="recipientId != null">recipient_id,</if>
- <if test="recipientName != null">recipient_name,</if>
- <if test="sendType != null">send_type,</if>
- <if test="tempId != null">temp_id,</if>
- <if test="tempCode != null">temp_code,</if>
- <if test="phone != null">phone,</if>
- <if test="content != null">content,</if>
- <if test="createTime != null">create_time,</if>
- <if test="sendTime != null">send_time,</if>
- <if test="status != null">status,</if>
- <if test="mid != null">mid,</if>
- <if test="stat != null">stat,</if>
- <if test="replyContent != null">reply_content,</if>
- <if test="number != null">number,</if>
- <if test="type != null">type,</if>
- <if test="companyUserName != null">company_user_name,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="companyId != null">#{companyId},</if>
- <if test="companyUserId != null">#{companyUserId},</if>
- <if test="recipientId != null">#{recipientId},</if>
- <if test="recipientName != null">#{recipientName},</if>
- <if test="sendType != null">#{sendType},</if>
- <if test="tempId != null">#{tempId},</if>
- <if test="tempCode != null">#{tempCode},</if>
- <if test="phone != null">#{phone},</if>
- <if test="content != null">#{content},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="sendTime != null">#{sendTime},</if>
- <if test="status != null">#{status},</if>
- <if test="mid != null">#{mid},</if>
- <if test="stat != null">#{stat},</if>
- <if test="replyContent != null">#{replyContent},</if>
- <if test="number != null">#{number},</if>
- <if test="type != null">#{type},</if>
- <if test="companyUserName != null">#{companyUserName},</if>
- </trim>
- </insert>
- <update id="updateCompanySmsCommonLogs" parameterType="CompanySmsCommonLogs">
- update company_sms_common_logs
- <trim prefix="SET" suffixOverrides=",">
- <if test="companyId != null">company_id = #{companyId},</if>
- <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
- <if test="recipientId != null">recipient_id = #{recipientId},</if>
- <if test="recipientName != null">recipient_name = #{recipientName},</if>
- <if test="sendType != null">send_type = #{sendType},</if>
- <if test="tempId != null">temp_id = #{tempId},</if>
- <if test="tempCode != null">temp_code = #{tempCode},</if>
- <if test="phone != null">phone = #{phone},</if>
- <if test="content != null">content = #{content},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="sendTime != null">send_time = #{sendTime},</if>
- <if test="status != null">status = #{status},</if>
- <if test="mid != null">mid = #{mid},</if>
- <if test="stat != null">stat = #{stat},</if>
- <if test="replyContent != null">reply_content = #{replyContent},</if>
- <if test="number != null">number = #{number},</if>
- <if test="type != null">type = #{type},</if>
- <if test="companyUserName != null">company_user_name = #{companyUserName},</if>
- </trim>
- where logs_id = #{logsId}
- </update>
- <delete id="deleteCompanySmsCommonLogsByLogsId" parameterType="Long">
- delete from company_sms_common_logs where logs_id = #{logsId}
- </delete>
- <delete id="deleteCompanySmsCommonLogsByLogsIds" parameterType="String">
- delete from company_sms_common_logs where logs_id in
- <foreach item="logsId" collection="array" open="(" separator="," close=")">
- #{logsId}
- </foreach>
- </delete>
- </mapper>
|