SimMsg.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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.ruoyi.sim.mapper.SimMsgMapper">
  6. <resultMap type="SimMsg" id="SimMsgResult">
  7. <result property="simMsgId" column="sim_msg_id"/>
  8. <result property="simId" column="sim_id"/>
  9. <result property="examFaultRefId" column="exam_fault_ref_id"/>
  10. <result property="examCollectionType" column="exam_collection_type"/>
  11. <result property="sendMsgState" column="send_msg_state"/>
  12. <result property="priority" column="priority"/>
  13. <result property="sendMsgType" column="send_msg_type"/>
  14. <result property="sendMsg" column="send_msg"/>
  15. <result property="sendTime" column="send_time"/>
  16. <result property="receiveMsg" column="receive_msg"/>
  17. <result property="receiveTime" column="receive_time"/>
  18. <result property="retryCount" column="retry_count"/>
  19. <result property="createBy" column="create_by"/>
  20. <result property="createTime" column="create_time"/>
  21. <result property="updateBy" column="update_by"/>
  22. <result property="updateTime" column="update_time"/>
  23. <result property="remark" column="remark"/>
  24. </resultMap>
  25. <sql id="selectSimMsgVo">
  26. select sim_msg_id,
  27. sim_id,
  28. exam_fault_ref_id,
  29. exam_collection_type,
  30. send_msg_state,
  31. priority,
  32. send_msg_type,
  33. send_msg,
  34. send_time,
  35. receive_msg,
  36. receive_time,
  37. retry_count,
  38. create_by,
  39. create_time,
  40. update_by,
  41. update_time,
  42. remark
  43. from sim_sim_msg
  44. </sql>
  45. <select id="selectSimMsgList" parameterType="SimMsg" resultMap="SimMsgResult">
  46. <include refid="selectSimMsgVo"/>
  47. <where>
  48. <if test="simId != null ">and sim_id = #{simId}</if>
  49. <if test="examFaultRefId != null ">and exam_fault_ref_id = #{examFaultRefId}</if>
  50. <if test="examCollectionType != null and examCollectionType != ''">and exam_collection_type =
  51. #{examCollectionType}
  52. </if>
  53. <if test="sendMsgState != null and sendMsgState != ''">and send_msg_state = #{sendMsgState}</if>
  54. <if test="priority != null ">and priority = #{priority}</if>
  55. <if test="sendMsgType != null and sendMsgType != ''">and send_msg_type = #{sendMsgType}</if>
  56. <if test="sendMsg != null and sendMsg != ''">and send_msg = #{sendMsg}</if>
  57. <if test="sendTime != null ">and send_time = #{sendTime}</if>
  58. <if test="receiveMsg != null and receiveMsg != ''">and receive_msg = #{receiveMsg}</if>
  59. <if test="receiveTime != null ">and receive_time = #{receiveTime}</if>
  60. <if test="retryCount != null ">and retry_count = #{retryCount}</if>
  61. </where>
  62. </select>
  63. <select id="selectSimMsgBySimMsgId" parameterType="Long" resultMap="SimMsgResult">
  64. <include refid="selectSimMsgVo"/>
  65. where sim_msg_id = #{simMsgId}
  66. </select>
  67. <insert id="insertSimMsg" parameterType="SimMsg" useGeneratedKeys="true" keyProperty="simMsgId">
  68. insert into sim_sim_msg
  69. <trim prefix="(" suffix=")" suffixOverrides=",">
  70. <if test="simId != null">sim_id,</if>
  71. <if test="examFaultRefId != null">exam_fault_ref_id,</if>
  72. <if test="examCollectionType != null and examCollectionType != ''">exam_collection_type,</if>
  73. <if test="sendMsgState != null and sendMsgState != ''">send_msg_state,</if>
  74. <if test="priority != null">priority,</if>
  75. <if test="sendMsgType != null and sendMsgType != ''">send_msg_type,</if>
  76. <if test="sendMsg != null">send_msg,</if>
  77. <if test="sendTime != null">send_time,</if>
  78. <if test="receiveMsg != null">receive_msg,</if>
  79. <if test="receiveTime != null">receive_time,</if>
  80. <if test="retryCount != null">retry_count,</if>
  81. <if test="createBy != null">create_by,</if>
  82. <if test="createTime != null">create_time,</if>
  83. <if test="updateBy != null">update_by,</if>
  84. <if test="updateTime != null">update_time,</if>
  85. <if test="remark != null">remark,</if>
  86. </trim>
  87. <trim prefix="values (" suffix=")" suffixOverrides=",">
  88. <if test="simId != null">#{simId},</if>
  89. <if test="examFaultRefId != null">#{examFaultRefId},</if>
  90. <if test="examCollectionType != null and examCollectionType != ''">#{examCollectionType},</if>
  91. <if test="sendMsgState != null and sendMsgState != ''">#{sendMsgState},</if>
  92. <if test="priority != null">#{priority},</if>
  93. <if test="sendMsgType != null and sendMsgType != ''">#{sendMsgType},</if>
  94. <if test="sendMsg != null">#{sendMsg},</if>
  95. <if test="sendTime != null">#{sendTime},</if>
  96. <if test="receiveMsg != null">#{receiveMsg},</if>
  97. <if test="receiveTime != null">#{receiveTime},</if>
  98. <if test="retryCount != null">#{retryCount},</if>
  99. <if test="createBy != null">#{createBy},</if>
  100. <if test="createTime != null">#{createTime},</if>
  101. <if test="updateBy != null">#{updateBy},</if>
  102. <if test="updateTime != null">#{updateTime},</if>
  103. <if test="remark != null">#{remark},</if>
  104. </trim>
  105. </insert>
  106. <update id="updateSimMsg" parameterType="SimMsg">
  107. update sim_sim_msg
  108. <trim prefix="SET" suffixOverrides=",">
  109. <if test="simId != null">sim_id = #{simId},</if>
  110. <if test="examFaultRefId != null">exam_fault_ref_id = #{examFaultRefId},</if>
  111. <if test="examCollectionType != null and examCollectionType != ''">exam_collection_type =
  112. #{examCollectionType},
  113. </if>
  114. <if test="sendMsgState != null and sendMsgState != ''">send_msg_state = #{sendMsgState},</if>
  115. <if test="priority != null">priority = #{priority},</if>
  116. <if test="sendMsgType != null and sendMsgType != ''">send_msg_type = #{sendMsgType},</if>
  117. <if test="sendMsg != null">send_msg = #{sendMsg},</if>
  118. <if test="sendTime != null">send_time = #{sendTime},</if>
  119. <if test="receiveMsg != null">receive_msg = #{receiveMsg},</if>
  120. <if test="receiveTime != null">receive_time = #{receiveTime},</if>
  121. <if test="retryCount != null">retry_count = #{retryCount},</if>
  122. <if test="createBy != null">create_by = #{createBy},</if>
  123. <if test="createTime != null">create_time = #{createTime},</if>
  124. <if test="updateBy != null">update_by = #{updateBy},</if>
  125. <if test="updateTime != null">update_time = #{updateTime},</if>
  126. <if test="remark != null">remark = #{remark},</if>
  127. </trim>
  128. where sim_msg_id = #{simMsgId}
  129. </update>
  130. <delete id="deleteSimMsgBySimMsgId" parameterType="Long">
  131. delete
  132. from sim_sim_msg
  133. where sim_msg_id = #{simMsgId}
  134. </delete>
  135. <delete id="deleteSimMsgBySimMsgIds" parameterType="String">
  136. delete from sim_sim_msg where sim_msg_id in
  137. <foreach item="simMsgId" collection="array" open="(" separator="," close=")">
  138. #{simMsgId}
  139. </foreach>
  140. </delete>
  141. </mapper>