ZzzdGzgwMapper.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.ghsc.partybuild.mapper.ZzzdGzgwMapper">
  4. <resultMap id="BaseResultMap" type="com.ghsc.partybuild.model.ZzzdGzgw">
  5. <result column="BM" jdbcType="VARCHAR" property="bm" />
  6. <result column="HZMC" jdbcType="VARCHAR" property="hzmc" />
  7. <result column="XH" jdbcType="INTEGER" property="xh" />
  8. <result column="Y101" jdbcType="VARCHAR" property="y101" />
  9. <result column="Y102" jdbcType="VARCHAR" property="y102" />
  10. <result column="Y103" jdbcType="VARCHAR" property="y103" />
  11. </resultMap>
  12. <sql id="Example_Where_Clause">
  13. <where>
  14. <foreach collection="oredCriteria" item="criteria" separator="or">
  15. <if test="criteria.valid">
  16. <trim prefix="(" prefixOverrides="and" suffix=")">
  17. <foreach collection="criteria.criteria" item="criterion">
  18. <choose>
  19. <when test="criterion.noValue">
  20. and ${criterion.condition}
  21. </when>
  22. <when test="criterion.singleValue">
  23. and ${criterion.condition} #{criterion.value}
  24. </when>
  25. <when test="criterion.betweenValue">
  26. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  27. </when>
  28. <when test="criterion.listValue">
  29. and ${criterion.condition}
  30. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  31. #{listItem}
  32. </foreach>
  33. </when>
  34. </choose>
  35. </foreach>
  36. </trim>
  37. </if>
  38. </foreach>
  39. </where>
  40. </sql>
  41. <sql id="Update_By_Example_Where_Clause">
  42. <where>
  43. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  44. <if test="criteria.valid">
  45. <trim prefix="(" prefixOverrides="and" suffix=")">
  46. <foreach collection="criteria.criteria" item="criterion">
  47. <choose>
  48. <when test="criterion.noValue">
  49. and ${criterion.condition}
  50. </when>
  51. <when test="criterion.singleValue">
  52. and ${criterion.condition} #{criterion.value}
  53. </when>
  54. <when test="criterion.betweenValue">
  55. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  56. </when>
  57. <when test="criterion.listValue">
  58. and ${criterion.condition}
  59. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  60. #{listItem}
  61. </foreach>
  62. </when>
  63. </choose>
  64. </foreach>
  65. </trim>
  66. </if>
  67. </foreach>
  68. </where>
  69. </sql>
  70. <sql id="Base_Column_List">
  71. BM, HZMC, XH, Y101, Y102, Y103
  72. </sql>
  73. <select id="selectByExample" parameterType="com.ghsc.partybuild.model.ZzzdGzgwExample" resultMap="BaseResultMap">
  74. select
  75. <if test="distinct">
  76. distinct
  77. </if>
  78. <include refid="Base_Column_List" />
  79. from zzzd_gzgw
  80. <if test="_parameter != null">
  81. <include refid="Example_Where_Clause" />
  82. </if>
  83. <if test="orderByClause != null">
  84. order by ${orderByClause}
  85. </if>
  86. </select>
  87. <delete id="deleteByExample" parameterType="com.ghsc.partybuild.model.ZzzdGzgwExample">
  88. delete from zzzd_gzgw
  89. <if test="_parameter != null">
  90. <include refid="Example_Where_Clause" />
  91. </if>
  92. </delete>
  93. <insert id="insert" parameterType="com.ghsc.partybuild.model.ZzzdGzgw">
  94. insert into zzzd_gzgw (BM, HZMC, XH,
  95. Y101, Y102, Y103)
  96. values (#{bm,jdbcType=VARCHAR}, #{hzmc,jdbcType=VARCHAR}, #{xh,jdbcType=INTEGER},
  97. #{y101,jdbcType=VARCHAR}, #{y102,jdbcType=VARCHAR}, #{y103,jdbcType=VARCHAR})
  98. </insert>
  99. <insert id="insertSelective" parameterType="com.ghsc.partybuild.model.ZzzdGzgw">
  100. insert into zzzd_gzgw
  101. <trim prefix="(" suffix=")" suffixOverrides=",">
  102. <if test="bm != null">
  103. BM,
  104. </if>
  105. <if test="hzmc != null">
  106. HZMC,
  107. </if>
  108. <if test="xh != null">
  109. XH,
  110. </if>
  111. <if test="y101 != null">
  112. Y101,
  113. </if>
  114. <if test="y102 != null">
  115. Y102,
  116. </if>
  117. <if test="y103 != null">
  118. Y103,
  119. </if>
  120. </trim>
  121. <trim prefix="values (" suffix=")" suffixOverrides=",">
  122. <if test="bm != null">
  123. #{bm,jdbcType=VARCHAR},
  124. </if>
  125. <if test="hzmc != null">
  126. #{hzmc,jdbcType=VARCHAR},
  127. </if>
  128. <if test="xh != null">
  129. #{xh,jdbcType=INTEGER},
  130. </if>
  131. <if test="y101 != null">
  132. #{y101,jdbcType=VARCHAR},
  133. </if>
  134. <if test="y102 != null">
  135. #{y102,jdbcType=VARCHAR},
  136. </if>
  137. <if test="y103 != null">
  138. #{y103,jdbcType=VARCHAR},
  139. </if>
  140. </trim>
  141. </insert>
  142. <select id="countByExample" parameterType="com.ghsc.partybuild.model.ZzzdGzgwExample" resultType="java.lang.Long">
  143. select count(*) from zzzd_gzgw
  144. <if test="_parameter != null">
  145. <include refid="Example_Where_Clause" />
  146. </if>
  147. </select>
  148. <update id="updateByExampleSelective" parameterType="map">
  149. update zzzd_gzgw
  150. <set>
  151. <if test="record.bm != null">
  152. BM = #{record.bm,jdbcType=VARCHAR},
  153. </if>
  154. <if test="record.hzmc != null">
  155. HZMC = #{record.hzmc,jdbcType=VARCHAR},
  156. </if>
  157. <if test="record.xh != null">
  158. XH = #{record.xh,jdbcType=INTEGER},
  159. </if>
  160. <if test="record.y101 != null">
  161. Y101 = #{record.y101,jdbcType=VARCHAR},
  162. </if>
  163. <if test="record.y102 != null">
  164. Y102 = #{record.y102,jdbcType=VARCHAR},
  165. </if>
  166. <if test="record.y103 != null">
  167. Y103 = #{record.y103,jdbcType=VARCHAR},
  168. </if>
  169. </set>
  170. <if test="_parameter != null">
  171. <include refid="Update_By_Example_Where_Clause" />
  172. </if>
  173. </update>
  174. <update id="updateByExample" parameterType="map">
  175. update zzzd_gzgw
  176. set BM = #{record.bm,jdbcType=VARCHAR},
  177. HZMC = #{record.hzmc,jdbcType=VARCHAR},
  178. XH = #{record.xh,jdbcType=INTEGER},
  179. Y101 = #{record.y101,jdbcType=VARCHAR},
  180. Y102 = #{record.y102,jdbcType=VARCHAR},
  181. Y103 = #{record.y103,jdbcType=VARCHAR}
  182. <if test="_parameter != null">
  183. <include refid="Update_By_Example_Where_Clause" />
  184. </if>
  185. </update>
  186. </mapper>