DsjNdkpjgMapper.xml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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.DsjNdkpjgMapper">
  4. <resultMap id="BaseResultMap" type="com.ghsc.partybuild.model.DsjNdkpjg">
  5. <id column="NDKPJGBS" jdbcType="VARCHAR" property="ndkpjgbs" />
  6. <result column="ND" jdbcType="DECIMAL" property="nd" />
  7. <result column="YX" jdbcType="DECIMAL" property="yx" />
  8. <result column="LH" jdbcType="DECIMAL" property="lh" />
  9. <result column="HG" jdbcType="DECIMAL" property="hg" />
  10. <result column="BHG" jdbcType="DECIMAL" property="bhg" />
  11. <result column="WCL" jdbcType="DECIMAL" property="wcl" />
  12. <result column="JZP" jdbcType="DECIMAL" property="jzp" />
  13. <result column="DWCX" jdbcType="DECIMAL" property="dwcx" />
  14. </resultMap>
  15. <sql id="Example_Where_Clause">
  16. <where>
  17. <foreach collection="oredCriteria" item="criteria" separator="or">
  18. <if test="criteria.valid">
  19. <trim prefix="(" prefixOverrides="and" suffix=")">
  20. <foreach collection="criteria.criteria" item="criterion">
  21. <choose>
  22. <when test="criterion.noValue">
  23. and ${criterion.condition}
  24. </when>
  25. <when test="criterion.singleValue">
  26. and ${criterion.condition} #{criterion.value}
  27. </when>
  28. <when test="criterion.betweenValue">
  29. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  30. </when>
  31. <when test="criterion.listValue">
  32. and ${criterion.condition}
  33. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  34. #{listItem}
  35. </foreach>
  36. </when>
  37. </choose>
  38. </foreach>
  39. </trim>
  40. </if>
  41. </foreach>
  42. </where>
  43. </sql>
  44. <sql id="Update_By_Example_Where_Clause">
  45. <where>
  46. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  47. <if test="criteria.valid">
  48. <trim prefix="(" prefixOverrides="and" suffix=")">
  49. <foreach collection="criteria.criteria" item="criterion">
  50. <choose>
  51. <when test="criterion.noValue">
  52. and ${criterion.condition}
  53. </when>
  54. <when test="criterion.singleValue">
  55. and ${criterion.condition} #{criterion.value}
  56. </when>
  57. <when test="criterion.betweenValue">
  58. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  59. </when>
  60. <when test="criterion.listValue">
  61. and ${criterion.condition}
  62. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  63. #{listItem}
  64. </foreach>
  65. </when>
  66. </choose>
  67. </foreach>
  68. </trim>
  69. </if>
  70. </foreach>
  71. </where>
  72. </sql>
  73. <sql id="Base_Column_List">
  74. NDKPJGBS, ND, YX, LH, HG, BHG, WCL, JZP, DWCX
  75. </sql>
  76. <select id="selectByExample" parameterType="com.ghsc.partybuild.model.DsjNdkpjgExample" resultMap="BaseResultMap">
  77. select
  78. <if test="distinct">
  79. distinct
  80. </if>
  81. <include refid="Base_Column_List" />
  82. from dsj_ndkpjg
  83. <if test="_parameter != null">
  84. <include refid="Example_Where_Clause" />
  85. </if>
  86. <if test="orderByClause != null">
  87. order by ${orderByClause}
  88. </if>
  89. </select>
  90. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  91. select
  92. <include refid="Base_Column_List" />
  93. from dsj_ndkpjg
  94. where NDKPJGBS = #{ndkpjgbs,jdbcType=VARCHAR}
  95. </select>
  96. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  97. delete from dsj_ndkpjg
  98. where NDKPJGBS = #{ndkpjgbs,jdbcType=VARCHAR}
  99. </delete>
  100. <delete id="deleteByExample" parameterType="com.ghsc.partybuild.model.DsjNdkpjgExample">
  101. delete from dsj_ndkpjg
  102. <if test="_parameter != null">
  103. <include refid="Example_Where_Clause" />
  104. </if>
  105. </delete>
  106. <insert id="insert" parameterType="com.ghsc.partybuild.model.DsjNdkpjg">
  107. insert into dsj_ndkpjg (NDKPJGBS, ND, YX,
  108. LH, HG, BHG, WCL,
  109. JZP, DWCX)
  110. values (#{ndkpjgbs,jdbcType=VARCHAR}, #{nd,jdbcType=DECIMAL}, #{yx,jdbcType=DECIMAL},
  111. #{lh,jdbcType=DECIMAL}, #{hg,jdbcType=DECIMAL}, #{bhg,jdbcType=DECIMAL}, #{wcl,jdbcType=DECIMAL},
  112. #{jzp,jdbcType=DECIMAL}, #{dwcx,jdbcType=DECIMAL})
  113. </insert>
  114. <insert id="insertSelective" parameterType="com.ghsc.partybuild.model.DsjNdkpjg">
  115. insert into dsj_ndkpjg
  116. <trim prefix="(" suffix=")" suffixOverrides=",">
  117. <if test="ndkpjgbs != null">
  118. NDKPJGBS,
  119. </if>
  120. <if test="nd != null">
  121. ND,
  122. </if>
  123. <if test="yx != null">
  124. YX,
  125. </if>
  126. <if test="lh != null">
  127. LH,
  128. </if>
  129. <if test="hg != null">
  130. HG,
  131. </if>
  132. <if test="bhg != null">
  133. BHG,
  134. </if>
  135. <if test="wcl != null">
  136. WCL,
  137. </if>
  138. <if test="jzp != null">
  139. JZP,
  140. </if>
  141. <if test="dwcx != null">
  142. DWCX,
  143. </if>
  144. </trim>
  145. <trim prefix="values (" suffix=")" suffixOverrides=",">
  146. <if test="ndkpjgbs != null">
  147. #{ndkpjgbs,jdbcType=VARCHAR},
  148. </if>
  149. <if test="nd != null">
  150. #{nd,jdbcType=DECIMAL},
  151. </if>
  152. <if test="yx != null">
  153. #{yx,jdbcType=DECIMAL},
  154. </if>
  155. <if test="lh != null">
  156. #{lh,jdbcType=DECIMAL},
  157. </if>
  158. <if test="hg != null">
  159. #{hg,jdbcType=DECIMAL},
  160. </if>
  161. <if test="bhg != null">
  162. #{bhg,jdbcType=DECIMAL},
  163. </if>
  164. <if test="wcl != null">
  165. #{wcl,jdbcType=DECIMAL},
  166. </if>
  167. <if test="jzp != null">
  168. #{jzp,jdbcType=DECIMAL},
  169. </if>
  170. <if test="dwcx != null">
  171. #{dwcx,jdbcType=DECIMAL},
  172. </if>
  173. </trim>
  174. </insert>
  175. <select id="countByExample" parameterType="com.ghsc.partybuild.model.DsjNdkpjgExample" resultType="java.lang.Long">
  176. select count(*) from dsj_ndkpjg
  177. <if test="_parameter != null">
  178. <include refid="Example_Where_Clause" />
  179. </if>
  180. </select>
  181. <update id="updateByExampleSelective" parameterType="map">
  182. update dsj_ndkpjg
  183. <set>
  184. <if test="record.ndkpjgbs != null">
  185. NDKPJGBS = #{record.ndkpjgbs,jdbcType=VARCHAR},
  186. </if>
  187. <if test="record.nd != null">
  188. ND = #{record.nd,jdbcType=DECIMAL},
  189. </if>
  190. <if test="record.yx != null">
  191. YX = #{record.yx,jdbcType=DECIMAL},
  192. </if>
  193. <if test="record.lh != null">
  194. LH = #{record.lh,jdbcType=DECIMAL},
  195. </if>
  196. <if test="record.hg != null">
  197. HG = #{record.hg,jdbcType=DECIMAL},
  198. </if>
  199. <if test="record.bhg != null">
  200. BHG = #{record.bhg,jdbcType=DECIMAL},
  201. </if>
  202. <if test="record.wcl != null">
  203. WCL = #{record.wcl,jdbcType=DECIMAL},
  204. </if>
  205. <if test="record.jzp != null">
  206. JZP = #{record.jzp,jdbcType=DECIMAL},
  207. </if>
  208. <if test="record.dwcx != null">
  209. DWCX = #{record.dwcx,jdbcType=DECIMAL},
  210. </if>
  211. </set>
  212. <if test="_parameter != null">
  213. <include refid="Update_By_Example_Where_Clause" />
  214. </if>
  215. </update>
  216. <update id="updateByExample" parameterType="map">
  217. update dsj_ndkpjg
  218. set NDKPJGBS = #{record.ndkpjgbs,jdbcType=VARCHAR},
  219. ND = #{record.nd,jdbcType=DECIMAL},
  220. YX = #{record.yx,jdbcType=DECIMAL},
  221. LH = #{record.lh,jdbcType=DECIMAL},
  222. HG = #{record.hg,jdbcType=DECIMAL},
  223. BHG = #{record.bhg,jdbcType=DECIMAL},
  224. WCL = #{record.wcl,jdbcType=DECIMAL},
  225. JZP = #{record.jzp,jdbcType=DECIMAL},
  226. DWCX = #{record.dwcx,jdbcType=DECIMAL}
  227. <if test="_parameter != null">
  228. <include refid="Update_By_Example_Where_Clause" />
  229. </if>
  230. </update>
  231. <update id="updateByPrimaryKeySelective" parameterType="com.ghsc.partybuild.model.DsjNdkpjg">
  232. update dsj_ndkpjg
  233. <set>
  234. <if test="nd != null">
  235. ND = #{nd,jdbcType=DECIMAL},
  236. </if>
  237. <if test="yx != null">
  238. YX = #{yx,jdbcType=DECIMAL},
  239. </if>
  240. <if test="lh != null">
  241. LH = #{lh,jdbcType=DECIMAL},
  242. </if>
  243. <if test="hg != null">
  244. HG = #{hg,jdbcType=DECIMAL},
  245. </if>
  246. <if test="bhg != null">
  247. BHG = #{bhg,jdbcType=DECIMAL},
  248. </if>
  249. <if test="wcl != null">
  250. WCL = #{wcl,jdbcType=DECIMAL},
  251. </if>
  252. <if test="jzp != null">
  253. JZP = #{jzp,jdbcType=DECIMAL},
  254. </if>
  255. <if test="dwcx != null">
  256. DWCX = #{dwcx,jdbcType=DECIMAL},
  257. </if>
  258. </set>
  259. where NDKPJGBS = #{ndkpjgbs,jdbcType=VARCHAR}
  260. </update>
  261. <update id="updateByPrimaryKey" parameterType="com.ghsc.partybuild.model.DsjNdkpjg">
  262. update dsj_ndkpjg
  263. set ND = #{nd,jdbcType=DECIMAL},
  264. YX = #{yx,jdbcType=DECIMAL},
  265. LH = #{lh,jdbcType=DECIMAL},
  266. HG = #{hg,jdbcType=DECIMAL},
  267. BHG = #{bhg,jdbcType=DECIMAL},
  268. WCL = #{wcl,jdbcType=DECIMAL},
  269. JZP = #{jzp,jdbcType=DECIMAL},
  270. DWCX = #{dwcx,jdbcType=DECIMAL}
  271. where NDKPJGBS = #{ndkpjgbs,jdbcType=VARCHAR}
  272. </update>
  273. </mapper>