TgjjBsxxMapper2.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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.TgjjBsxxMapper2">
  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.TgjjBsxx" id="TgjjBsxxResult">
  16. </resultMap>
  17. <parameterMap id="TgjjBsxx" type="com.sooka.model.bo.TgjjBsxx"></parameterMap>
  18. <sql id="selectTgjjBsxxVo">
  19. select ID, JKHTBH, JKRXM, JKRZJLX, JKRZJH, SFST, SFSB, DKLX, YDFKRQ, YDDQRQ, DKKHRQ, SCHKRQ, DKZT, DKJQRQ, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_bsxx
  20. </sql>
  21. <select id="selectTgjjBsxxList" parameterMap="TgjjBsxx" resultMap="TgjjBsxxResult">
  22. <include refid="selectTgjjBsxxVo"/>
  23. <where>
  24. <if test="JKHTBH != null and JKHTBH != ''"> and JKHTBH = #{JKHTBH}</if>
  25. <if test="JKRXM != null and JKRXM != ''"> and JKRXM = #{JKRXM}</if>
  26. <if test="JKRZJLX != null and JKRZJLX != ''"> and JKRZJLX = #{JKRZJLX}</if>
  27. <if test="JKRZJH != null and JKRZJH != ''"> and JKRZJH = #{JKRZJH}</if>
  28. <if test="SFST != null and SFST != ''"> and SFST = #{SFST}</if>
  29. <if test="SFSB != null and SFSB != ''"> and SFSB = #{SFSB}</if>
  30. <if test="DKLX != null and DKLX != ''"> and DKLX = #{DKLX}</if>
  31. <if test="YDFKRQ != null "> and YDFKRQ = #{YDFKRQ}</if>
  32. <if test="YDDQRQ != null "> and YDDQRQ = #{YDDQRQ}</if>
  33. <if test="DKKHRQ != null "> and DKKHRQ = #{DKKHRQ}</if>
  34. <if test="SCHKRQ != null "> and SCHKRQ = #{SCHKRQ}</if>
  35. <if test="DKZT != null and DKZT != ''"> and DKZT = #{DKZT}</if>
  36. <if test="DKJQRQ != null "> and DKJQRQ = #{DKJQRQ}</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. </where>
  41. </select>
  42. <select id="selectTgjjBsxxById" parameterType="Long" resultMap="TgjjBsxxResult">
  43. <include refid="selectTgjjBsxxVo"/>
  44. where ID = #{ID}
  45. </select>
  46. <insert id="insertTgjjBsxx" parameterMap="TgjjBsxx" useGeneratedKeys="true" keyProperty="ID">
  47. insert into tgjj_bsxx
  48. <trim prefix="(" suffix=")" suffixOverrides=",">
  49. <include refid="global_name"></include>
  50. <if test="JKHTBH != null">JKHTBH,</if>
  51. <if test="JKRXM != null">JKRXM,</if>
  52. <if test="JKRZJLX != null">JKRZJLX,</if>
  53. <if test="JKRZJH != null">JKRZJH,</if>
  54. <if test="SFST != null">SFST,</if>
  55. <if test="SFSB != null">SFSB,</if>
  56. <if test="DKLX != null">DKLX,</if>
  57. <if test="YDFKRQ != null">YDFKRQ,</if>
  58. <if test="YDDQRQ != null">YDDQRQ,</if>
  59. <if test="DKKHRQ != null">DKKHRQ,</if>
  60. <if test="SCHKRQ != null">SCHKRQ,</if>
  61. <if test="DKZT != null">DKZT,</if>
  62. <if test="DKJQRQ != null">DKJQRQ,</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="JKHTBH != null">#{JKHTBH},</if>
  70. <if test="JKRXM != null">#{JKRXM},</if>
  71. <if test="JKRZJLX != null">#{JKRZJLX},</if>
  72. <if test="JKRZJH != null">#{JKRZJH},</if>
  73. <if test="SFST != null">#{SFST},</if>
  74. <if test="SFSB != null">#{SFSB},</if>
  75. <if test="DKLX != null">#{DKLX},</if>
  76. <if test="YDFKRQ != null">#{YDFKRQ},</if>
  77. <if test="YDDQRQ != null">#{YDDQRQ},</if>
  78. <if test="DKKHRQ != null">#{DKKHRQ},</if>
  79. <if test="SCHKRQ != null">#{SCHKRQ},</if>
  80. <if test="DKZT != null">#{DKZT},</if>
  81. <if test="DKJQRQ != null">#{DKJQRQ},</if>
  82. <if test="ZXBH != null">#{ZXBH},</if>
  83. <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
  84. <if test="CLLX != null">#{CLLX},</if>
  85. </trim>
  86. </insert>
  87. <update id="updateTgjjBsxx" parameterMap="TgjjBsxx">
  88. update tgjj_bsxx
  89. <trim prefix="SET" suffixOverrides=",">
  90. <include refid="update_sql"></include>
  91. <if test="JKHTBH != null">JKHTBH = #{JKHTBH},</if>
  92. <if test="JKRXM != null">JKRXM = #{JKRXM},</if>
  93. <if test="JKRZJLX != null">JKRZJLX = #{JKRZJLX},</if>
  94. <if test="JKRZJH != null">JKRZJH = #{JKRZJH},</if>
  95. <if test="SFST != null">SFST = #{SFST},</if>
  96. <if test="SFSB != null">SFSB = #{SFSB},</if>
  97. <if test="DKLX != null">DKLX = #{DKLX},</if>
  98. <if test="YDFKRQ != null">YDFKRQ = #{YDFKRQ},</if>
  99. <if test="YDDQRQ != null">YDDQRQ = #{YDDQRQ},</if>
  100. <if test="DKKHRQ != null">DKKHRQ = #{DKKHRQ},</if>
  101. <if test="SCHKRQ != null">SCHKRQ = #{SCHKRQ},</if>
  102. <if test="DKZT != null">DKZT = #{DKZT},</if>
  103. <if test="DKJQRQ != null">DKJQRQ = #{DKJQRQ},</if>
  104. <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
  105. <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
  106. <if test="CLLX != null">CLLX = #{CLLX},</if>
  107. </trim>
  108. where ID = #{ID}
  109. </update>
  110. <select id="selectTgjjBsxxList_select_bsxx" resultMap="TgjjBsxxResult" parameterMap="TgjjBsxx">
  111. <include refid="selectTgjjBsxxVo"/>
  112. <where>
  113. <if test="JKRXM != null and JKRXM != ''">
  114. and JKRXM = #{JKRXM}
  115. </if>
  116. <if test="JKRZJH != null and JKRZJH != ''">
  117. and JKRZJH = #{JKRZJH}
  118. </if>
  119. </where>
  120. </select>
  121. </mapper>