TgjjHmdxxMapper.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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.TgjjHmdxxMapper">
  6. <resultMap type="com.sooka.model.bo.TgjjHmdxx" id="TgjjHmdxxResult">
  7. </resultMap>
  8. <parameterMap id="TgjjHmdxx" type="com.sooka.model.bo.TgjjHmdxx"></parameterMap>
  9. <sql id="selectTgjjHmdxxVo">
  10. select ID, BLJLID, XINGMING, ZJLX, ZJHM, BLXXFL, BLXXDJ, BLXXZT, START_TIME, END_TIME, SYMS, ZXBH, LXYQQS, LAST_UPDATE_TIME lastUpdateTime, CLLX from tgjj_hmdxx
  11. </sql>
  12. <select id="selectTgjjHmdxxList" parameterMap="TgjjHmdxx" resultMap="TgjjHmdxxResult">
  13. <include refid="selectTgjjHmdxxVo"/>
  14. <where>
  15. <if test="BLJLID != null and BLJLID != ''"> and BLJLID = #{BLJLID}</if>
  16. <if test="XINGMING != null and XINGMING != ''"> and XINGMING = #{XINGMING}</if>
  17. <if test="ZJLX != null and ZJLX != ''"> and ZJLX = #{ZJLX}</if>
  18. <if test="ZJHM != null and ZJHM != ''"> and ZJHM = #{ZJHM}</if>
  19. <if test="BLXXFL != null and BLXXFL != ''"> and BLXXFL = #{BLXXFL}</if>
  20. <if test="BLXXDJ != null and BLXXDJ != ''"> and BLXXDJ = #{BLXXDJ}</if>
  21. <if test="BLXXZT != null and BLXXZT != ''"> and BLXXZT = #{BLXXZT}</if>
  22. <if test="startTime != null "> and START_TIME = #{startTime}</if>
  23. <if test="endTime != null "> and END_TIME = #{endTime}</if>
  24. <if test="SYMS != null and SYMS != ''"> and SYMS = #{SYMS}</if>
  25. <if test="ZXBH != null and ZXBH != ''"> and ZXBH = #{ZXBH}</if>
  26. <if test="LXYQQS != null "> and LXYQQS = #{LXYQQS}</if>
  27. <if test="lastUpdateTime != null "> and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
  28. <if test="CLLX != null "> and CLLX = #{CLLX}</if>
  29. <if test="search_begintime != null"> and LAST_UPDATE_TIME >= #{search_begintime}</if>
  30. <if test="search_endtime != null"> and LAST_UPDATE_TIME &lt; #{search_endtime}</if>
  31. </where>
  32. </select>
  33. <select id="selectTgjjHmdxxById" parameterType="Long" resultMap="TgjjHmdxxResult">
  34. <include refid="selectTgjjHmdxxVo"/>
  35. where ID = #{ID}
  36. </select>
  37. <insert id="insertTgjjHmdxx" parameterMap="TgjjHmdxx" useGeneratedKeys="true" keyProperty="ID">
  38. insert into tgjj_hmdxx
  39. <trim prefix="(" suffix=")" suffixOverrides=",">
  40. <if test="ID != null">ID,</if>
  41. <if test="BLJLID != null">BLJLID,</if>
  42. <if test="XINGMING != null">XINGMING,</if>
  43. <if test="ZJLX != null">ZJLX,</if>
  44. <if test="ZJHM != null">ZJHM,</if>
  45. <if test="BLXXFL != null">BLXXFL,</if>
  46. <if test="BLXXDJ != null">BLXXDJ,</if>
  47. <if test="BLXXZT != null">BLXXZT,</if>
  48. <if test="startTime != null">START_TIME,</if>
  49. <if test="endTime != null">END_TIME,</if>
  50. <if test="SYMS != null">SYMS,</if>
  51. <if test="ZXBH != null">ZXBH,</if>
  52. <if test="LXYQQS != null">LXYQQS,</if>
  53. <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
  54. <if test="CLLX != null">CLLX,</if>
  55. </trim>
  56. <trim prefix="values (" suffix=")" suffixOverrides=",">
  57. <if test="ID != null">#{ID},</if>
  58. <if test="BLJLID != null">#{BLJLID},</if>
  59. <if test="XINGMING != null">#{XINGMING},</if>
  60. <if test="ZJLX != null">#{ZJLX},</if>
  61. <if test="ZJHM != null">#{ZJHM},</if>
  62. <if test="BLXXFL != null">#{BLXXFL},</if>
  63. <if test="BLXXDJ != null">#{BLXXDJ},</if>
  64. <if test="BLXXZT != null">#{BLXXZT},</if>
  65. <if test="startTime != null">#{startTime},</if>
  66. <if test="endTime != null">#{endTime},</if>
  67. <if test="SYMS != null">#{SYMS},</if>
  68. <if test="ZXBH != null">#{ZXBH},</if>
  69. <if test="LXYQQS != null">#{LXYQQS},</if>
  70. <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
  71. <if test="CLLX != null">#{CLLX},</if>
  72. </trim>
  73. </insert>
  74. <update id="updateTgjjHmdxx" parameterMap="TgjjHmdxx">
  75. update tgjj_hmdxx
  76. <trim prefix="SET" suffixOverrides=",">
  77. <if test="BLJLID != null">BLJLID = #{BLJLID},</if>
  78. <if test="XINGMING != null">XINGMING = #{XINGMING},</if>
  79. <if test="ZJLX != null">ZJLX = #{ZJLX},</if>
  80. <if test="ZJHM != null">ZJHM = #{ZJHM},</if>
  81. <if test="BLXXFL != null">BLXXFL = #{BLXXFL},</if>
  82. <if test="BLXXDJ != null">BLXXDJ = #{BLXXDJ},</if>
  83. <if test="BLXXZT != null">BLXXZT = #{BLXXZT},</if>
  84. <if test="startTime != null">START_TIME = #{startTime},</if>
  85. <if test="endTime != null">END_TIME = #{endTime},</if>
  86. <if test="SYMS != null">SYMS = #{SYMS},</if>
  87. <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
  88. <if test="LXYQQS != null">LXYQQS = #{LXYQQS},</if>
  89. <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
  90. <if test="CLLX != null">CLLX = #{CLLX},</if>
  91. </trim>
  92. where ID = #{ID}
  93. </update>
  94. </mapper>