VmCouponMapper.xml 14 KB

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