TgjjDwzhxxMapper.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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.TgjjDwzhxxMapper">
  6. <resultMap type="com.sooka.model.bo.TgjjDwzhxx" id="TgjjDwzhxxResult">
  7. </resultMap>
  8. <parameterMap id="TgjjDwzhxx" type="com.sooka.model.bo.TgjjDwzhxx"></parameterMap>
  9. <sql id="selectTgjjDwzhxxVo">
  10. select ID, DWZH, DWJCBL, GRJCBL, DWJCRS, DWFCRS, DWZHYE, DWXHRQ, DWXHYY, DWZHZT, JZNY, ZXBH, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_dwzhxx
  11. </sql>
  12. <select id="selectTgjjDwzhxxList" parameterMap="TgjjDwzhxx" resultMap="TgjjDwzhxxResult">
  13. <include refid="selectTgjjDwzhxxVo"/>
  14. <where>
  15. <if test="DWZH != null and DWZH != ''"> and DWZH = #{DWZH}</if>
  16. <if test="DWJCBL != null "> and DWJCBL = #{DWJCBL}</if>
  17. <if test="GRJCBL != null "> and GRJCBL = #{GRJCBL}</if>
  18. <if test="DWJCRS != null "> and DWJCRS = #{DWJCRS}</if>
  19. <if test="DWFCRS != null "> and DWFCRS = #{DWFCRS}</if>
  20. <if test="DWZHYE != null "> and DWZHYE = #{DWZHYE}</if>
  21. <if test="DWXHRQ != null "> and DWXHRQ = #{DWXHRQ}</if>
  22. <if test="DWXHYY != null and DWXHYY != ''"> and DWXHYY = #{DWXHYY}</if>
  23. <if test="DWZHZT != null and DWZHZT != ''"> and DWZHZT = #{DWZHZT}</if>
  24. <if test="JZNY != null and JZNY != ''"> and JZNY = #{JZNY}</if>
  25. <if test="ZXBH != null and ZXBH != ''"> and ZXBH = #{ZXBH}</if>
  26. <if test="lastUpdateTime != null "> and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
  27. <if test="CLLX != null "> and CLLX = #{CLLX}</if>
  28. <if test="search_begintime != null"> and LAST_UPDATE_TIME >= #{search_begintime}</if>
  29. <if test="search_endtime != null"> and LAST_UPDATE_TIME &lt; #{search_endtime}</if>
  30. </where>
  31. </select>
  32. <select id="selectTgjjDwzhxxById" parameterType="Long" resultMap="TgjjDwzhxxResult">
  33. <include refid="selectTgjjDwzhxxVo"/>
  34. where ID = #{ID}
  35. </select>
  36. <insert id="insertTgjjDwzhxx" parameterMap="TgjjDwzhxx" useGeneratedKeys="true" keyProperty="ID">
  37. insert into tgjj_dwzhxx
  38. <trim prefix="(" suffix=")" suffixOverrides=",">
  39. <if test="ID != null">ID,</if>
  40. <if test="DWZH != null">DWZH,</if>
  41. <if test="DWJCBL != null">DWJCBL,</if>
  42. <if test="GRJCBL != null">GRJCBL,</if>
  43. <if test="DWJCRS != null">DWJCRS,</if>
  44. <if test="DWFCRS != null">DWFCRS,</if>
  45. <if test="DWZHYE != null">DWZHYE,</if>
  46. <if test="DWXHRQ != null">DWXHRQ,</if>
  47. <if test="DWXHYY != null">DWXHYY,</if>
  48. <if test="DWZHZT != null">DWZHZT,</if>
  49. <if test="JZNY != null">JZNY,</if>
  50. <if test="ZXBH != null">ZXBH,</if>
  51. <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
  52. <if test="CLLX != null">CLLX,</if>
  53. </trim>
  54. <trim prefix="values (" suffix=")" suffixOverrides=",">
  55. <if test="ID != null">#{ID},</if>
  56. <if test="DWZH != null">#{DWZH},</if>
  57. <if test="DWJCBL != null">#{DWJCBL},</if>
  58. <if test="GRJCBL != null">#{GRJCBL},</if>
  59. <if test="DWJCRS != null">#{DWJCRS},</if>
  60. <if test="DWFCRS != null">#{DWFCRS},</if>
  61. <if test="DWZHYE != null">#{DWZHYE},</if>
  62. <if test="DWXHRQ != null">#{DWXHRQ},</if>
  63. <if test="DWXHYY != null">#{DWXHYY},</if>
  64. <if test="DWZHZT != null">#{DWZHZT},</if>
  65. <if test="JZNY != null">#{JZNY},</if>
  66. <if test="ZXBH != null">#{ZXBH},</if>
  67. <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
  68. <if test="CLLX != null">#{CLLX},</if>
  69. </trim>
  70. </insert>
  71. <update id="updateTgjjDwzhxx" parameterMap="TgjjDwzhxx">
  72. update tgjj_dwzhxx
  73. <trim prefix="SET" suffixOverrides=",">
  74. <if test="DWZH != null">DWZH = #{DWZH},</if>
  75. <if test="DWJCBL != null">DWJCBL = #{DWJCBL},</if>
  76. <if test="GRJCBL != null">GRJCBL = #{GRJCBL},</if>
  77. <if test="DWJCRS != null">DWJCRS = #{DWJCRS},</if>
  78. <if test="DWFCRS != null">DWFCRS = #{DWFCRS},</if>
  79. <if test="DWZHYE != null">DWZHYE = #{DWZHYE},</if>
  80. <if test="DWXHRQ != null">DWXHRQ = #{DWXHRQ},</if>
  81. <if test="DWXHYY != null">DWXHYY = #{DWXHYY},</if>
  82. <if test="DWZHZT != null">DWZHZT = #{DWZHZT},</if>
  83. <if test="JZNY != null">JZNY = #{JZNY},</if>
  84. <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
  85. <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
  86. <if test="CLLX != null">CLLX = #{CLLX},</if>
  87. </trim>
  88. where ID = #{ID}
  89. </update>
  90. </mapper>