TgjjHmdxxMapper2.xml 5.8 KB

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