TgjjGrdkzhbdxxMapper2.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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.TgjjGrdkzhbdxxMapper2">
  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.TgjjGrdkzhbdxx" id="TgjjGrdkzhbdxxResult">
  16. </resultMap>
  17. <parameterMap id="TgjjGrdkzhbdxx" type="com.sooka.model.bo.TgjjGrdkzhbdxx"></parameterMap>
  18. <sql id="selectTgjjGrdkzhbdxxVo">
  19. select ID, DKZH, YWLSH, DKYWMXLX, YWFSRQ, DKYHDM, FSE, BJJE, LXJE, FXJE, DQQC, ZCZYQBJJE, YQZZCBJJE, JZRQ, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_grdkzhbdxx
  20. </sql>
  21. <select id="selectTgjjGrdkzhbdxxList" parameterMap="TgjjGrdkzhbdxx" resultMap="TgjjGrdkzhbdxxResult">
  22. <include refid="selectTgjjGrdkzhbdxxVo"/>
  23. <where>
  24. <if test="DKZH != null and DKZH != ''"> and DKZH = #{DKZH}</if>
  25. <if test="YWLSH != null and YWLSH != ''"> and YWLSH = #{YWLSH}</if>
  26. <if test="DKYWMXLX != null and DKYWMXLX != ''"> and DKYWMXLX = #{DKYWMXLX}</if>
  27. <if test="YWFSRQ != null "> and YWFSRQ = #{YWFSRQ}</if>
  28. <if test="DKYHDM != null and DKYHDM != ''"> and DKYHDM = #{DKYHDM}</if>
  29. <if test="FSE != null "> and FSE = #{FSE}</if>
  30. <if test="BJJE != null "> and BJJE = #{BJJE}</if>
  31. <if test="LXJE != null "> and LXJE = #{LXJE}</if>
  32. <if test="FXJE != null "> and FXJE = #{FXJE}</if>
  33. <if test="DQQC != null "> and DQQC = #{DQQC}</if>
  34. <if test="ZCZYQBJJE != null "> and ZCZYQBJJE = #{ZCZYQBJJE}</if>
  35. <if test="YQZZCBJJE != null "> and YQZZCBJJE = #{YQZZCBJJE}</if>
  36. <if test="JZRQ != null "> and JZRQ = #{JZRQ}</if>
  37. <if test="ZXBH != null and ZXBH != ''"> and ZXBH = #{ZXBH}</if>
  38. <if test="lastUpdateTime != null "> and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
  39. <if test="CLLX != null "> and CLLX = #{CLLX}</if>
  40. <if test="search_begintime != null"> and LAST_UPDATE_TIME >= #{search_begintime}</if>
  41. <if test="search_endtime != null"> and LAST_UPDATE_TIME &lt; #{search_endtime}</if>
  42. </where>
  43. </select>
  44. <select id="selectTgjjGrdkzhbdxxById" parameterType="Long" resultMap="TgjjGrdkzhbdxxResult">
  45. <include refid="selectTgjjGrdkzhbdxxVo"/>
  46. where ID = #{ID}
  47. </select>
  48. <insert id="insertTgjjGrdkzhbdxx" parameterMap="TgjjGrdkzhbdxx" useGeneratedKeys="true" keyProperty="ID">
  49. insert into tgjj_grdkzhbdxx
  50. <trim prefix="(" suffix=")" suffixOverrides=",">
  51. <include refid="global_name"></include>
  52. <if test="DKZH != null">DKZH,</if>
  53. <if test="YWLSH != null">YWLSH,</if>
  54. <if test="DKYWMXLX != null">DKYWMXLX,</if>
  55. <if test="YWFSRQ != null">YWFSRQ,</if>
  56. <if test="DKYHDM != null">DKYHDM,</if>
  57. <if test="FSE != null">FSE,</if>
  58. <if test="BJJE != null">BJJE,</if>
  59. <if test="LXJE != null">LXJE,</if>
  60. <if test="FXJE != null">FXJE,</if>
  61. <if test="DQQC != null">DQQC,</if>
  62. <if test="ZCZYQBJJE != null">ZCZYQBJJE,</if>
  63. <if test="YQZZCBJJE != null">YQZZCBJJE,</if>
  64. <if test="JZRQ != null">JZRQ,</if>
  65. <if test="ZXBH != null">ZXBH,</if>
  66. <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
  67. <if test="CLLX != null">CLLX,</if>
  68. </trim>
  69. <trim prefix="values (" suffix=")" suffixOverrides=",">
  70. <include refid="global_value"></include>
  71. <if test="DKZH != null">#{DKZH},</if>
  72. <if test="YWLSH != null">#{YWLSH},</if>
  73. <if test="DKYWMXLX != null">#{DKYWMXLX},</if>
  74. <if test="YWFSRQ != null">#{YWFSRQ},</if>
  75. <if test="DKYHDM != null">#{DKYHDM},</if>
  76. <if test="FSE != null">#{FSE},</if>
  77. <if test="BJJE != null">#{BJJE},</if>
  78. <if test="LXJE != null">#{LXJE},</if>
  79. <if test="FXJE != null">#{FXJE},</if>
  80. <if test="DQQC != null">#{DQQC},</if>
  81. <if test="ZCZYQBJJE != null">#{ZCZYQBJJE},</if>
  82. <if test="YQZZCBJJE != null">#{YQZZCBJJE},</if>
  83. <if test="JZRQ != null">#{JZRQ},</if>
  84. <if test="ZXBH != null">#{ZXBH},</if>
  85. <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
  86. <if test="CLLX != null">#{CLLX},</if>
  87. </trim>
  88. </insert>
  89. <update id="updateTgjjGrdkzhbdxx" parameterMap="TgjjGrdkzhbdxx">
  90. update tgjj_grdkzhbdxx
  91. <trim prefix="SET" suffixOverrides=",">
  92. <include refid="update_sql"></include>
  93. <if test="DKZH != null">DKZH = #{DKZH},</if>
  94. <if test="YWLSH != null">YWLSH = #{YWLSH},</if>
  95. <if test="DKYWMXLX != null">DKYWMXLX = #{DKYWMXLX},</if>
  96. <if test="YWFSRQ != null">YWFSRQ = #{YWFSRQ},</if>
  97. <if test="DKYHDM != null">DKYHDM = #{DKYHDM},</if>
  98. <if test="FSE != null">FSE = #{FSE},</if>
  99. <if test="BJJE != null">BJJE = #{BJJE},</if>
  100. <if test="LXJE != null">LXJE = #{LXJE},</if>
  101. <if test="FXJE != null">FXJE = #{FXJE},</if>
  102. <if test="DQQC != null">DQQC = #{DQQC},</if>
  103. <if test="ZCZYQBJJE != null">ZCZYQBJJE = #{ZCZYQBJJE},</if>
  104. <if test="YQZZCBJJE != null">YQZZCBJJE = #{YQZZCBJJE},</if>
  105. <if test="JZRQ != null">JZRQ = #{JZRQ},</if>
  106. <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
  107. <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
  108. <if test="CLLX != null">CLLX = #{CLLX},</if>
  109. </trim>
  110. where ID = #{ID}
  111. </update>
  112. <select id="selectTgjjGrdkzhbdxxList_select_grdkbdxx" resultMap="TgjjGrdkzhbdxxResult" parameterMap="TgjjGrdkzhbdxx">
  113. <include refid="selectTgjjGrdkzhbdxxVo"/>
  114. <where>
  115. <if test="DKZH != null and DKZH != ''">
  116. and DKZH = #{DKZH}
  117. </if>
  118. </where>
  119. </select>
  120. </mapper>