TgjjGrckzhbdxxMapper2.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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.TgjjGrckzhbdxxMapper2">
  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.TgjjGrckzhbdxx" id="TgjjGrckzhbdxxResult">
  16. </resultMap>
  17. <parameterMap id="TgjjGrckzhbdxx" type="com.sooka.model.bo.TgjjGrckzhbdxx"></parameterMap>
  18. <sql id="selectTgjjGrckzhbdxxVo">
  19. select ID, GRZH, JZRQ, GJHTQYWLX, FSE, DNGJFSE, SNJZFSE, FSLXE, TQYY, TQFS, YWLSH, CZBZ, GRZHYE, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_grckzhbdxx
  20. </sql>
  21. <select id="selectTgjjGrckzhbdxxList" parameterMap="TgjjGrckzhbdxx" resultMap="TgjjGrckzhbdxxResult">
  22. <include refid="selectTgjjGrckzhbdxxVo"/>
  23. <where>
  24. <if test="GRZH != null and GRZH != ''"> and GRZH = #{GRZH}</if>
  25. <if test="JZRQ != null "> and JZRQ = #{JZRQ}</if>
  26. <if test="GJHTQYWLX != null and GJHTQYWLX != ''"> and GJHTQYWLX = #{GJHTQYWLX}</if>
  27. <if test="FSE != null "> and FSE = #{FSE}</if>
  28. <if test="DNGJFSE != null "> and DNGJFSE = #{DNGJFSE}</if>
  29. <if test="SNJZFSE != null "> and SNJZFSE = #{SNJZFSE}</if>
  30. <if test="FSLXE != null "> and FSLXE = #{FSLXE}</if>
  31. <if test="TQYY != null and TQYY != ''"> and TQYY = #{TQYY}</if>
  32. <if test="TQFS != null and TQFS != ''"> and TQFS = #{TQFS}</if>
  33. <if test="YWLSH != null and YWLSH != ''"> and YWLSH = #{YWLSH}</if>
  34. <if test="CZBZ != null and CZBZ != ''"> and CZBZ = #{CZBZ}</if>
  35. <if test="GRZHYE != null "> and GRZHYE = #{GRZHYE}</if>
  36. <if test="ZXBH != null and ZXBH != ''"> and ZXBH = #{ZXBH}</if>
  37. <if test="lastUpdateTime != null "> and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
  38. <if test="CLLX != null "> and CLLX = #{CLLX}</if>
  39. <if test="search_begintime != null"> and LAST_UPDATE_TIME >= #{search_begintime}</if>
  40. <if test="search_endtime != null"> and LAST_UPDATE_TIME &lt; #{search_endtime}</if>
  41. </where>
  42. </select>
  43. <select id="selectTgjjGrckzhbdxxById" parameterType="Long" resultMap="TgjjGrckzhbdxxResult">
  44. <include refid="selectTgjjGrckzhbdxxVo"/>
  45. where ID = #{ID}
  46. </select>
  47. <insert id="insertTgjjGrckzhbdxx" parameterMap="TgjjGrckzhbdxx" useGeneratedKeys="true" keyProperty="ID">
  48. insert into tgjj_grckzhbdxx
  49. <trim prefix="(" suffix=")" suffixOverrides=",">
  50. <include refid="global_name"></include>
  51. <if test="GRZH != null">GRZH,</if>
  52. <if test="JZRQ != null">JZRQ,</if>
  53. <if test="GJHTQYWLX != null">GJHTQYWLX,</if>
  54. <if test="FSE != null">FSE,</if>
  55. <if test="DNGJFSE != null">DNGJFSE,</if>
  56. <if test="SNJZFSE != null">SNJZFSE,</if>
  57. <if test="FSLXE != null">FSLXE,</if>
  58. <if test="TQYY != null">TQYY,</if>
  59. <if test="TQFS != null">TQFS,</if>
  60. <if test="YWLSH != null">YWLSH,</if>
  61. <if test="CZBZ != null">CZBZ,</if>
  62. <if test="GRZHYE != null">GRZHYE,</if>
  63. <if test="ZXBH != null">ZXBH,</if>
  64. <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
  65. <if test="CLLX != null">CLLX,</if>
  66. </trim>
  67. <trim prefix="values (" suffix=")" suffixOverrides=",">
  68. <include refid="global_value"></include>
  69. <if test="GRZH != null">#{GRZH},</if>
  70. <if test="JZRQ != null">#{JZRQ},</if>
  71. <if test="GJHTQYWLX != null">#{GJHTQYWLX},</if>
  72. <if test="FSE != null">#{FSE},</if>
  73. <if test="DNGJFSE != null">#{DNGJFSE},</if>
  74. <if test="SNJZFSE != null">#{SNJZFSE},</if>
  75. <if test="FSLXE != null">#{FSLXE},</if>
  76. <if test="TQYY != null">#{TQYY},</if>
  77. <if test="TQFS != null">#{TQFS},</if>
  78. <if test="YWLSH != null">#{YWLSH},</if>
  79. <if test="CZBZ != null">#{CZBZ},</if>
  80. <if test="GRZHYE != null">#{GRZHYE},</if>
  81. <if test="ZXBH != null">#{ZXBH},</if>
  82. <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
  83. <if test="CLLX != null">#{CLLX},</if>
  84. </trim>
  85. </insert>
  86. <update id="updateTgjjGrckzhbdxx" parameterMap="TgjjGrckzhbdxx">
  87. update tgjj_grckzhbdxx
  88. <trim prefix="SET" suffixOverrides=",">
  89. <include refid="update_sql"></include>
  90. <if test="GRZH != null">GRZH = #{GRZH},</if>
  91. <if test="JZRQ != null">JZRQ = #{JZRQ},</if>
  92. <if test="GJHTQYWLX != null">GJHTQYWLX = #{GJHTQYWLX},</if>
  93. <if test="FSE != null">FSE = #{FSE},</if>
  94. <if test="DNGJFSE != null">DNGJFSE = #{DNGJFSE},</if>
  95. <if test="SNJZFSE != null">SNJZFSE = #{SNJZFSE},</if>
  96. <if test="FSLXE != null">FSLXE = #{FSLXE},</if>
  97. <if test="TQYY != null">TQYY = #{TQYY},</if>
  98. <if test="TQFS != null">TQFS = #{TQFS},</if>
  99. <if test="YWLSH != null">YWLSH = #{YWLSH},</if>
  100. <if test="CZBZ != null">CZBZ = #{CZBZ},</if>
  101. <if test="GRZHYE != null">GRZHYE = #{GRZHYE},</if>
  102. <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
  103. <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
  104. <if test="CLLX != null">CLLX = #{CLLX},</if>
  105. </trim>
  106. where ID = #{ID}
  107. </update>
  108. <select id="selectTgjjGrckzhbdxxList_select_grckbdfw" parameterMap="TgjjGrckzhbdxx" resultMap="TgjjGrckzhbdxxResult">
  109. <include refid="selectTgjjGrckzhbdxxVo"/>
  110. <where>
  111. <if test="GRZH != null and GRZH != ''">
  112. and GRZH = #{GRZH}
  113. </if>
  114. </where>
  115. </select>
  116. </mapper>