TgjjGtjkrxxMapper2.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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.TgjjGtjkrxxMapper2">
  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.TgjjGtjkrxx" id="TgjjGtjkrxxResult">
  16. </resultMap>
  17. <parameterMap id="TgjjGtjkrxx" type="com.sooka.model.bo.TgjjGtjkrxx"></parameterMap>
  18. <sql id="selectTgjjGtjkrxxVo">
  19. select ID, GTJKRGJJZH, JKHTBH, GTJKRXM, GTJKRZJLX, GTJKRZJHM, YSR, CDGX, SJHM, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_gtjkrxx
  20. </sql>
  21. <select id="selectTgjjGtjkrxxList" parameterMap="TgjjGtjkrxx" resultMap="TgjjGtjkrxxResult">
  22. <include refid="selectTgjjGtjkrxxVo"/>
  23. <where>
  24. <if test="GTJKRGJJZH != null and GTJKRGJJZH != ''">and GTJKRGJJZH = #{GTJKRGJJZH}</if>
  25. <if test="JKHTBH != null and JKHTBH != ''">and JKHTBH = #{JKHTBH}</if>
  26. <if test="GTJKRXM != null and GTJKRXM != ''">and GTJKRXM = #{GTJKRXM}</if>
  27. <if test="GTJKRZJLX != null and GTJKRZJLX != ''">and GTJKRZJLX = #{GTJKRZJLX}</if>
  28. <if test="GTJKRZJHM != null and GTJKRZJHM != ''">and GTJKRZJHM = #{GTJKRZJHM}</if>
  29. <if test="YSR != null ">and YSR = #{YSR}</if>
  30. <if test="CDGX != null and CDGX != ''">and CDGX = #{CDGX}</if>
  31. <if test="SJHM != null and SJHM != ''">and SJHM = #{SJHM}</if>
  32. <if test="ZXBH != null and ZXBH != ''">and ZXBH = #{ZXBH}</if>
  33. <if test="lastUpdateTime != null ">and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
  34. <if test="CLLX != null ">and CLLX = #{CLLX}</if>
  35. <if test="search_begintime != null"> and LAST_UPDATE_TIME >= #{search_begintime}</if>
  36. <if test="search_endtime != null"> and LAST_UPDATE_TIME &lt; #{search_endtime}</if>
  37. </where>
  38. </select>
  39. <select id="selectTgjjGtjkrxxById" parameterType="Long" resultMap="TgjjGtjkrxxResult">
  40. <include refid="selectTgjjGtjkrxxVo"/>
  41. where ID = #{ID}
  42. </select>
  43. <insert id="insertTgjjGtjkrxx" parameterMap="TgjjGtjkrxx" useGeneratedKeys="true" keyProperty="ID">
  44. insert into tgjj_gtjkrxx
  45. <trim prefix="(" suffix=")" suffixOverrides=",">
  46. <include refid="global_name"></include>
  47. <if test="GTJKRGJJZH != null">GTJKRGJJZH,</if>
  48. <if test="JKHTBH != null">JKHTBH,</if>
  49. <if test="GTJKRXM != null">GTJKRXM,</if>
  50. <if test="GTJKRZJLX != null">GTJKRZJLX,</if>
  51. <if test="GTJKRZJHM != null">GTJKRZJHM,</if>
  52. <if test="YSR != null">YSR,</if>
  53. <if test="CDGX != null">CDGX,</if>
  54. <if test="SJHM != null">SJHM,</if>
  55. <if test="ZXBH != null">ZXBH,</if>
  56. <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
  57. <if test="CLLX != null">CLLX,</if>
  58. </trim>
  59. <trim prefix="values (" suffix=")" suffixOverrides=",">
  60. <include refid="global_value"></include>
  61. <if test="GTJKRGJJZH != null">#{GTJKRGJJZH},</if>
  62. <if test="JKHTBH != null">#{JKHTBH},</if>
  63. <if test="GTJKRXM != null">#{GTJKRXM},</if>
  64. <if test="GTJKRZJLX != null">#{GTJKRZJLX},</if>
  65. <if test="GTJKRZJHM != null">#{GTJKRZJHM},</if>
  66. <if test="YSR != null">#{YSR},</if>
  67. <if test="CDGX != null">#{CDGX},</if>
  68. <if test="SJHM != null">#{SJHM},</if>
  69. <if test="ZXBH != null">#{ZXBH},</if>
  70. <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
  71. <if test="CLLX != null">#{CLLX},</if>
  72. </trim>
  73. </insert>
  74. <update id="updateTgjjGtjkrxx" parameterMap="TgjjGtjkrxx">
  75. update tgjj_gtjkrxx
  76. <trim prefix="SET" suffixOverrides=",">
  77. <include refid="update_sql"></include>
  78. <if test="GTJKRGJJZH != null">GTJKRGJJZH = #{GTJKRGJJZH},</if>
  79. <if test="JKHTBH != null">JKHTBH = #{JKHTBH},</if>
  80. <if test="GTJKRXM != null">GTJKRXM = #{GTJKRXM},</if>
  81. <if test="GTJKRZJLX != null">GTJKRZJLX = #{GTJKRZJLX},</if>
  82. <if test="GTJKRZJHM != null">GTJKRZJHM = #{GTJKRZJHM},</if>
  83. <if test="YSR != null">YSR = #{YSR},</if>
  84. <if test="CDGX != null">CDGX = #{CDGX},</if>
  85. <if test="SJHM != null">SJHM = #{SJHM},</if>
  86. <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
  87. <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
  88. <if test="CLLX != null">CLLX = #{CLLX},</if>
  89. </trim>
  90. where ID = #{ID}
  91. </update>
  92. <select id="selectTgjjGtjkrxxList_select_gtjkrxx" resultMap="TgjjGtjkrxxResult" parameterMap="TgjjGtjkrxx">
  93. <include refid="selectTgjjGtjkrxxVo"/>
  94. <where>
  95. <if test="JKHTBH != null and JKHTBH != ''">
  96. and JKHTBH = #{JKHTBH}
  97. </if>
  98. <if test="GTJKRXM != null and GTJKRXM != ''">
  99. and GTJKRXM = #{GTJKRXM}
  100. </if>
  101. </where>
  102. </select>
  103. </mapper>