TgjjGrdkzhxxMapper2.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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.sooka.mapper.TgjjGrdkzhxxMapper2">
  6. <sql id="global_name">
  7. ID,create_time,cd_time,cd_batch,cd_operation,cd_source,
  8. </sql>
  9. <sql id="global_value">
  10. #{ID},now(),#{cd_time},#{cd_batch},#{cd_operation},#{cd_source},
  11. </sql>
  12. <sql id="update_sql">
  13. create_time = now(),cd_batch = #{cd_batch},cd_operation = #{cd_operation},cd_source =#{cd_source},
  14. </sql>
  15. <resultMap type="com.sooka.model.bo.TgjjGrdkzhxx" id="TgjjGrdkzhxxResult">
  16. </resultMap>
  17. <parameterMap id="TgjjGrdkzhxx" type="com.sooka.model.bo.TgjjGrdkzhxx"></parameterMap>
  18. <sql id="selectTgjjGrdkzhxxVo">
  19. select ID, DKZH, JKHTBH, DKFXDJ, DKFFE, DKFFRQ, DKYE, DKLL, DQJHHKJE, DQJHGHBJ, DQJHGHLX, DQYHJE, DQYHBJ, DQYHLX, DQYHFX, DKJQRQ, HSBJZE, HSLXZE, FXZE, TQGHBJZE, YQBJZE, YQLXZE, LJYQQS, DKZT, ZXBH, LAST_UPDATE_TIME lastUpdateTime, SCHKFSRQ, CLLX from tgjj_grdkzhxx
  20. </sql>
  21. <select id="selectTgjjGrdkzhxxList" parameterMap="TgjjGrdkzhxx" resultMap="TgjjGrdkzhxxResult">
  22. <include refid="selectTgjjGrdkzhxxVo"/>
  23. <where>
  24. <if test="DKZH != null and DKZH != ''">and DKZH = #{DKZH}</if>
  25. <if test="JKHTBH != null and JKHTBH != ''">and JKHTBH = #{JKHTBH}</if>
  26. <if test="DKFXDJ != null and DKFXDJ != ''">and DKFXDJ = #{DKFXDJ}</if>
  27. <if test="DKFFE != null ">and DKFFE = #{DKFFE}</if>
  28. <if test="DKFFRQ != null ">and DKFFRQ = #{DKFFRQ}</if>
  29. <if test="DKYE != null ">and DKYE = #{DKYE}</if>
  30. <if test="DKLL != null ">and DKLL = #{DKLL}</if>
  31. <if test="DQJHHKJE != null ">and DQJHHKJE = #{DQJHHKJE}</if>
  32. <if test="DQJHGHBJ != null ">and DQJHGHBJ = #{DQJHGHBJ}</if>
  33. <if test="DQJHGHLX != null ">and DQJHGHLX = #{DQJHGHLX}</if>
  34. <if test="DQYHJE != null ">and DQYHJE = #{DQYHJE}</if>
  35. <if test="DQYHBJ != null ">and DQYHBJ = #{DQYHBJ}</if>
  36. <if test="DQYHLX != null ">and DQYHLX = #{DQYHLX}</if>
  37. <if test="DQYHFX != null ">and DQYHFX = #{DQYHFX}</if>
  38. <if test="DKJQRQ != null ">and DKJQRQ = #{DKJQRQ}</if>
  39. <if test="HSBJZE != null ">and HSBJZE = #{HSBJZE}</if>
  40. <if test="HSLXZE != null ">and HSLXZE = #{HSLXZE}</if>
  41. <if test="FXZE != null ">and FXZE = #{FXZE}</if>
  42. <if test="TQGHBJZE != null ">and TQGHBJZE = #{TQGHBJZE}</if>
  43. <if test="YQBJZE != null ">and YQBJZE = #{YQBJZE}</if>
  44. <if test="YQLXZE != null ">and YQLXZE = #{YQLXZE}</if>
  45. <if test="LJYQQS != null ">and LJYQQS = #{LJYQQS}</if>
  46. <if test="DKZT != null and DKZT != ''">and DKZT = #{DKZT}</if>
  47. <if test="ZXBH != null and ZXBH != ''">and ZXBH = #{ZXBH}</if>
  48. <if test="lastUpdateTime != null ">and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
  49. <if test="SCHKFSRQ != null ">and SCHKFSRQ = #{SCHKFSRQ}</if>
  50. <if test="CLLX != null ">and CLLX = #{CLLX}</if>
  51. <if test="search_begintime != null">and LAST_UPDATE_TIME >= #{search_begintime}</if>
  52. <if test="search_endtime != null">and LAST_UPDATE_TIME &lt; #{search_endtime}</if>
  53. </where>
  54. </select>
  55. <select id="selectTgjjGrdkzhxxById" parameterType="Long" resultMap="TgjjGrdkzhxxResult">
  56. <include refid="selectTgjjGrdkzhxxVo"/>
  57. where ID = #{ID}
  58. </select>
  59. <insert id="insertTgjjGrdkzhxx" parameterMap="TgjjGrdkzhxx" useGeneratedKeys="true" keyProperty="ID">
  60. insert into tgjj_grdkzhxx
  61. <trim prefix="(" suffix=")" suffixOverrides=",">
  62. <include refid="global_name"></include>
  63. <if test="DKZH != null">DKZH,</if>
  64. <if test="JKHTBH != null">JKHTBH,</if>
  65. <if test="DKFXDJ != null">DKFXDJ,</if>
  66. <if test="DKFFE != null">DKFFE,</if>
  67. <if test="DKFFRQ != null">DKFFRQ,</if>
  68. <if test="DKYE != null">DKYE,</if>
  69. <if test="DKLL != null">DKLL,</if>
  70. <if test="DQJHHKJE != null">DQJHHKJE,</if>
  71. <if test="DQJHGHBJ != null">DQJHGHBJ,</if>
  72. <if test="DQJHGHLX != null">DQJHGHLX,</if>
  73. <if test="DQYHJE != null">DQYHJE,</if>
  74. <if test="DQYHBJ != null">DQYHBJ,</if>
  75. <if test="DQYHLX != null">DQYHLX,</if>
  76. <if test="DQYHFX != null">DQYHFX,</if>
  77. <if test="DKJQRQ != null">DKJQRQ,</if>
  78. <if test="HSBJZE != null">HSBJZE,</if>
  79. <if test="HSLXZE != null">HSLXZE,</if>
  80. <if test="FXZE != null">FXZE,</if>
  81. <if test="TQGHBJZE != null">TQGHBJZE,</if>
  82. <if test="YQBJZE != null">YQBJZE,</if>
  83. <if test="YQLXZE != null">YQLXZE,</if>
  84. <if test="LJYQQS != null">LJYQQS,</if>
  85. <if test="DKZT != null">DKZT,</if>
  86. <if test="ZXBH != null">ZXBH,</if>
  87. <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
  88. <if test="SCHKFSRQ != null">SCHKFSRQ,</if>
  89. <if test="CLLX != null">CLLX,</if>
  90. </trim>
  91. <trim prefix="values (" suffix=")" suffixOverrides=",">
  92. <include refid="global_value"></include>
  93. <if test="DKZH != null">#{DKZH},</if>
  94. <if test="JKHTBH != null">#{JKHTBH},</if>
  95. <if test="DKFXDJ != null">#{DKFXDJ},</if>
  96. <if test="DKFFE != null">#{DKFFE},</if>
  97. <if test="DKFFRQ != null">#{DKFFRQ},</if>
  98. <if test="DKYE != null">#{DKYE},</if>
  99. <if test="DKLL != null">#{DKLL},</if>
  100. <if test="DQJHHKJE != null">#{DQJHHKJE},</if>
  101. <if test="DQJHGHBJ != null">#{DQJHGHBJ},</if>
  102. <if test="DQJHGHLX != null">#{DQJHGHLX},</if>
  103. <if test="DQYHJE != null">#{DQYHJE},</if>
  104. <if test="DQYHBJ != null">#{DQYHBJ},</if>
  105. <if test="DQYHLX != null">#{DQYHLX},</if>
  106. <if test="DQYHFX != null">#{DQYHFX},</if>
  107. <if test="DKJQRQ != null">#{DKJQRQ},</if>
  108. <if test="HSBJZE != null">#{HSBJZE},</if>
  109. <if test="HSLXZE != null">#{HSLXZE},</if>
  110. <if test="FXZE != null">#{FXZE},</if>
  111. <if test="TQGHBJZE != null">#{TQGHBJZE},</if>
  112. <if test="YQBJZE != null">#{YQBJZE},</if>
  113. <if test="YQLXZE != null">#{YQLXZE},</if>
  114. <if test="LJYQQS != null">#{LJYQQS},</if>
  115. <if test="DKZT != null">#{DKZT},</if>
  116. <if test="ZXBH != null">#{ZXBH},</if>
  117. <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
  118. <if test="SCHKFSRQ != null">#{SCHKFSRQ},</if>
  119. <if test="CLLX != null">#{CLLX},</if>
  120. </trim>
  121. </insert>
  122. <update id="updateTgjjGrdkzhxx" parameterMap="TgjjGrdkzhxx">
  123. update tgjj_grdkzhxx
  124. <trim prefix="SET" suffixOverrides=",">
  125. <include refid="update_sql"></include>
  126. <if test="DKZH != null">DKZH = #{DKZH},</if>
  127. <if test="JKHTBH != null">JKHTBH = #{JKHTBH},</if>
  128. <if test="DKFXDJ != null">DKFXDJ = #{DKFXDJ},</if>
  129. <if test="DKFFE != null">DKFFE = #{DKFFE},</if>
  130. <if test="DKFFRQ != null">DKFFRQ = #{DKFFRQ},</if>
  131. <if test="DKYE != null">DKYE = #{DKYE},</if>
  132. <if test="DKLL != null">DKLL = #{DKLL},</if>
  133. <if test="DQJHHKJE != null">DQJHHKJE = #{DQJHHKJE},</if>
  134. <if test="DQJHGHBJ != null">DQJHGHBJ = #{DQJHGHBJ},</if>
  135. <if test="DQJHGHLX != null">DQJHGHLX = #{DQJHGHLX},</if>
  136. <if test="DQYHJE != null">DQYHJE = #{DQYHJE},</if>
  137. <if test="DQYHBJ != null">DQYHBJ = #{DQYHBJ},</if>
  138. <if test="DQYHLX != null">DQYHLX = #{DQYHLX},</if>
  139. <if test="DQYHFX != null">DQYHFX = #{DQYHFX},</if>
  140. <if test="DKJQRQ != null">DKJQRQ = #{DKJQRQ},</if>
  141. <if test="HSBJZE != null">HSBJZE = #{HSBJZE},</if>
  142. <if test="HSLXZE != null">HSLXZE = #{HSLXZE},</if>
  143. <if test="FXZE != null">FXZE = #{FXZE},</if>
  144. <if test="TQGHBJZE != null">TQGHBJZE = #{TQGHBJZE},</if>
  145. <if test="YQBJZE != null">YQBJZE = #{YQBJZE},</if>
  146. <if test="YQLXZE != null">YQLXZE = #{YQLXZE},</if>
  147. <if test="LJYQQS != null">LJYQQS = #{LJYQQS},</if>
  148. <if test="DKZT != null">DKZT = #{DKZT},</if>
  149. <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
  150. <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
  151. <if test="SCHKFSRQ != null">SCHKFSRQ = #{SCHKFSRQ},</if>
  152. <if test="CLLX != null">CLLX = #{CLLX},</if>
  153. </trim>
  154. where ID = #{ID}
  155. </update>
  156. <select id="selectTgjjGrdkzhxxList_select_grdkzhxx" parameterMap="TgjjGrdkzhxx" resultMap="TgjjGrdkzhxxResult">
  157. <include refid="selectTgjjGrdkzhxxVo"/>
  158. <where>
  159. <if test="DKZH != null and DKZH != ''">
  160. and DKZH = #{DKZH}
  161. </if>
  162. </where>
  163. </select>
  164. </mapper>