FsCourseSopLogsMapper.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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.course.mapper.FsCourseSopLogsMapper">
  6. <resultMap type="FsCourseSopLogs" id="FsCourseSopLogsResult">
  7. <result property="id" column="id" />
  8. <result property="qwUserid" column="qw_userid" />
  9. <result property="externalUserId" column="external_user_id" />
  10. <result property="watchStatus" column="watch_status" />
  11. <result property="contentJson" column="content_json" />
  12. <result property="sendStatus" column="send_status" />
  13. <result property="sendTime" column="send_time" />
  14. <result property="sendTimeJson" column="send_time_json" />
  15. <result property="companyId" column="company_id" />
  16. <result property="receivingStatus" column="receiving_status" />
  17. <result property="msgId" column="msg_id" />
  18. <result property="sopId" column="sop_id" />
  19. <result property="realSendTime" column="real_send_time" />
  20. <result property="sopType" column="sop_type" />
  21. <result property="businessId" column="business_id" />
  22. <result property="remark" column="remark" />
  23. <result property="companyUserId" column="company_user_id" />
  24. <result property="customerId" column="customer_id" />
  25. <result property="corpId" column="corp_id" />
  26. </resultMap>
  27. <sql id="selectFsCourseSopLogsVo">
  28. select id, qw_userid, external_user_id, watch_status, content_json, send_status, send_time, send_time_json, company_id, receiving_status, msg_id, sop_id, real_send_time, sop_type, business_id,remark, company_user_id,customer_id,corp_id from fs_course_sop_logs
  29. </sql>
  30. <select id="selectFsCourseSopLogsList" parameterType="FsCourseSopLogs" resultMap="FsCourseSopLogsResult">
  31. <include refid="selectFsCourseSopLogsVo"/>
  32. <where>
  33. <if test="qwUserid != null and qwUserid != ''"> and qw_userid = #{qwUserid}</if>
  34. <if test="externalUserId != null and externalUserId != ''"> and external_user_id = #{externalUserId}</if>
  35. <if test="watchStatus != null "> and watch_status = #{watchStatus}</if>
  36. <if test="contentJson != null and contentJson != ''"> and content_json = #{contentJson}</if>
  37. <if test="sendStatus != null "> and send_status = #{sendStatus}</if>
  38. <if test="sendTime != null "> and send_time = #{sendTime}</if>
  39. <if test="sendTimeJson != null "> and send_time_json = #{sendTimeJson}</if>
  40. <if test="companyId != null "> and company_id = #{companyId}</if>
  41. <if test="receivingStatus != null "> and receiving_status = #{receivingStatus}</if>
  42. <if test="msgId != null and msgId != ''"> and msg_id = #{msgId}</if>
  43. <if test="sopId != null "> and sop_id = #{sopId}</if>
  44. <if test="realSendTime != null "> and real_send_time = #{realSendTime}</if>
  45. <if test="sopType != null "> and sop_type = #{sopType}</if>
  46. <if test="businessId != null "> and business_id = #{businessId}</if>
  47. <if test="remark != null "> and remark = #{remark}</if>
  48. <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
  49. <if test="customerId != null "> and customer_id = #{customerId}</if>
  50. <if test="corpId != null "> and corp_id = #{corpId}</if>
  51. </where>
  52. </select>
  53. <select id="selectFsCourseSopLogsById" parameterType="Long" resultMap="FsCourseSopLogsResult">
  54. <include refid="selectFsCourseSopLogsVo"/>
  55. where id = #{id}
  56. </select>
  57. <insert id="insertFsCourseSopLogs" parameterType="FsCourseSopLogs" useGeneratedKeys="true" keyProperty="id">
  58. insert into fs_course_sop_logs
  59. <trim prefix="(" suffix=")" suffixOverrides=",">
  60. <if test="qwUserid != null">qw_userid,</if>
  61. <if test="externalUserId != null">external_user_id,</if>
  62. <if test="watchStatus != null">watch_status,</if>
  63. <if test="contentJson != null">content_json,</if>
  64. <if test="sendStatus != null">send_status,</if>
  65. <if test="sendTime != null">send_time,</if>
  66. <if test="sendTimeJson != null">send_time_json,</if>
  67. <if test="companyId != null">company_id,</if>
  68. <if test="receivingStatus != null">receiving_status,</if>
  69. <if test="msgId != null">msg_id,</if>
  70. <if test="sopId != null">sop_id,</if>
  71. <if test="realSendTime != null">real_send_time,</if>
  72. <if test="sopType != null">sop_type,</if>
  73. <if test="businessId != null">business_id,</if>
  74. <if test="remark != null">remark,</if>
  75. <if test="companyUserId != null">company_user_id,</if>
  76. <if test="customerId != null">customer_id,</if>
  77. <if test="corpId != null">corp_id,</if>
  78. </trim>
  79. <trim prefix="values (" suffix=")" suffixOverrides=",">
  80. <if test="qwUserid != null">#{qwUserid},</if>
  81. <if test="externalUserId != null">#{externalUserId},</if>
  82. <if test="watchStatus != null">#{watchStatus},</if>
  83. <if test="contentJson != null">#{contentJson},</if>
  84. <if test="sendStatus != null">#{sendStatus},</if>
  85. <if test="sendTime != null">#{sendTime},</if>
  86. <if test="sendTimeJson != null">#{sendTimeJson},</if>
  87. <if test="companyId != null">#{companyId},</if>
  88. <if test="receivingStatus != null">#{receivingStatus},</if>
  89. <if test="msgId != null">#{msgId},</if>
  90. <if test="sopId != null">#{sopId},</if>
  91. <if test="realSendTime != null">#{realSendTime},</if>
  92. <if test="sopType != null">#{sopType},</if>
  93. <if test="businessId != null">#{businessId},</if>
  94. <if test="remark != null">#{remark},</if>
  95. <if test="companyUserId != null">#{companyUserId},</if>
  96. <if test="customerId != null">#{customerId},</if>
  97. <if test="corpId != null">#{corp_id},</if>
  98. </trim>
  99. </insert>
  100. <update id="updateFsCourseSopLogs" parameterType="FsCourseSopLogs">
  101. update fs_course_sop_logs
  102. <trim prefix="SET" suffixOverrides=",">
  103. <if test="qwUserid != null">qw_userid = #{qwUserid},</if>
  104. <if test="externalUserId != null">external_user_id = #{externalUserId},</if>
  105. <if test="watchStatus != null">watch_status = #{watchStatus},</if>
  106. <if test="contentJson != null">content_json = #{contentJson},</if>
  107. <if test="sendStatus != null">send_status = #{sendStatus},</if>
  108. <if test="sendTime != null">send_time = #{sendTime},</if>
  109. <if test="sendTimeJson != null">send_time_json = #{sendTimeJson},</if>
  110. <if test="companyId != null">company_id = #{companyId},</if>
  111. <if test="receivingStatus != null">receiving_status = #{receivingStatus},</if>
  112. <if test="msgId != null">msg_id = #{msgId},</if>
  113. <if test="sopId != null">sop_id = #{sopId},</if>
  114. <if test="realSendTime != null">real_send_time = #{realSendTime},</if>
  115. <if test="sopType != null">sop_type = #{sopType},</if>
  116. <if test="businessId != null">business_id = #{businessId},</if>
  117. <if test="remark != null">remark = #{remark},</if>
  118. <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
  119. <if test="customerId != null">customer_id = #{customerId},</if>
  120. <if test="corpId != null">corp_id = #{corpId},</if>
  121. </trim>
  122. where id = #{id}
  123. </update>
  124. <delete id="deleteFsCourseSopLogsById" parameterType="Long">
  125. delete from fs_course_sop_logs where id = #{id}
  126. </delete>
  127. <delete id="deleteFsCourseSopLogsByIds" parameterType="String">
  128. delete from fs_course_sop_logs where id in
  129. <foreach item="id" collection="array" open="(" separator="," close=")">
  130. #{id}
  131. </foreach>
  132. </delete>
  133. </mapper>