ZzzdZzlbdmnewMapper.xml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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.ZzzdZzlbdmnewMapper">
  4. <resultMap id="BaseResultMap" type="com.ghsc.partybuild.model.ZzzdZzlbdmnew">
  5. <id column="BM" jdbcType="VARCHAR" property="bm" />
  6. <result column="HZMC" jdbcType="VARCHAR" property="hzmc" />
  7. <result column="XH" jdbcType="DECIMAL" property="xh" />
  8. <result column="YL01" jdbcType="VARCHAR" property="yl01" />
  9. <result column="YL02" jdbcType="VARCHAR" property="yl02" />
  10. <result column="YL03" jdbcType="VARCHAR" property="yl03" />
  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, YL01, YL02, YL03
  72. </sql>
  73. <select id="selectByExample" parameterType="com.ghsc.partybuild.model.ZzzdZzlbdmnewExample" resultMap="BaseResultMap">
  74. select
  75. <if test="distinct">
  76. distinct
  77. </if>
  78. <include refid="Base_Column_List" />
  79. from zzzd_zzlbdmnew
  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. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  88. select
  89. <include refid="Base_Column_List" />
  90. from zzzd_zzlbdmnew
  91. where BM = #{bm,jdbcType=VARCHAR}
  92. </select>
  93. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  94. delete from zzzd_zzlbdmnew
  95. where BM = #{bm,jdbcType=VARCHAR}
  96. </delete>
  97. <delete id="deleteByExample" parameterType="com.ghsc.partybuild.model.ZzzdZzlbdmnewExample">
  98. delete from zzzd_zzlbdmnew
  99. <if test="_parameter != null">
  100. <include refid="Example_Where_Clause" />
  101. </if>
  102. </delete>
  103. <insert id="insert" parameterType="com.ghsc.partybuild.model.ZzzdZzlbdmnew">
  104. insert into zzzd_zzlbdmnew (BM, HZMC, XH,
  105. YL01, YL02, YL03)
  106. values (#{bm,jdbcType=VARCHAR}, #{hzmc,jdbcType=VARCHAR}, #{xh,jdbcType=DECIMAL},
  107. #{yl01,jdbcType=VARCHAR}, #{yl02,jdbcType=VARCHAR}, #{yl03,jdbcType=VARCHAR})
  108. </insert>
  109. <insert id="insertSelective" parameterType="com.ghsc.partybuild.model.ZzzdZzlbdmnew">
  110. insert into zzzd_zzlbdmnew
  111. <trim prefix="(" suffix=")" suffixOverrides=",">
  112. <if test="bm != null">
  113. BM,
  114. </if>
  115. <if test="hzmc != null">
  116. HZMC,
  117. </if>
  118. <if test="xh != null">
  119. XH,
  120. </if>
  121. <if test="yl01 != null">
  122. YL01,
  123. </if>
  124. <if test="yl02 != null">
  125. YL02,
  126. </if>
  127. <if test="yl03 != null">
  128. YL03,
  129. </if>
  130. </trim>
  131. <trim prefix="values (" suffix=")" suffixOverrides=",">
  132. <if test="bm != null">
  133. #{bm,jdbcType=VARCHAR},
  134. </if>
  135. <if test="hzmc != null">
  136. #{hzmc,jdbcType=VARCHAR},
  137. </if>
  138. <if test="xh != null">
  139. #{xh,jdbcType=DECIMAL},
  140. </if>
  141. <if test="yl01 != null">
  142. #{yl01,jdbcType=VARCHAR},
  143. </if>
  144. <if test="yl02 != null">
  145. #{yl02,jdbcType=VARCHAR},
  146. </if>
  147. <if test="yl03 != null">
  148. #{yl03,jdbcType=VARCHAR},
  149. </if>
  150. </trim>
  151. </insert>
  152. <select id="countByExample" parameterType="com.ghsc.partybuild.model.ZzzdZzlbdmnewExample" resultType="java.lang.Long">
  153. select count(*) from zzzd_zzlbdmnew
  154. <if test="_parameter != null">
  155. <include refid="Example_Where_Clause" />
  156. </if>
  157. </select>
  158. <update id="updateByExampleSelective" parameterType="map">
  159. update zzzd_zzlbdmnew
  160. <set>
  161. <if test="record.bm != null">
  162. BM = #{record.bm,jdbcType=VARCHAR},
  163. </if>
  164. <if test="record.hzmc != null">
  165. HZMC = #{record.hzmc,jdbcType=VARCHAR},
  166. </if>
  167. <if test="record.xh != null">
  168. XH = #{record.xh,jdbcType=DECIMAL},
  169. </if>
  170. <if test="record.yl01 != null">
  171. YL01 = #{record.yl01,jdbcType=VARCHAR},
  172. </if>
  173. <if test="record.yl02 != null">
  174. YL02 = #{record.yl02,jdbcType=VARCHAR},
  175. </if>
  176. <if test="record.yl03 != null">
  177. YL03 = #{record.yl03,jdbcType=VARCHAR},
  178. </if>
  179. </set>
  180. <if test="_parameter != null">
  181. <include refid="Update_By_Example_Where_Clause" />
  182. </if>
  183. </update>
  184. <update id="updateByExample" parameterType="map">
  185. update zzzd_zzlbdmnew
  186. set BM = #{record.bm,jdbcType=VARCHAR},
  187. HZMC = #{record.hzmc,jdbcType=VARCHAR},
  188. XH = #{record.xh,jdbcType=DECIMAL},
  189. YL01 = #{record.yl01,jdbcType=VARCHAR},
  190. YL02 = #{record.yl02,jdbcType=VARCHAR},
  191. YL03 = #{record.yl03,jdbcType=VARCHAR}
  192. <if test="_parameter != null">
  193. <include refid="Update_By_Example_Where_Clause" />
  194. </if>
  195. </update>
  196. <update id="updateByPrimaryKeySelective" parameterType="com.ghsc.partybuild.model.ZzzdZzlbdmnew">
  197. update zzzd_zzlbdmnew
  198. <set>
  199. <if test="hzmc != null">
  200. HZMC = #{hzmc,jdbcType=VARCHAR},
  201. </if>
  202. <if test="xh != null">
  203. XH = #{xh,jdbcType=DECIMAL},
  204. </if>
  205. <if test="yl01 != null">
  206. YL01 = #{yl01,jdbcType=VARCHAR},
  207. </if>
  208. <if test="yl02 != null">
  209. YL02 = #{yl02,jdbcType=VARCHAR},
  210. </if>
  211. <if test="yl03 != null">
  212. YL03 = #{yl03,jdbcType=VARCHAR},
  213. </if>
  214. </set>
  215. where BM = #{bm,jdbcType=VARCHAR}
  216. </update>
  217. <update id="updateByPrimaryKey" parameterType="com.ghsc.partybuild.model.ZzzdZzlbdmnew">
  218. update zzzd_zzlbdmnew
  219. set HZMC = #{hzmc,jdbcType=VARCHAR},
  220. XH = #{xh,jdbcType=DECIMAL},
  221. YL01 = #{yl01,jdbcType=VARCHAR},
  222. YL02 = #{yl02,jdbcType=VARCHAR},
  223. YL03 = #{yl03,jdbcType=VARCHAR}
  224. where BM = #{bm,jdbcType=VARCHAR}
  225. </update>
  226. </mapper>