CmCouponMapper.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  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.caimei.modules.coupon.dao.CmCouponDao">
  4. <sql id="cmCouponColumns">
  5. a.id AS "id",
  6. a.name AS "name",
  7. a.couponAmount AS "couponAmount",
  8. a.touchPrice AS "touchPrice",
  9. a.startDate AS "startDate",
  10. a.endDate AS "endDate",
  11. a.receivePeriod,
  12. a.receiveFlag,
  13. a.usePeriod,
  14. a.useTimeFlag,
  15. a.status AS "status",
  16. a.couponType AS "couponType",
  17. a.vipFlag AS "vipFlag",
  18. a.userId AS "userId",
  19. a.shopId AS "shopId",
  20. a.productType AS "productType",
  21. a.pcBanner AS "pcBanner",
  22. a.appletsBanner AS "appletsBanner",
  23. a.categoryType AS "categoryType",
  24. a.couponsMode AS "couponsMode",
  25. a.moneyCouponPrice AS "moneyCouponPrice",
  26. a.moneyCouponFlag AS "moneyCouponFlag",
  27. a.moneyCouponType as "moneyCouponType",
  28. a.createDate AS "createDate",
  29. a.couponPayWay as "couponPayWay",
  30. a.shareCouponImage as "shareCouponImage",
  31. a.shareCouponTopic as "shareCouponTopic",
  32. a.delFlag AS "delFlag"
  33. </sql>
  34. <sql id="cmCouponJoins">
  35. </sql>
  36. <select id="get" resultType="CmCoupon">
  37. SELECT
  38. <include refid="cmCouponColumns"/>
  39. FROM cm_coupon a
  40. <include refid="cmCouponJoins"/>
  41. WHERE a.id = #{id}
  42. </select>
  43. <select id="findList" resultType="CmCoupon">
  44. SELECT
  45. <include refid="cmCouponColumns"/>,
  46. u.name AS "clubName",
  47. s.name AS "shopName"
  48. FROM cm_coupon a
  49. LEFT JOIN cm_coupon_club ccc ON ccc.couponId = a.id
  50. LEFT JOIN USER u ON u.userID = a.userId
  51. LEFT JOIN shop s ON s.shopID = a.shopId
  52. <include refid="cmCouponJoins"/>
  53. <where>
  54. AND a.delFlag = 0 AND a.vipFlag != '1'
  55. <if test="couponType != null and couponType != 5">
  56. AND a.couponType = #{couponType}
  57. </if>
  58. <if test="moneyCouponFlag != null and moneyCouponFlag > 0">
  59. AND a.moneyCouponFlag = #{moneyCouponFlag}
  60. </if>
  61. <if test="couponPayWay != null">
  62. AND a.couponPayWay = #{couponPayWay}
  63. </if>
  64. <if test="name != null and name != ''">
  65. AND a.name LIKE
  66. <if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
  67. <if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
  68. <if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
  69. </if>
  70. <if test="startDate != null and startDate != ''">
  71. AND a.startDate <![CDATA[ >= ]]> #{startDate}
  72. </if>
  73. <if test="endDate != null and endDate != ''">
  74. AND a.endDate <![CDATA[ <= ]]> #{endDate}
  75. </if>
  76. <if test='status == "0"'>
  77. AND a.startDate <![CDATA[ > ]]> NOW()
  78. </if>
  79. <if test='status == "1"'>
  80. AND a.startDate <![CDATA[ <= ]]> NOW()
  81. AND a.endDate <![CDATA[ >= ]]> NOW()
  82. AND a.status != '2'
  83. </if>
  84. <if test='status == "2"'>
  85. AND a.status = '2'
  86. </if>
  87. <if test='status == "3"'>
  88. AND a.endDate <![CDATA[ < ]]> NOW()
  89. </if>
  90. <if test="clubName != null and clubName != ''">
  91. AND u.name LIKE concat('%',#{clubName},'%')
  92. </if>
  93. <if test='claimStatus == "1"'>
  94. AND ccc.id IS NULL
  95. </if>
  96. <if test='claimStatus == "2"'>
  97. AND ccc.id IS NOT NULL
  98. </if>
  99. <if test='useStatus == "1"'>
  100. AND (ccc.status IS NULL OR ccc.status = #{useStatus})
  101. </if>
  102. <if test='useStatus == "2"'>
  103. AND ccc.status = #{useStatus}
  104. </if>
  105. <if test="source != null and source != ''">
  106. AND ccc.source = #{source}
  107. </if>
  108. <if test="shopName != null and shopName != ''">
  109. AND s.name LIKE concat('%',#{shopName},'%')
  110. </if>
  111. <if test="couponsMode != null and couponsMode != ''">
  112. AND a.couponsMode = #{couponsMode}
  113. </if>
  114. </where>
  115. GROUP BY a.id
  116. <choose>
  117. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  118. ORDER BY ${page.orderBy}
  119. </when>
  120. <otherwise>
  121. ORDER BY createDate DESC
  122. </otherwise>
  123. </choose>
  124. </select>
  125. <select id="findAllList" resultType="CmCoupon">
  126. SELECT
  127. <include refid="cmCouponColumns"/>
  128. FROM cm_coupon a
  129. <include refid="cmCouponJoins"/>
  130. <where>
  131. </where>
  132. <choose>
  133. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  134. ORDER BY ${page.orderBy}
  135. </when>
  136. <otherwise>
  137. </otherwise>
  138. </choose>
  139. </select>
  140. <insert id="insert" parameterType="CmCoupon" keyProperty="id" useGeneratedKeys="true">
  141. INSERT INTO cm_coupon(
  142. name,
  143. couponPayWay,
  144. couponAmount,
  145. touchPrice,
  146. startDate,
  147. endDate,
  148. receivePeriod,
  149. receiveFlag,
  150. useTimeFlag,
  151. usePeriod,
  152. status,
  153. couponType,
  154. vipFlag,
  155. userId,
  156. shopId,
  157. productType,
  158. pcBanner,
  159. appletsBanner,
  160. categoryType,
  161. couponsMode,
  162. createDate,
  163. moneyCouponPrice,
  164. moneyCouponFlag,
  165. moneyCouponType,
  166. delFlag,
  167. configure,
  168. shareCouponImage,
  169. shareCouponTopic
  170. ) VALUES (
  171. #{name},
  172. #{couponPayWay},
  173. #{couponAmount},
  174. #{touchPrice},
  175. #{startDate},
  176. #{endDate},
  177. #{receivePeriod},
  178. #{receiveFlag},
  179. #{useTimeFlag},
  180. #{usePeriod},
  181. #{status},
  182. #{couponType},
  183. #{vipFlag},
  184. #{userId},
  185. #{shopId},
  186. #{productType},
  187. #{pcBanner},
  188. #{appletsBanner},
  189. #{categoryType},
  190. #{couponsMode},
  191. #{createDate},
  192. #{moneyCouponPrice},
  193. #{moneyCouponFlag},
  194. #{moneyCouponType},
  195. #{delFlag},
  196. #{configure},
  197. #{shareCouponImage},
  198. #{shareCouponTopic}
  199. )
  200. </insert>
  201. <update id="update">
  202. UPDATE cm_coupon SET
  203. name = #{name},
  204. couponPayWay = #{couponPayWay},
  205. couponAmount = #{couponAmount},
  206. touchPrice = #{touchPrice},
  207. startDate = #{startDate},
  208. endDate = #{endDate},
  209. receivePeriod = #{receivePeriod},
  210. receiveFlag = #{receiveFlag},
  211. useTimeFlag = #{useTimeFlag},
  212. usePeriod = #{usePeriod},
  213. status = #{status},
  214. couponType = #{couponType},
  215. vipFlag = #{vipFlag},
  216. userId = #{userId},
  217. shopId = #{shopId},
  218. productType = #{productType},
  219. pcBanner = #{pcBanner},
  220. appletsBanner = #{appletsBanner},
  221. categoryType = #{categoryType},
  222. couponsMode = #{couponsMode},
  223. moneyCouponPrice = #{moneyCouponPrice},
  224. moneyCouponType = #{moneyCouponType},
  225. configure = #{configure},
  226. shareCouponImage = #{shareCouponImage},
  227. shareCouponTopic = #{shareCouponTopic}
  228. WHERE id = #{id}
  229. </update>
  230. <delete id="delete">
  231. DELETE FROM cm_coupon
  232. WHERE id = #{id}
  233. </delete>
  234. <select id="findByProductType" resultType="com.caimei.modules.coupon.entity.CmCouponAssociate">
  235. SELECT
  236. cca.id,
  237. cca.couponId,
  238. cca.productId,
  239. cca.pcStatus,
  240. cca.appletsStatus,
  241. cca.sort,
  242. cca.addTime,
  243. cca.delFlag,
  244. s.name AS shopName,
  245. p.name AS productName,
  246. p.mainImage AS image
  247. FROM
  248. cm_coupon_product cca
  249. LEFT JOIN product p ON cca.productId = p.productID
  250. LEFT JOIN shop s ON p.shopID = s.shopID
  251. WHERE
  252. cca.couponId = #{couponId}
  253. AND delFlag = 0
  254. ORDER BY
  255. - sort DESC
  256. </select>
  257. <insert id="insertCouponAssociate">
  258. INSERT INTO `cm_coupon_product` (
  259. `couponId`, `productId`, `pcStatus`,
  260. `appletsStatus`,
  261. `sort`, `addTime`, `delFlag`
  262. )
  263. VALUES
  264. (
  265. #{couponId}, #{productId}, #{pcStatus},
  266. #{appletsStatus},
  267. #{sort}, #{addTime}, #{delFlag}
  268. )
  269. </insert>
  270. <select id="findByCouponId" resultType="integer">
  271. SELECT id FROM cm_coupon_product WHERE couponId = #{couponId} AND delFlag = 0
  272. </select>
  273. <update id="updateCouponAssociate">
  274. UPDATE
  275. `cm_coupon_product`
  276. <set>
  277. <if test="pcStatus != null and pcStatus != ''">
  278. `pcStatus` = #{pcStatus},
  279. </if>
  280. <if test="appletsStatus != null and appletsStatus != ''">
  281. `appletsStatus` = #{appletsStatus},
  282. </if>
  283. <if test="sort != null">
  284. `sort` = #{sort},
  285. </if>
  286. </set>
  287. WHERE
  288. `id` = #{id}
  289. </update>
  290. <update id="logicDeleteCouponAssociate">
  291. UPDATE cm_coupon_product SET delFlag = 1 WHERE id = #{id}
  292. </update>
  293. <update id="updateByDelFlag">
  294. UPDATE cm_coupon SET delFlag = 1 WHERE id = #{couponId}
  295. </update>
  296. <update id="updateAssociateByDelFlag">
  297. UPDATE cm_coupon_product SET delFlag = 1 WHERE couponId = #{couponId}
  298. </update>
  299. <select id="findCouponClub" resultType="com.caimei.modules.coupon.entity.CmCouponClub">
  300. SELECT
  301. `userId`,
  302. `couponId`,
  303. orderId,
  304. `source`,
  305. `status`,
  306. `createDate`,
  307. `useDate`,
  308. `delFlag`
  309. FROM
  310. `cm_coupon_club`
  311. WHERE
  312. couponId = #{couponId}
  313. AND delFlag = 0
  314. LIMIT
  315. 1
  316. </select>
  317. <select id="findUserList" resultType="com.caimei.modules.user.entity.CmUser">
  318. SELECT
  319. c.clubID,
  320. c.userID,
  321. u.userName,
  322. u.bindMobile,
  323. u.name,
  324. u.userIdentity,
  325. c.sname AS shortName
  326. FROM
  327. club c
  328. LEFT JOIN USER u ON c.userID = u.userID
  329. WHERE
  330. c.status IN (1, 90)
  331. <if test="userID != null">
  332. AND u.userID = #{userID}
  333. </if>
  334. <if test="name != null and name != ''">
  335. AND u.name LIKE CONCAT('%',#{name},'%')
  336. </if>
  337. <if test="shortName != null and shortName != ''">
  338. AND c.sname LIKE CONCAT('%',#{shortName},'%')
  339. </if>
  340. ORDER BY
  341. userID ASC
  342. </select>
  343. <select id="findShopList" resultType="com.caimei.modules.user.entity.NewCmShop">
  344. SELECT
  345. s.shopID,
  346. s.userID,
  347. IFNULL(s.name, u.name) AS name,
  348. IFNULL(s.sname, u.realName) AS sname,
  349. IFNULL(s.contractMobile, u.bindMobile) AS contractMobile,
  350. IFNULL(s.linkMan, u.userName) AS linkMan
  351. FROM
  352. shop s
  353. LEFT JOIN USER u ON u.`shopID` = s.`shopID`
  354. WHERE
  355. s.status = 90
  356. <if test="shopID != null">
  357. AND s.shopID = #{shopID}
  358. </if>
  359. <if test="name != null and name != ''">
  360. AND (s.name LIKE CONCAT('%',#{name},'%') OR u.name LIKE CONCAT('%',#{name},'%'))
  361. </if>
  362. <if test="sname != null and sname != ''">
  363. AND (s.sname LIKE CONCAT('%',#{sname},'%') OR u.realName LIKE CONCAT('%',#{sname},'%'))
  364. </if>
  365. ORDER BY
  366. s.shopID
  367. </select>
  368. <select id="findRedemptionCodeNum" resultType="integer">
  369. SELECT COUNT(id) FROM cm_coupon_redemption_code WHERE couponId = #{couponId}
  370. </select>
  371. <select id="findByRedemptionCode" resultType="com.caimei.modules.coupon.entity.CmCouponRedemptionCode">
  372. SELECT
  373. `id`,
  374. `couponId`,
  375. `clubCouponId`,
  376. `redemptionCode`,
  377. `status`,
  378. `redemptionTime`,
  379. `addTime`
  380. FROM
  381. cm_coupon_redemption_code
  382. WHERE
  383. redemptionCode = #{redemptionCode}
  384. </select>
  385. <insert id="insertRedemptionCode">
  386. INSERT INTO `cm_coupon_redemption_code` (
  387. `couponId`,
  388. `clubCouponId`,
  389. `redemptionCode`,
  390. `status`,
  391. `redemptionTime`,
  392. `addTime`
  393. )
  394. VALUES
  395. (
  396. #{couponId},
  397. #{clubCouponId},
  398. #{redemptionCode},
  399. #{status},
  400. #{redemptionTime},
  401. #{addTime}
  402. )
  403. </insert>
  404. <select id="findRedemptionCode" resultType="com.caimei.modules.coupon.entity.CmCouponRedemptionCode">
  405. SELECT
  406. `id`,
  407. `couponId`,
  408. `clubCouponId`,
  409. `redemptionCode`,
  410. `status`,
  411. `redemptionTime`,
  412. `addTime`
  413. FROM
  414. cm_coupon_redemption_code
  415. WHERE
  416. couponId = #{couponId}
  417. <if test="status != null and status != ''">
  418. AND status = #{status}
  419. </if>
  420. ORDER BY
  421. addTime DESC
  422. </select>
  423. <select id="findQuantityRedeemed" resultType="integer">
  424. SELECT COUNT(id) FROM cm_coupon_redemption_code WHERE couponId = #{couponId} AND status = 2
  425. </select>
  426. <select id="findClubCouponList" resultType="com.caimei.modules.coupon.entity.CmCoupon">
  427. SELECT
  428. cc.`id`,
  429. cc.`name`,
  430. cc.`couponAmount`,
  431. cc.`touchPrice`,
  432. cc.`startDate`,
  433. cc.`endDate`,
  434. a.`createDate` as `receiveDate`,
  435. if(useTimeFlag = 1, cc.endDate,date_add(a.createDate,interval cc.usePeriod DAY)) as `useEndDate`,
  436. cc.`status`,
  437. cc.`couponType`,
  438. cc.`userId`,
  439. cc.`shopId`,
  440. cc.`productType`,
  441. cc.`pcBanner`,
  442. cc.`appletsBanner`,
  443. cc.`categoryType`,
  444. cc.`couponsMode`,
  445. cc.`createDate`,
  446. cc.`delFlag`,
  447. a.id AS clubCouponId,
  448. ccrc.redemptionCode
  449. FROM
  450. cm_coupon_club a
  451. LEFT JOIN cm_coupon cc ON a.couponId = cc.id
  452. LEFT JOIN cm_coupon_redemption_code ccrc ON a.id = ccrc.clubCouponId
  453. WHERE
  454. if(moneyCouponFlag=2,cc.delFlag = 0,cc.id>0)
  455. AND a.delFlag = 0
  456. AND a.userId = #{userId}
  457. AND a.status = 1
  458. AND NOW() <![CDATA[ < ]]> if(cc.usePeriod is null,cc.endDate,date_add(a.createDate,interval cc.usePeriod DAY))
  459. AND cc.status != 2
  460. ORDER BY
  461. a.createDate DESC
  462. </select>
  463. <select id="findAllProductId" resultType="integer">
  464. SELECT
  465. productId
  466. FROM
  467. cm_coupon_product
  468. WHERE
  469. couponId = #{couponId}
  470. AND (
  471. pcStatus = 1
  472. OR appletsStatus = 1
  473. )
  474. </select>
  475. <select id="findNotRedeemedCoupon" resultType="com.caimei.modules.coupon.entity.CmCoupon">
  476. SELECT
  477. a.`id`,
  478. a.`name`,
  479. a.`couponAmount`,
  480. a.`touchPrice`,
  481. a.`startDate`,
  482. a.`endDate`,
  483. a.`status`,
  484. a.`couponType`,
  485. a.`userId`,
  486. a.`shopId`,
  487. a.`productType`,
  488. a.`pcBanner`,
  489. a.`appletsBanner`,
  490. a.`categoryType`,
  491. a.`couponsMode`,
  492. a.`createDate`,
  493. a.`delFlag`,
  494. ccrc.redemptionCode
  495. FROM
  496. cm_coupon a
  497. LEFT JOIN cm_coupon_redemption_code ccrc ON a.id = ccrc.couponId
  498. WHERE
  499. a.status != 2
  500. AND a.moneyCouponFlag = 2
  501. AND a.delFlag = 0
  502. AND NOW() BETWEEN a.startDate
  503. AND a.endDate
  504. AND a.couponsMode = 1
  505. AND ccrc.status = 1
  506. </select>
  507. <select id="findCouponList" resultType="com.caimei.modules.coupon.entity.CmCoupon">
  508. SELECT
  509. cc.`id`,
  510. cc.`name`,
  511. cc.`couponAmount`,
  512. cc.`touchPrice`,
  513. cc.`startDate`,
  514. cc.`endDate`,
  515. cc.`status`,
  516. cc.`couponType`,
  517. cc.`userId`,
  518. cc.`shopId`,
  519. cc.`productType`,
  520. cc.`pcBanner`,
  521. cc.`appletsBanner`,
  522. cc.`categoryType`,
  523. cc.`couponsMode`,
  524. cc.`createDate`,
  525. cc.moneyCouponPrice,
  526. cc.`delFlag`
  527. FROM
  528. cm_coupon cc
  529. WHERE
  530. cc.id > 0
  531. AND cc.delFlag = 0
  532. AND cc.moneyCouponFlag = #{moneyCouponFlag}
  533. AND cc.status != 2
  534. AND cc.couponsMode = 0
  535. AND (couponType IN (0,1,3)
  536. OR (couponType = 2 AND userId = #{userId})
  537. OR ((SELECT registerTime FROM USER WHERE userID = #{userId}) <![CDATA[ >= ]]> startDate
  538. AND couponType = 4))
  539. AND NOW() <![CDATA[ < ]]> if(useTimeFlag = 1 or receiveFlag = 1,endDate,
  540. date_add(if((SELECT registerTime FROM USER WHERE userID = #{userId}) <![CDATA[ > ]]> startDate and (SELECT registerTime FROM USER WHERE userID = #{userId}) <![CDATA[ < ]]> endDate,(SELECT registerTime FROM USER WHERE userID = #{userId}),startDate),
  541. interval receivePeriod day))
  542. ORDER BY
  543. cc.couponAmount DESC
  544. </select>
  545. <update id="updateClubCoupon">
  546. UPDATE
  547. cm_coupon_club
  548. SET
  549. STATUS = 2,
  550. orderId = #{orderId},
  551. useDate = NOW()
  552. WHERE
  553. id = #{clubCouponId}
  554. </update>
  555. <select id="selconfigure" resultType="com.caimei.modules.coupon.entity.CmCoupon">
  556. SELECT <include refid="cmCouponColumns"/> FROM cm_coupon a WHERE configure = 1
  557. </select>
  558. <select id="selMonthTime" resultType="java.lang.String">
  559. SELECT cscm.useTime
  560. FROM cm_coupon a
  561. LEFT JOIN cm_svip_coupon csc ON a.id = csc.couponId
  562. LEFT JOIN cm_svip_coupon_month cscm ON csc.montId = cscm.id WHERE a.delFlag = 0 AND a.configure = 1 LIMIT 1
  563. </select>
  564. <select id="selCouponId" resultType="integer">
  565. SELECT cscm.id as id FROM cm_svip_coupon_month cscm LEFT JOIN cm_svip_coupon csc ON csc.montId = cscm.id WHERE csc.couponId = #{couponId}
  566. </select>
  567. <!--<insert id="insertConfigure">
  568. INSERT INTO cm_coupon_configure(
  569. name,
  570. couponPayWay,
  571. couponAmount,
  572. touchPrice,
  573. startDate,
  574. endDate,
  575. receivePeriod,
  576. receiveFlag,
  577. useTimeFlag,
  578. usePeriod,
  579. status,
  580. couponType,
  581. vipFlag,
  582. userId,
  583. shopId,
  584. productType,
  585. pcBanner,
  586. appletsBanner,
  587. categoryType,
  588. couponsMode,
  589. createDate,
  590. moneyCouponPrice,
  591. moneyCouponFlag,
  592. moneyCouponType,
  593. delFlag
  594. ) VALUES (
  595. #{name},
  596. #{couponPayWay},
  597. #{couponAmount},
  598. #{touchPrice},
  599. #{startDate},
  600. #{endDate},
  601. #{receivePeriod},
  602. #{receiveFlag},
  603. #{useTimeFlag},
  604. #{usePeriod},
  605. #{status},
  606. #{couponType},
  607. #{vipFlag},
  608. #{userId},
  609. #{shopId},
  610. #{productType},
  611. #{pcBanner},
  612. #{appletsBanner},
  613. #{categoryType},
  614. #{couponsMode},
  615. #{createDate},
  616. #{moneyCouponPrice},
  617. #{moneyCouponFlag},
  618. #{moneyCouponType},
  619. #{delFlag}
  620. )
  621. </insert>
  622. <update id="updateConfigure">
  623. UPDATE cm_coupon_configure SET
  624. name = #{name},
  625. couponPayWay = #{couponPayWay},
  626. couponAmount = #{couponAmount},
  627. touchPrice = #{touchPrice},
  628. startDate = #{startDate},
  629. endDate = #{endDate},
  630. receivePeriod = #{receivePeriod},
  631. receiveFlag = #{receiveFlag},
  632. useTimeFlag = #{useTimeFlag},
  633. usePeriod = #{usePeriod},
  634. status = #{status},
  635. couponType = #{couponType},
  636. vipFlag = #{vipFlag},
  637. userId = #{userId},
  638. shopId = #{shopId},
  639. productType = #{productType},
  640. pcBanner = #{pcBanner},
  641. appletsBanner = #{appletsBanner},
  642. categoryType = #{categoryType},
  643. couponsMode = #{couponsMode},
  644. moneyCouponPrice = #{moneyCouponPrice},
  645. moneyCouponType = #{moneyCouponType}
  646. WHERE id = #{id}
  647. </update>-->
  648. </mapper>