TgjjGrdkyqxxMapper2.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.TgjjGrdkyqxxMapper2">
  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.TgjjGrdkyqxx" id="TgjjGrdkyqxxResult">
  16. </resultMap>
  17. <parameterMap id="TgjjGrdkyqxx" type="com.sooka.model.bo.TgjjGrdkyqxx"></parameterMap>
  18. <sql id="selectTgjjGrdkyqxxVo">
  19. select ID, IDXH, DKZH, YQQC, YQBJ, YQLX, YQFX, SSRQ, HKQC, SSYQBJJE, SSYQLXJE, SSYQFXJE, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_grdkyqxx
  20. </sql>
  21. <select id="selectTgjjGrdkyqxxList" parameterMap="TgjjGrdkyqxx" resultMap="TgjjGrdkyqxxResult">
  22. <include refid="selectTgjjGrdkyqxxVo"/>
  23. <where>
  24. <if test="IDXH != null and IDXH != ''"> and IDXH = #{IDXH}</if>
  25. <if test="DKZH != null and DKZH != ''"> and DKZH = #{DKZH}</if>
  26. <if test="YQQC != null "> and YQQC = #{YQQC}</if>
  27. <if test="YQBJ != null "> and YQBJ = #{YQBJ}</if>
  28. <if test="YQLX != null "> and YQLX = #{YQLX}</if>
  29. <if test="YQFX != null "> and YQFX = #{YQFX}</if>
  30. <if test="SSRQ != null "> and SSRQ = #{SSRQ}</if>
  31. <if test="HKQC != null "> and HKQC = #{HKQC}</if>
  32. <if test="SSYQBJJE != null "> and SSYQBJJE = #{SSYQBJJE}</if>
  33. <if test="SSYQLXJE != null "> and SSYQLXJE = #{SSYQLXJE}</if>
  34. <if test="SSYQFXJE != null "> and SSYQFXJE = #{SSYQFXJE}</if>
  35. <if test="ZXBH != null and ZXBH != ''"> and ZXBH = #{ZXBH}</if>
  36. <if test="lastUpdateTime != null "> and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
  37. <if test="CLLX != null "> and CLLX = #{CLLX}</if>
  38. <if test="search_begintime != null"> and LAST_UPDATE_TIME >= #{search_begintime}</if>
  39. <if test="search_endtime != null"> and LAST_UPDATE_TIME &lt; #{search_endtime}</if>
  40. </where>
  41. </select>
  42. <select id="selectTgjjGrdkyqxxById" parameterType="Long" resultMap="TgjjGrdkyqxxResult">
  43. <include refid="selectTgjjGrdkyqxxVo"/>
  44. where ID = #{ID}
  45. </select>
  46. <insert id="insertTgjjGrdkyqxx" parameterMap="TgjjGrdkyqxx" useGeneratedKeys="true" keyProperty="ID">
  47. insert into tgjj_grdkyqxx
  48. <trim prefix="(" suffix=")" suffixOverrides=",">
  49. <include refid="global_name"></include>
  50. <if test="IDXH != null">IDXH,</if>
  51. <if test="DKZH != null">DKZH,</if>
  52. <if test="YQQC != null">YQQC,</if>
  53. <if test="YQBJ != null">YQBJ,</if>
  54. <if test="YQLX != null">YQLX,</if>
  55. <if test="YQFX != null">YQFX,</if>
  56. <if test="SSRQ != null">SSRQ,</if>
  57. <if test="HKQC != null">HKQC,</if>
  58. <if test="SSYQBJJE != null">SSYQBJJE,</if>
  59. <if test="SSYQLXJE != null">SSYQLXJE,</if>
  60. <if test="SSYQFXJE != null">SSYQFXJE,</if>
  61. <if test="ZXBH != null">ZXBH,</if>
  62. <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
  63. <if test="CLLX != null">CLLX,</if>
  64. </trim>
  65. <trim prefix="values (" suffix=")" suffixOverrides=",">
  66. <include refid="global_value"></include>
  67. <if test="IDXH != null">#{IDXH},</if>
  68. <if test="DKZH != null">#{DKZH},</if>
  69. <if test="YQQC != null">#{YQQC},</if>
  70. <if test="YQBJ != null">#{YQBJ},</if>
  71. <if test="YQLX != null">#{YQLX},</if>
  72. <if test="YQFX != null">#{YQFX},</if>
  73. <if test="SSRQ != null">#{SSRQ},</if>
  74. <if test="HKQC != null">#{HKQC},</if>
  75. <if test="SSYQBJJE != null">#{SSYQBJJE},</if>
  76. <if test="SSYQLXJE != null">#{SSYQLXJE},</if>
  77. <if test="SSYQFXJE != null">#{SSYQFXJE},</if>
  78. <if test="ZXBH != null">#{ZXBH},</if>
  79. <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
  80. <if test="CLLX != null">#{CLLX},</if>
  81. </trim>
  82. </insert>
  83. <update id="updateTgjjGrdkyqxx" parameterMap="TgjjGrdkyqxx">
  84. update tgjj_grdkyqxx
  85. <trim prefix="SET" suffixOverrides=",">
  86. <include refid="update_sql"></include>
  87. <if test="IDXH != null">IDXH = #{IDXH},</if>
  88. <if test="DKZH != null">DKZH = #{DKZH},</if>
  89. <if test="YQQC != null">YQQC = #{YQQC},</if>
  90. <if test="YQBJ != null">YQBJ = #{YQBJ},</if>
  91. <if test="YQLX != null">YQLX = #{YQLX},</if>
  92. <if test="YQFX != null">YQFX = #{YQFX},</if>
  93. <if test="SSRQ != null">SSRQ = #{SSRQ},</if>
  94. <if test="HKQC != null">HKQC = #{HKQC},</if>
  95. <if test="SSYQBJJE != null">SSYQBJJE = #{SSYQBJJE},</if>
  96. <if test="SSYQLXJE != null">SSYQLXJE = #{SSYQLXJE},</if>
  97. <if test="SSYQFXJE != null">SSYQFXJE = #{SSYQFXJE},</if>
  98. <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
  99. <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
  100. <if test="CLLX != null">CLLX = #{CLLX},</if>
  101. </trim>
  102. where ID = #{ID}
  103. </update>
  104. <select id="selectTgjjGrdkyqxxList_select_grdkyqfw" resultMap="TgjjGrdkyqxxResult" parameterMap="TgjjGrdkyqxx">
  105. <include refid="selectTgjjGrdkyqxxVo"/>
  106. <where>
  107. <if test="DKZH != null and DKZH != ''">
  108. and DKZH = #{DKZH}
  109. </if>
  110. </where>
  111. </select>
  112. </mapper>