TgjjDbxxMapper2.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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.TgjjDbxxMapper2">
  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.TgjjDbxx" id="TgjjDbxxResult">
  16. </resultMap>
  17. <parameterMap id="TgjjDbxx" type="com.sooka.model.bo.TgjjDbxx"></parameterMap>
  18. <sql id="selectTgjjDbxxVo">
  19. select ID, DBHTBH, JKHTBH, DBJGMC, DYWQZH, DYWTXQZH, DYWFWZL, DYQJLRQ, DYQJCRQ, DYWPGJZ, BZHTBH, BZJGMC, DKBZJ, ZYHTBH, ZYWBH, ZYWMC, ZYWJZ, ZYHTKSRQ, ZYHTJSRQ, ZXBH, LAST_UPDATE_TIME lastUpdateTime, DYFWGFHTH, CLLX from tgjj_dbxx
  20. </sql>
  21. <select id="selectTgjjDbxxList" parameterMap="TgjjDbxx" resultMap="TgjjDbxxResult">
  22. <include refid="selectTgjjDbxxVo"/>
  23. <where>
  24. <if test="DBHTBH != null and DBHTBH != ''">and DBHTBH = #{DBHTBH}</if>
  25. <if test="JKHTBH != null and JKHTBH != ''">and JKHTBH = #{JKHTBH}</if>
  26. <if test="DBJGMC != null and DBJGMC != ''">and DBJGMC = #{DBJGMC}</if>
  27. <if test="DYWQZH != null and DYWQZH != ''">and DYWQZH = #{DYWQZH}</if>
  28. <if test="DYWTXQZH != null and DYWTXQZH != ''">and DYWTXQZH = #{DYWTXQZH}</if>
  29. <if test="DYWFWZL != null and DYWFWZL != ''">and DYWFWZL = #{DYWFWZL}</if>
  30. <if test="DYQJLRQ != null ">and DYQJLRQ = #{DYQJLRQ}</if>
  31. <if test="DYQJCRQ != null ">and DYQJCRQ = #{DYQJCRQ}</if>
  32. <if test="DYWPGJZ != null ">and DYWPGJZ = #{DYWPGJZ}</if>
  33. <if test="BZHTBH != null and BZHTBH != ''">and BZHTBH = #{BZHTBH}</if>
  34. <if test="BZJGMC != null and BZJGMC != ''">and BZJGMC = #{BZJGMC}</if>
  35. <if test="DKBZJ != null ">and DKBZJ = #{DKBZJ}</if>
  36. <if test="ZYHTBH != null and ZYHTBH != ''">and ZYHTBH = #{ZYHTBH}</if>
  37. <if test="ZYWBH != null and ZYWBH != ''">and ZYWBH = #{ZYWBH}</if>
  38. <if test="ZYWMC != null and ZYWMC != ''">and ZYWMC = #{ZYWMC}</if>
  39. <if test="ZYWJZ != null ">and ZYWJZ = #{ZYWJZ}</if>
  40. <if test="ZYHTKSRQ != null ">and ZYHTKSRQ = #{ZYHTKSRQ}</if>
  41. <if test="ZYHTJSRQ != null ">and ZYHTJSRQ = #{ZYHTJSRQ}</if>
  42. <if test="ZXBH != null and ZXBH != ''">and ZXBH = #{ZXBH}</if>
  43. <if test="lastUpdateTime != null ">and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
  44. <if test="DYFWGFHTH != null and DYFWGFHTH != ''">and DYFWGFHTH = #{DYFWGFHTH}</if>
  45. <if test="CLLX != null ">and CLLX = #{CLLX}</if>
  46. <if test="search_begintime != null"> and LAST_UPDATE_TIME >= #{search_begintime}</if>
  47. <if test="search_endtime != null"> and LAST_UPDATE_TIME &lt; #{search_endtime}</if>
  48. </where>
  49. </select>
  50. <select id="selectTgjjDbxxById" parameterType="Long" resultMap="TgjjDbxxResult">
  51. <include refid="selectTgjjDbxxVo"/>
  52. where ID = #{ID}
  53. </select>
  54. <insert id="insertTgjjDbxx" parameterMap="TgjjDbxx" useGeneratedKeys="true" keyProperty="ID">
  55. insert into tgjj_dbxx
  56. <trim prefix="(" suffix=")" suffixOverrides=",">
  57. <include refid="global_name"></include>
  58. <if test="DBHTBH != null">DBHTBH,</if>
  59. <if test="JKHTBH != null">JKHTBH,</if>
  60. <if test="DBJGMC != null">DBJGMC,</if>
  61. <if test="DYWQZH != null">DYWQZH,</if>
  62. <if test="DYWTXQZH != null">DYWTXQZH,</if>
  63. <if test="DYWFWZL != null">DYWFWZL,</if>
  64. <if test="DYQJLRQ != null">DYQJLRQ,</if>
  65. <if test="DYQJCRQ != null">DYQJCRQ,</if>
  66. <if test="DYWPGJZ != null">DYWPGJZ,</if>
  67. <if test="BZHTBH != null">BZHTBH,</if>
  68. <if test="BZJGMC != null">BZJGMC,</if>
  69. <if test="DKBZJ != null">DKBZJ,</if>
  70. <if test="ZYHTBH != null">ZYHTBH,</if>
  71. <if test="ZYWBH != null">ZYWBH,</if>
  72. <if test="ZYWMC != null">ZYWMC,</if>
  73. <if test="ZYWJZ != null">ZYWJZ,</if>
  74. <if test="ZYHTKSRQ != null">ZYHTKSRQ,</if>
  75. <if test="ZYHTJSRQ != null">ZYHTJSRQ,</if>
  76. <if test="ZXBH != null">ZXBH,</if>
  77. <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
  78. <if test="DYFWGFHTH != null">DYFWGFHTH,</if>
  79. <if test="CLLX != null">CLLX,</if>
  80. </trim>
  81. <trim prefix="values (" suffix=")" suffixOverrides=",">
  82. <include refid="global_value"></include>
  83. <if test="DBHTBH != null">#{DBHTBH},</if>
  84. <if test="JKHTBH != null">#{JKHTBH},</if>
  85. <if test="DBJGMC != null">#{DBJGMC},</if>
  86. <if test="DYWQZH != null">#{DYWQZH},</if>
  87. <if test="DYWTXQZH != null">#{DYWTXQZH},</if>
  88. <if test="DYWFWZL != null">#{DYWFWZL},</if>
  89. <if test="DYQJLRQ != null">#{DYQJLRQ},</if>
  90. <if test="DYQJCRQ != null">#{DYQJCRQ},</if>
  91. <if test="DYWPGJZ != null">#{DYWPGJZ},</if>
  92. <if test="BZHTBH != null">#{BZHTBH},</if>
  93. <if test="BZJGMC != null">#{BZJGMC},</if>
  94. <if test="DKBZJ != null">#{DKBZJ},</if>
  95. <if test="ZYHTBH != null">#{ZYHTBH},</if>
  96. <if test="ZYWBH != null">#{ZYWBH},</if>
  97. <if test="ZYWMC != null">#{ZYWMC},</if>
  98. <if test="ZYWJZ != null">#{ZYWJZ},</if>
  99. <if test="ZYHTKSRQ != null">#{ZYHTKSRQ},</if>
  100. <if test="ZYHTJSRQ != null">#{ZYHTJSRQ},</if>
  101. <if test="ZXBH != null">#{ZXBH},</if>
  102. <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
  103. <if test="DYFWGFHTH != null">#{DYFWGFHTH},</if>
  104. <if test="CLLX != null">#{CLLX},</if>
  105. </trim>
  106. </insert>
  107. <update id="updateTgjjDbxx" parameterMap="TgjjDbxx">
  108. update tgjj_dbxx
  109. <trim prefix="SET" suffixOverrides=",">
  110. <include refid="update_sql"></include>
  111. <if test="DBHTBH != null">DBHTBH = #{DBHTBH},</if>
  112. <if test="JKHTBH != null">JKHTBH = #{JKHTBH},</if>
  113. <if test="DBJGMC != null">DBJGMC = #{DBJGMC},</if>
  114. <if test="DYWQZH != null">DYWQZH = #{DYWQZH},</if>
  115. <if test="DYWTXQZH != null">DYWTXQZH = #{DYWTXQZH},</if>
  116. <if test="DYWFWZL != null">DYWFWZL = #{DYWFWZL},</if>
  117. <if test="DYQJLRQ != null">DYQJLRQ = #{DYQJLRQ},</if>
  118. <if test="DYQJCRQ != null">DYQJCRQ = #{DYQJCRQ},</if>
  119. <if test="DYWPGJZ != null">DYWPGJZ = #{DYWPGJZ},</if>
  120. <if test="BZHTBH != null">BZHTBH = #{BZHTBH},</if>
  121. <if test="BZJGMC != null">BZJGMC = #{BZJGMC},</if>
  122. <if test="DKBZJ != null">DKBZJ = #{DKBZJ},</if>
  123. <if test="ZYHTBH != null">ZYHTBH = #{ZYHTBH},</if>
  124. <if test="ZYWBH != null">ZYWBH = #{ZYWBH},</if>
  125. <if test="ZYWMC != null">ZYWMC = #{ZYWMC},</if>
  126. <if test="ZYWJZ != null">ZYWJZ = #{ZYWJZ},</if>
  127. <if test="ZYHTKSRQ != null">ZYHTKSRQ = #{ZYHTKSRQ},</if>
  128. <if test="ZYHTJSRQ != null">ZYHTJSRQ = #{ZYHTJSRQ},</if>
  129. <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
  130. <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
  131. <if test="DYFWGFHTH != null">DYFWGFHTH = #{DYFWGFHTH},</if>
  132. <if test="CLLX != null">CLLX = #{CLLX},</if>
  133. </trim>
  134. where ID = #{ID}
  135. </update>
  136. </mapper>