QwAcquisitionSendMsgLogMapper.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.fs.qw.mapper.QwAcquisitionSendMsgLogMapper">
  6. <resultMap type="com.fs.qw.domain.QwAcquisitionSendMsgLog" id="QwAcquisitionSendMsgLogResult">
  7. <result property="id" column="id" />
  8. <result property="companySmsLogsId" column="company_sms_logs_id" />
  9. <result property="qwAcquisitionId" column="qw_acquisition_id" />
  10. <result property="phone" column="phone" />
  11. <result property="number" column="number" />
  12. <result property="tempId" column="temp_id" />
  13. <result property="type" column="type" />
  14. <result property="content" column="content" />
  15. <result property="result" column="result" />
  16. <result property="remark" column="remark" />
  17. <result property="createBy" column="create_by" />
  18. <result property="createTime" column="create_time" />
  19. </resultMap>
  20. <sql id="selectQwAcquisitionSendMsgLogVo">
  21. 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
  22. </sql>
  23. <select id="selectQwAcquisitionSendMsgLogList" parameterType="com.fs.qw.domain.QwAcquisitionSendMsgLog" resultMap="QwAcquisitionSendMsgLogResult">
  24. <include refid="selectQwAcquisitionSendMsgLogVo"/>
  25. <where>
  26. <if test="companySmsLogsId != null and companySmsLogsId != ''"> and company_sms_logs_id = #{companySmsLogsId}</if>
  27. <if test="qwAcquisitionId != null and qwAcquisitionId != ''"> and qw_acquisition_id = #{qwAcquisitionId}</if>
  28. <if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
  29. <if test="number != null "> and number = #{number}</if>
  30. <if test="tempId != null "> and temp_id = #{tempId}</if>
  31. <if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
  32. <if test="content != null and content != ''"> and content like concat('%', #{content}, '%')</if>
  33. <if test="result != null and result != ''"> and result like concat('%', #{result}, '%')</if>
  34. <if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
  35. </where>
  36. order by create_time desc
  37. </select>
  38. <select id="selectQwAcquisitionSendMsgLogById" parameterType="Long" resultMap="QwAcquisitionSendMsgLogResult">
  39. <include refid="selectQwAcquisitionSendMsgLogVo"/>
  40. where id = #{id}
  41. </select>
  42. <insert id="insertQwAcquisitionSendMsgLog" parameterType="com.fs.qw.domain.QwAcquisitionSendMsgLog" useGeneratedKeys="true" keyProperty="id">
  43. insert into qw_acquisition_send_msg_log
  44. <trim prefix="(" suffix=")" suffixOverrides=",">
  45. <if test="companySmsLogsId != null and companySmsLogsId != ''">company_sms_logs_id,</if>
  46. <if test="qwAcquisitionId != null and qwAcquisitionId != ''">qw_acquisition_id,</if>
  47. <if test="phone != null and phone != ''">phone,</if>
  48. <if test="number != null">number,</if>
  49. <if test="tempId != null">temp_id,</if>
  50. <if test="type != null and type != ''">type,</if>
  51. <if test="content != null and content != ''">content,</if>
  52. <if test="result != null and result != ''">result,</if>
  53. <if test="remark != null and remark != ''">remark,</if>
  54. <if test="createBy != null and createBy != ''">create_by,</if>
  55. create_time,
  56. </trim>
  57. <trim prefix="values (" suffix=")" suffixOverrides=",">
  58. <if test="companySmsLogsId != null and companySmsLogsId != ''">#{companySmsLogsId},</if>
  59. <if test="qwAcquisitionId != null and qwAcquisitionId != ''">#{qwAcquisitionId},</if>
  60. <if test="phone != null and phone != ''">#{phone},</if>
  61. <if test="number != null">#{number},</if>
  62. <if test="tempId != null">#{tempId},</if>
  63. <if test="type != null and type != ''">#{type},</if>
  64. <if test="content != null and content != ''">#{content},</if>
  65. <if test="result != null and result != ''">#{result},</if>
  66. <if test="remark != null and remark != ''">#{remark},</if>
  67. <if test="createBy != null and createBy != ''">#{createBy},</if>
  68. sysdate(),
  69. </trim>
  70. </insert>
  71. <update id="updateQwAcquisitionSendMsgLog" parameterType="com.fs.qw.domain.QwAcquisitionSendMsgLog">
  72. update qw_acquisition_send_msg_log
  73. <trim prefix="SET" suffixOverrides=",">
  74. <if test="companySmsLogsId != null and companySmsLogsId != ''">company_sms_logs_id = #{companySmsLogsId},</if>
  75. <if test="qwAcquisitionId != null and qwAcquisitionId != ''">qw_acquisition_id = #{qwAcquisitionId},</if>
  76. <if test="phone != null and phone != ''">phone = #{phone},</if>
  77. <if test="number != null">number = #{number},</if>
  78. <if test="tempId != null">temp_id = #{tempId},</if>
  79. <if test="type != null and type != ''">type = #{type},</if>
  80. <if test="content != null and content != ''">content = #{content},</if>
  81. <if test="result != null and result != ''">result = #{result},</if>
  82. <if test="remark != null and remark != ''">remark = #{remark},</if>
  83. <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  84. update_time = sysdate(),
  85. </trim>
  86. where id = #{id}
  87. </update>
  88. <delete id="deleteQwAcquisitionSendMsgLogById" parameterType="Long">
  89. delete from qw_acquisition_send_msg_log where id = #{id}
  90. </delete>
  91. <delete id="deleteQwAcquisitionSendMsgLogByIds" parameterType="String">
  92. delete from qw_acquisition_send_msg_log where id in
  93. <foreach item="id" collection="array" open="(" separator="," close=")">
  94. #{id}
  95. </foreach>
  96. </delete>
  97. </mapper>