UsPartyduesMapper.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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.UsPartyduesMapper">
  4. <resultMap id="BaseResultMap" type="com.ghsc.partybuild.model.UsPartydues">
  5. <id column="PARTYDUESID" jdbcType="VARCHAR" property="partyduesid" />
  6. <result column="YEAR" jdbcType="DECIMAL" property="year" />
  7. <result column="USERNAME" jdbcType="VARCHAR" property="username" />
  8. <result column="USERCODE" jdbcType="VARCHAR" property="usercode" />
  9. <result column="PARTYNAME" jdbcType="VARCHAR" property="partyname" />
  10. <result column="PARTYCODE" jdbcType="VARCHAR" property="partycode" />
  11. <result column="BASENUMBER" jdbcType="VARCHAR" property="basenumber" />
  12. <result column="MONEY" jdbcType="DECIMAL" property="money" />
  13. <result column="CREATETIME" jdbcType="TIMESTAMP" property="createtime" />
  14. <result column="CREATEUSERID" jdbcType="VARCHAR" property="createuserid" />
  15. <result column="CREATEUSERNAME" jdbcType="VARCHAR" property="createusername" />
  16. <result column="UPDATETIME" jdbcType="TIMESTAMP" property="updatetime" />
  17. <result column="UPDATEUSERID" jdbcType="VARCHAR" property="updateuserid" />
  18. <result column="UPDATEUSERNAME" jdbcType="VARCHAR" property="updateusername" />
  19. <result column="OPERATETIME" jdbcType="TIMESTAMP" property="operatetime" />
  20. <result column="OPERATESTATE" jdbcType="VARCHAR" property="operatestate" />
  21. <result column="SYNCSTATE" jdbcType="VARCHAR" property="syncstate" />
  22. </resultMap>
  23. <sql id="Example_Where_Clause">
  24. <where>
  25. <foreach collection="oredCriteria" item="criteria" separator="or">
  26. <if test="criteria.valid">
  27. <trim prefix="(" prefixOverrides="and" suffix=")">
  28. <foreach collection="criteria.criteria" item="criterion">
  29. <choose>
  30. <when test="criterion.noValue">
  31. and ${criterion.condition}
  32. </when>
  33. <when test="criterion.singleValue">
  34. and ${criterion.condition} #{criterion.value}
  35. </when>
  36. <when test="criterion.betweenValue">
  37. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  38. </when>
  39. <when test="criterion.listValue">
  40. and ${criterion.condition}
  41. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  42. #{listItem}
  43. </foreach>
  44. </when>
  45. </choose>
  46. </foreach>
  47. </trim>
  48. </if>
  49. </foreach>
  50. </where>
  51. </sql>
  52. <sql id="Update_By_Example_Where_Clause">
  53. <where>
  54. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  55. <if test="criteria.valid">
  56. <trim prefix="(" prefixOverrides="and" suffix=")">
  57. <foreach collection="criteria.criteria" item="criterion">
  58. <choose>
  59. <when test="criterion.noValue">
  60. and ${criterion.condition}
  61. </when>
  62. <when test="criterion.singleValue">
  63. and ${criterion.condition} #{criterion.value}
  64. </when>
  65. <when test="criterion.betweenValue">
  66. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  67. </when>
  68. <when test="criterion.listValue">
  69. and ${criterion.condition}
  70. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  71. #{listItem}
  72. </foreach>
  73. </when>
  74. </choose>
  75. </foreach>
  76. </trim>
  77. </if>
  78. </foreach>
  79. </where>
  80. </sql>
  81. <sql id="Base_Column_List">
  82. PARTYDUESID, YEAR, USERNAME, USERCODE, PARTYNAME, PARTYCODE, BASENUMBER, MONEY, CREATETIME,
  83. CREATEUSERID, CREATEUSERNAME, UPDATETIME, UPDATEUSERID, UPDATEUSERNAME, OPERATETIME,
  84. OPERATESTATE, SYNCSTATE
  85. </sql>
  86. <select id="selectByExample" parameterType="com.ghsc.partybuild.model.UsPartyduesExample" resultMap="BaseResultMap">
  87. select
  88. <if test="distinct">
  89. distinct
  90. </if>
  91. <include refid="Base_Column_List" />
  92. from us_partydues
  93. <if test="_parameter != null">
  94. <include refid="Example_Where_Clause" />
  95. </if>
  96. <if test="orderByClause != null">
  97. order by ${orderByClause}
  98. </if>
  99. </select>
  100. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  101. select
  102. <include refid="Base_Column_List" />
  103. from us_partydues
  104. where PARTYDUESID = #{partyduesid,jdbcType=VARCHAR}
  105. </select>
  106. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  107. delete from us_partydues
  108. where PARTYDUESID = #{partyduesid,jdbcType=VARCHAR}
  109. </delete>
  110. <delete id="deleteByExample" parameterType="com.ghsc.partybuild.model.UsPartyduesExample">
  111. delete from us_partydues
  112. <if test="_parameter != null">
  113. <include refid="Example_Where_Clause" />
  114. </if>
  115. </delete>
  116. <insert id="insert" parameterType="com.ghsc.partybuild.model.UsPartydues">
  117. insert into us_partydues (PARTYDUESID, YEAR, USERNAME,
  118. USERCODE, PARTYNAME, PARTYCODE,
  119. BASENUMBER, MONEY, CREATETIME,
  120. CREATEUSERID, CREATEUSERNAME, UPDATETIME,
  121. UPDATEUSERID, UPDATEUSERNAME, OPERATETIME,
  122. OPERATESTATE, SYNCSTATE)
  123. values (#{partyduesid,jdbcType=VARCHAR}, #{year,jdbcType=DECIMAL}, #{username,jdbcType=VARCHAR},
  124. #{usercode,jdbcType=VARCHAR}, #{partyname,jdbcType=VARCHAR}, #{partycode,jdbcType=VARCHAR},
  125. #{basenumber,jdbcType=VARCHAR}, #{money,jdbcType=DECIMAL}, #{createtime,jdbcType=TIMESTAMP},
  126. #{createuserid,jdbcType=VARCHAR}, #{createusername,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP},
  127. #{updateuserid,jdbcType=VARCHAR}, #{updateusername,jdbcType=VARCHAR}, #{operatetime,jdbcType=TIMESTAMP},
  128. #{operatestate,jdbcType=VARCHAR}, #{syncstate,jdbcType=VARCHAR})
  129. </insert>
  130. <insert id="insertSelective" parameterType="com.ghsc.partybuild.model.UsPartydues">
  131. insert into us_partydues
  132. <trim prefix="(" suffix=")" suffixOverrides=",">
  133. <if test="partyduesid != null">
  134. PARTYDUESID,
  135. </if>
  136. <if test="year != null">
  137. YEAR,
  138. </if>
  139. <if test="username != null">
  140. USERNAME,
  141. </if>
  142. <if test="usercode != null">
  143. USERCODE,
  144. </if>
  145. <if test="partyname != null">
  146. PARTYNAME,
  147. </if>
  148. <if test="partycode != null">
  149. PARTYCODE,
  150. </if>
  151. <if test="basenumber != null">
  152. BASENUMBER,
  153. </if>
  154. <if test="money != null">
  155. MONEY,
  156. </if>
  157. <if test="createtime != null">
  158. CREATETIME,
  159. </if>
  160. <if test="createuserid != null">
  161. CREATEUSERID,
  162. </if>
  163. <if test="createusername != null">
  164. CREATEUSERNAME,
  165. </if>
  166. <if test="updatetime != null">
  167. UPDATETIME,
  168. </if>
  169. <if test="updateuserid != null">
  170. UPDATEUSERID,
  171. </if>
  172. <if test="updateusername != null">
  173. UPDATEUSERNAME,
  174. </if>
  175. <if test="operatetime != null">
  176. OPERATETIME,
  177. </if>
  178. <if test="operatestate != null">
  179. OPERATESTATE,
  180. </if>
  181. <if test="syncstate != null">
  182. SYNCSTATE,
  183. </if>
  184. </trim>
  185. <trim prefix="values (" suffix=")" suffixOverrides=",">
  186. <if test="partyduesid != null">
  187. #{partyduesid,jdbcType=VARCHAR},
  188. </if>
  189. <if test="year != null">
  190. #{year,jdbcType=DECIMAL},
  191. </if>
  192. <if test="username != null">
  193. #{username,jdbcType=VARCHAR},
  194. </if>
  195. <if test="usercode != null">
  196. #{usercode,jdbcType=VARCHAR},
  197. </if>
  198. <if test="partyname != null">
  199. #{partyname,jdbcType=VARCHAR},
  200. </if>
  201. <if test="partycode != null">
  202. #{partycode,jdbcType=VARCHAR},
  203. </if>
  204. <if test="basenumber != null">
  205. #{basenumber,jdbcType=VARCHAR},
  206. </if>
  207. <if test="money != null">
  208. #{money,jdbcType=DECIMAL},
  209. </if>
  210. <if test="createtime != null">
  211. #{createtime,jdbcType=TIMESTAMP},
  212. </if>
  213. <if test="createuserid != null">
  214. #{createuserid,jdbcType=VARCHAR},
  215. </if>
  216. <if test="createusername != null">
  217. #{createusername,jdbcType=VARCHAR},
  218. </if>
  219. <if test="updatetime != null">
  220. #{updatetime,jdbcType=TIMESTAMP},
  221. </if>
  222. <if test="updateuserid != null">
  223. #{updateuserid,jdbcType=VARCHAR},
  224. </if>
  225. <if test="updateusername != null">
  226. #{updateusername,jdbcType=VARCHAR},
  227. </if>
  228. <if test="operatetime != null">
  229. #{operatetime,jdbcType=TIMESTAMP},
  230. </if>
  231. <if test="operatestate != null">
  232. #{operatestate,jdbcType=VARCHAR},
  233. </if>
  234. <if test="syncstate != null">
  235. #{syncstate,jdbcType=VARCHAR},
  236. </if>
  237. </trim>
  238. </insert>
  239. <select id="countByExample" parameterType="com.ghsc.partybuild.model.UsPartyduesExample" resultType="java.lang.Long">
  240. select count(*) from us_partydues
  241. <if test="_parameter != null">
  242. <include refid="Example_Where_Clause" />
  243. </if>
  244. </select>
  245. <update id="updateByExampleSelective" parameterType="map">
  246. update us_partydues
  247. <set>
  248. <if test="record.partyduesid != null">
  249. PARTYDUESID = #{record.partyduesid,jdbcType=VARCHAR},
  250. </if>
  251. <if test="record.year != null">
  252. YEAR = #{record.year,jdbcType=DECIMAL},
  253. </if>
  254. <if test="record.username != null">
  255. USERNAME = #{record.username,jdbcType=VARCHAR},
  256. </if>
  257. <if test="record.usercode != null">
  258. USERCODE = #{record.usercode,jdbcType=VARCHAR},
  259. </if>
  260. <if test="record.partyname != null">
  261. PARTYNAME = #{record.partyname,jdbcType=VARCHAR},
  262. </if>
  263. <if test="record.partycode != null">
  264. PARTYCODE = #{record.partycode,jdbcType=VARCHAR},
  265. </if>
  266. <if test="record.basenumber != null">
  267. BASENUMBER = #{record.basenumber,jdbcType=VARCHAR},
  268. </if>
  269. <if test="record.money != null">
  270. MONEY = #{record.money,jdbcType=DECIMAL},
  271. </if>
  272. <if test="record.createtime != null">
  273. CREATETIME = #{record.createtime,jdbcType=TIMESTAMP},
  274. </if>
  275. <if test="record.createuserid != null">
  276. CREATEUSERID = #{record.createuserid,jdbcType=VARCHAR},
  277. </if>
  278. <if test="record.createusername != null">
  279. CREATEUSERNAME = #{record.createusername,jdbcType=VARCHAR},
  280. </if>
  281. <if test="record.updatetime != null">
  282. UPDATETIME = #{record.updatetime,jdbcType=TIMESTAMP},
  283. </if>
  284. <if test="record.updateuserid != null">
  285. UPDATEUSERID = #{record.updateuserid,jdbcType=VARCHAR},
  286. </if>
  287. <if test="record.updateusername != null">
  288. UPDATEUSERNAME = #{record.updateusername,jdbcType=VARCHAR},
  289. </if>
  290. <if test="record.operatetime != null">
  291. OPERATETIME = #{record.operatetime,jdbcType=TIMESTAMP},
  292. </if>
  293. <if test="record.operatestate != null">
  294. OPERATESTATE = #{record.operatestate,jdbcType=VARCHAR},
  295. </if>
  296. <if test="record.syncstate != null">
  297. SYNCSTATE = #{record.syncstate,jdbcType=VARCHAR},
  298. </if>
  299. </set>
  300. <if test="_parameter != null">
  301. <include refid="Update_By_Example_Where_Clause" />
  302. </if>
  303. </update>
  304. <update id="updateByExample" parameterType="map">
  305. update us_partydues
  306. set PARTYDUESID = #{record.partyduesid,jdbcType=VARCHAR},
  307. YEAR = #{record.year,jdbcType=DECIMAL},
  308. USERNAME = #{record.username,jdbcType=VARCHAR},
  309. USERCODE = #{record.usercode,jdbcType=VARCHAR},
  310. PARTYNAME = #{record.partyname,jdbcType=VARCHAR},
  311. PARTYCODE = #{record.partycode,jdbcType=VARCHAR},
  312. BASENUMBER = #{record.basenumber,jdbcType=VARCHAR},
  313. MONEY = #{record.money,jdbcType=DECIMAL},
  314. CREATETIME = #{record.createtime,jdbcType=TIMESTAMP},
  315. CREATEUSERID = #{record.createuserid,jdbcType=VARCHAR},
  316. CREATEUSERNAME = #{record.createusername,jdbcType=VARCHAR},
  317. UPDATETIME = #{record.updatetime,jdbcType=TIMESTAMP},
  318. UPDATEUSERID = #{record.updateuserid,jdbcType=VARCHAR},
  319. UPDATEUSERNAME = #{record.updateusername,jdbcType=VARCHAR},
  320. OPERATETIME = #{record.operatetime,jdbcType=TIMESTAMP},
  321. OPERATESTATE = #{record.operatestate,jdbcType=VARCHAR},
  322. SYNCSTATE = #{record.syncstate,jdbcType=VARCHAR}
  323. <if test="_parameter != null">
  324. <include refid="Update_By_Example_Where_Clause" />
  325. </if>
  326. </update>
  327. <update id="updateByPrimaryKeySelective" parameterType="com.ghsc.partybuild.model.UsPartydues">
  328. update us_partydues
  329. <set>
  330. <if test="year != null">
  331. YEAR = #{year,jdbcType=DECIMAL},
  332. </if>
  333. <if test="username != null">
  334. USERNAME = #{username,jdbcType=VARCHAR},
  335. </if>
  336. <if test="usercode != null">
  337. USERCODE = #{usercode,jdbcType=VARCHAR},
  338. </if>
  339. <if test="partyname != null">
  340. PARTYNAME = #{partyname,jdbcType=VARCHAR},
  341. </if>
  342. <if test="partycode != null">
  343. PARTYCODE = #{partycode,jdbcType=VARCHAR},
  344. </if>
  345. <if test="basenumber != null">
  346. BASENUMBER = #{basenumber,jdbcType=VARCHAR},
  347. </if>
  348. <if test="money != null">
  349. MONEY = #{money,jdbcType=DECIMAL},
  350. </if>
  351. <if test="createtime != null">
  352. CREATETIME = #{createtime,jdbcType=TIMESTAMP},
  353. </if>
  354. <if test="createuserid != null">
  355. CREATEUSERID = #{createuserid,jdbcType=VARCHAR},
  356. </if>
  357. <if test="createusername != null">
  358. CREATEUSERNAME = #{createusername,jdbcType=VARCHAR},
  359. </if>
  360. <if test="updatetime != null">
  361. UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
  362. </if>
  363. <if test="updateuserid != null">
  364. UPDATEUSERID = #{updateuserid,jdbcType=VARCHAR},
  365. </if>
  366. <if test="updateusername != null">
  367. UPDATEUSERNAME = #{updateusername,jdbcType=VARCHAR},
  368. </if>
  369. <if test="operatetime != null">
  370. OPERATETIME = #{operatetime,jdbcType=TIMESTAMP},
  371. </if>
  372. <if test="operatestate != null">
  373. OPERATESTATE = #{operatestate,jdbcType=VARCHAR},
  374. </if>
  375. <if test="syncstate != null">
  376. SYNCSTATE = #{syncstate,jdbcType=VARCHAR},
  377. </if>
  378. </set>
  379. where PARTYDUESID = #{partyduesid,jdbcType=VARCHAR}
  380. </update>
  381. <update id="updateByPrimaryKey" parameterType="com.ghsc.partybuild.model.UsPartydues">
  382. update us_partydues
  383. set YEAR = #{year,jdbcType=DECIMAL},
  384. USERNAME = #{username,jdbcType=VARCHAR},
  385. USERCODE = #{usercode,jdbcType=VARCHAR},
  386. PARTYNAME = #{partyname,jdbcType=VARCHAR},
  387. PARTYCODE = #{partycode,jdbcType=VARCHAR},
  388. BASENUMBER = #{basenumber,jdbcType=VARCHAR},
  389. MONEY = #{money,jdbcType=DECIMAL},
  390. CREATETIME = #{createtime,jdbcType=TIMESTAMP},
  391. CREATEUSERID = #{createuserid,jdbcType=VARCHAR},
  392. CREATEUSERNAME = #{createusername,jdbcType=VARCHAR},
  393. UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
  394. UPDATEUSERID = #{updateuserid,jdbcType=VARCHAR},
  395. UPDATEUSERNAME = #{updateusername,jdbcType=VARCHAR},
  396. OPERATETIME = #{operatetime,jdbcType=TIMESTAMP},
  397. OPERATESTATE = #{operatestate,jdbcType=VARCHAR},
  398. SYNCSTATE = #{syncstate,jdbcType=VARCHAR}
  399. where PARTYDUESID = #{partyduesid,jdbcType=VARCHAR}
  400. </update>
  401. </mapper>