|
@@ -2,164 +2,198 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.caimei365.order.mapper.BaseMapper">
|
|
|
<select id="getShopNameById" resultType="java.lang.String">
|
|
|
- SELECT `name` FROM shop WHERE shopID = #{shopId} LIMIT 1
|
|
|
+ SELECT `name`
|
|
|
+ FROM shop
|
|
|
+ WHERE shopID = #{shopId}
|
|
|
+ LIMIT 1
|
|
|
</select>
|
|
|
<select id="getClubNameById" resultType="java.lang.String">
|
|
|
- SELECT `name` FROM club WHERE clubID = #{clubId} LIMIT 1
|
|
|
+ SELECT `name`
|
|
|
+ FROM club
|
|
|
+ WHERE clubID = #{clubId}
|
|
|
+ LIMIT 1
|
|
|
</select>
|
|
|
<insert id="insertUserInvoiceByUserId" parameterType="com.caimei365.order.model.vo.InvoiceVo">
|
|
|
- INSERT INTO cm_user_invoiceinfo (userId, invoiceTitle, corporationTaxNum, registeredAddress, registeredPhone, bankAccountNo, openBank)
|
|
|
- VALUES(#{userId}, #{invoiceTitle}, #{corporationTaxNum},#{registeredAddress}, #{registeredPhone},#{bankAccountNo}, #{openBank})
|
|
|
+ INSERT INTO cm_user_invoiceinfo (userId, invoiceTitle, corporationTaxNum, registeredAddress, registeredPhone,
|
|
|
+ bankAccountNo, openBank)
|
|
|
+ VALUES (#{userId}, #{invoiceTitle}, #{corporationTaxNum}, #{registeredAddress}, #{registeredPhone},
|
|
|
+ #{bankAccountNo}, #{openBank})
|
|
|
</insert>
|
|
|
- <insert id="insertPurchasePrice" keyColumn="id" keyProperty="id" parameterType="com.caimei365.order.model.po.PurchasePricePo" useGeneratedKeys="true">
|
|
|
+ <insert id="insertPurchasePrice" keyColumn="id" keyProperty="id"
|
|
|
+ parameterType="com.caimei365.order.model.po.PurchasePricePo" useGeneratedKeys="true">
|
|
|
INSERT INTO repeat_purchase_price (userId, clubId, orderId, productId, shopId, shopName,
|
|
|
- taxRate, currentPrice, createTime, updateTime, delFlag)
|
|
|
+ taxRate, currentPrice, createTime, updateTime, delFlag)
|
|
|
VALUES (#{userId}, #{clubId}, #{orderId}, #{productId}, #{shopId}, #{shopName},
|
|
|
- #{taxRate}, #{currentPrice}, #{createTime}, #{updateTime}, #{delFlag})
|
|
|
+ #{taxRate}, #{currentPrice}, #{createTime}, #{updateTime}, #{delFlag})
|
|
|
</insert>
|
|
|
- <insert id="insertPurchaseHistory" keyColumn="id" keyProperty="id" parameterType="com.caimei365.order.model.po.PurchaseHistoryPo" useGeneratedKeys="true">
|
|
|
- INSERT INTO repeat_purchase_price_history (userId, clubId, orderId, productId, price, currentCostPrice, createTime, delFlag)
|
|
|
- VALUES (#{userId}, #{clubId}, #{orderId}, #{productId}, #{price}, #{currentCostPrice}, #{createTime}, #{delFlag})
|
|
|
+ <insert id="insertPurchaseHistory" keyColumn="id" keyProperty="id"
|
|
|
+ parameterType="com.caimei365.order.model.po.PurchaseHistoryPo" useGeneratedKeys="true">
|
|
|
+ INSERT INTO repeat_purchase_price_history (userId, clubId, orderId, productId, price, currentCostPrice,
|
|
|
+ createTime, delFlag)
|
|
|
+ VALUES (#{userId}, #{clubId}, #{orderId}, #{productId}, #{price}, #{currentCostPrice}, #{createTime},
|
|
|
+ #{delFlag})
|
|
|
</insert>
|
|
|
<update id="updateUserInvoiceByUserId" parameterType="com.caimei365.order.model.vo.InvoiceVo">
|
|
|
UPDATE cm_user_invoiceinfo
|
|
|
- SET
|
|
|
- invoiceTitle = #{invoiceTitle},
|
|
|
+ SET invoiceTitle = #{invoiceTitle},
|
|
|
corporationTaxNum = #{corporationTaxNum},
|
|
|
registeredAddress = #{registeredAddress},
|
|
|
- registeredPhone = #{registeredPhone},
|
|
|
- bankAccountNo = #{bankAccountNo},
|
|
|
- openBank = #{openBank}
|
|
|
+ registeredPhone = #{registeredPhone},
|
|
|
+ bankAccountNo = #{bankAccountNo},
|
|
|
+ openBank = #{openBank}
|
|
|
WHERE userId = #{userId}
|
|
|
</update>
|
|
|
<update id="updatePurchasePrice">
|
|
|
- UPDATE repeat_purchase_price SET
|
|
|
- currentPrice = #{currentPrice}, taxRate = #{taxRate}, updateTime = #{updateTime}
|
|
|
+ UPDATE repeat_purchase_price
|
|
|
+ SET currentPrice = #{currentPrice},
|
|
|
+ taxRate = #{taxRate},
|
|
|
+ updateTime = #{updateTime}
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
<select id="getUserIdByClubId" resultType="java.lang.Integer">
|
|
|
- select userID from user where clubID = #{clubId} LIMIT 1
|
|
|
+ select userID
|
|
|
+ from user
|
|
|
+ where clubID = #{clubId}
|
|
|
+ LIMIT 1
|
|
|
</select>
|
|
|
<select id="getIdentityByUserId" resultType="java.lang.Integer">
|
|
|
- select userIdentity from user where userID = #{userId} LIMIT 1
|
|
|
+ select userIdentity
|
|
|
+ from user
|
|
|
+ where userID = #{userId}
|
|
|
+ LIMIT 1
|
|
|
</select>
|
|
|
<select id="getUserNameByUserId" resultType="java.lang.String">
|
|
|
- select userName from user where userID = #{userId} LIMIT 1
|
|
|
+ select userName
|
|
|
+ from user
|
|
|
+ where userID = #{userId}
|
|
|
+ LIMIT 1
|
|
|
</select>
|
|
|
<select id="getLadderPriceList" resultType="com.caimei365.order.model.vo.LadderPriceVo">
|
|
|
- select
|
|
|
- id, productId, ladderNum, buyNum, buyPrice
|
|
|
+ select id,
|
|
|
+ productId,
|
|
|
+ ladderNum,
|
|
|
+ buyNum,
|
|
|
+ buyPrice
|
|
|
from product_ladder_price
|
|
|
- where productId = #{productId} and userType = 3 and delFlag = 0
|
|
|
+ where productId = #{productId}
|
|
|
+ and userType = 3
|
|
|
+ and delFlag = 0
|
|
|
order by ladderNum asc
|
|
|
</select>
|
|
|
<select id="getRepurchasePrice" resultType="java.lang.Double">
|
|
|
- select
|
|
|
- r.currentPrice
|
|
|
+ select r.currentPrice
|
|
|
from repeat_purchase_price r
|
|
|
- left join product p on p.productID = r.productId
|
|
|
- where r.productId = #{productId} and r.userId = #{userId}
|
|
|
- and ((p.costCheckFlag=1 and r.currentPrice <![CDATA[ >= ]]> p.costPrice) or p.costCheckFlag=2)
|
|
|
- and p.price1 <![CDATA[ >= ]]> r.currentPrice
|
|
|
- and r.delFlag = 0
|
|
|
+ left join product p on p.productID = r.productId
|
|
|
+ where r.productId = #{productId}
|
|
|
+ and r.userId = #{userId}
|
|
|
+ and ((p.costCheckFlag = 1 and r.currentPrice <![CDATA[ >= ]]> p.costPrice) or p.costCheckFlag = 2)
|
|
|
+ and p.price1 <![CDATA[ >= ]]> r.currentPrice
|
|
|
+ and r.delFlag = 0
|
|
|
</select>
|
|
|
<select id="getPromotionByShopId" resultType="com.caimei365.order.model.vo.PromotionsVo">
|
|
|
- SELECT
|
|
|
- pr.id,
|
|
|
- pr.name,
|
|
|
- pr.description,
|
|
|
- pr.type,
|
|
|
- pr.mode,
|
|
|
- pr.touchPrice,
|
|
|
- pr.reducedPrice,
|
|
|
- pr.beginTime,
|
|
|
- pr.endTime,
|
|
|
- pr.status,
|
|
|
- prp.productId,
|
|
|
- prp.supplierId AS shopId
|
|
|
+ SELECT pr.id,
|
|
|
+ pr.name,
|
|
|
+ pr.description,
|
|
|
+ pr.type,
|
|
|
+ pr.mode,
|
|
|
+ pr.touchPrice,
|
|
|
+ pr.reducedPrice,
|
|
|
+ pr.beginTime,
|
|
|
+ pr.endTime,
|
|
|
+ pr.status,
|
|
|
+ prp.productId,
|
|
|
+ prp.supplierId AS shopId
|
|
|
FROM cm_promotions pr
|
|
|
- LEFT JOIN cm_promotions_product prp ON pr.id = prp.promotionsId
|
|
|
- WHERE prp.supplierId = #{shopId} and pr.delFlag=0 and pr.type=3
|
|
|
- AND (pr.status = 1 OR ( pr.status = 2 AND (NOW() BETWEEN pr.beginTime AND pr.endTime)))
|
|
|
- ORDER BY pr.type DESC LIMIT 1
|
|
|
+ LEFT JOIN cm_promotions_product prp ON pr.id = prp.promotionsId
|
|
|
+ WHERE prp.supplierId = #{shopId}
|
|
|
+ and pr.delFlag = 0
|
|
|
+ and pr.type = 3
|
|
|
+ AND (pr.status = 1 OR (pr.status = 2 AND (NOW() BETWEEN pr.beginTime AND pr.endTime)))
|
|
|
+ ORDER BY pr.type DESC
|
|
|
+ LIMIT 1
|
|
|
</select>
|
|
|
<select id="getPromotionByProductId" resultType="com.caimei365.order.model.vo.PromotionsVo">
|
|
|
- SELECT
|
|
|
- pr.id,
|
|
|
- pr.name,
|
|
|
- pr.description,
|
|
|
- pr.type,
|
|
|
- pr.mode,
|
|
|
- pr.touchPrice,
|
|
|
- pr.reducedPrice,
|
|
|
- pr.beginTime,
|
|
|
- pr.endTime,
|
|
|
- pr.status,
|
|
|
- prp.productId,
|
|
|
- prp.supplierId AS shopId
|
|
|
+ SELECT pr.id,
|
|
|
+ pr.name,
|
|
|
+ pr.description,
|
|
|
+ pr.type,
|
|
|
+ pr.mode,
|
|
|
+ pr.touchPrice,
|
|
|
+ pr.reducedPrice,
|
|
|
+ pr.beginTime,
|
|
|
+ pr.endTime,
|
|
|
+ pr.status,
|
|
|
+ prp.productId,
|
|
|
+ prp.supplierId AS shopId
|
|
|
FROM cm_promotions pr
|
|
|
- LEFT JOIN cm_promotions_product prp ON pr.id = prp.promotionsId
|
|
|
- WHERE prp.productId = #{productId} and pr.delFlag=0 and pr.type in (1,2)
|
|
|
- AND (pr.status = 1 OR ( pr.status = 2 AND (NOW() BETWEEN pr.beginTime AND pr.endTime)))
|
|
|
- ORDER BY pr.type DESC LIMIT 1
|
|
|
+ LEFT JOIN cm_promotions_product prp ON pr.id = prp.promotionsId
|
|
|
+ WHERE prp.productId = #{productId}
|
|
|
+ and pr.delFlag = 0
|
|
|
+ and pr.type in (1, 2)
|
|
|
+ AND (pr.status = 1 OR (pr.status = 2 AND (NOW() BETWEEN pr.beginTime AND pr.endTime)))
|
|
|
+ ORDER BY pr.type DESC
|
|
|
+ LIMIT 1
|
|
|
</select>
|
|
|
<select id="getPromotionGifts" resultType="com.caimei365.order.model.vo.CartItemVo">
|
|
|
- SELECT
|
|
|
- cpg.id AS id,
|
|
|
- p.productID AS productId,
|
|
|
- p.shopID AS shopId,
|
|
|
- p.`name` AS `name`,
|
|
|
- p.mainImage AS image,
|
|
|
- cpg.number AS number,
|
|
|
- 0 AS price,
|
|
|
- 2 as productType,
|
|
|
- p.price1 AS originalPrice,
|
|
|
- p.unit AS unit,
|
|
|
- p.stock AS stock,
|
|
|
- p.validFlag AS validFlag
|
|
|
+ SELECT cpg.id AS id,
|
|
|
+ p.productID AS productId,
|
|
|
+ p.shopID AS shopId,
|
|
|
+ p.`name` AS `name`,
|
|
|
+ p.mainImage AS image,
|
|
|
+ cpg.number AS number,
|
|
|
+ 0 AS price,
|
|
|
+ 2 as productType,
|
|
|
+ p.price1 AS originalPrice,
|
|
|
+ p.unit AS unit,
|
|
|
+ p.stock AS stock,
|
|
|
+ p.validFlag AS validFlag
|
|
|
FROM cm_promotions_gift cpg
|
|
|
- LEFT JOIN product p ON cpg.productId = p.productID
|
|
|
+ LEFT JOIN product p ON cpg.productId = p.productID
|
|
|
WHERE cpg.promotionsId = #{promotionsId}
|
|
|
ORDER BY cpg.id DESC
|
|
|
</select>
|
|
|
<select id="getShopByProductId" resultType="com.caimei365.order.model.vo.CartShopVo">
|
|
|
- SELECT
|
|
|
- s.shopID AS shopId,
|
|
|
- s.name AS shopName,
|
|
|
- s.logo AS shopLogo
|
|
|
+ SELECT s.shopID AS shopId,
|
|
|
+ s.name AS shopName,
|
|
|
+ s.logo AS shopLogo
|
|
|
FROM shop s
|
|
|
- LEFT JOIN product p ON p.shopID = s.shopID
|
|
|
+ LEFT JOIN product p ON p.shopID = s.shopID
|
|
|
WHERE p.productId = #{productId}
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
<select id="getUserInvoice" resultType="com.caimei365.order.model.vo.InvoiceVo">
|
|
|
- SELECT
|
|
|
- id,
|
|
|
- userId,
|
|
|
- invoiceTitle,
|
|
|
- corporationTaxNum,
|
|
|
- registeredAddress,
|
|
|
- registeredPhone,
|
|
|
- bankAccountNo,
|
|
|
- openBank
|
|
|
+ SELECT id,
|
|
|
+ userId,
|
|
|
+ invoiceTitle,
|
|
|
+ corporationTaxNum,
|
|
|
+ registeredAddress,
|
|
|
+ registeredPhone,
|
|
|
+ bankAccountNo,
|
|
|
+ openBank
|
|
|
FROM cm_user_invoiceinfo
|
|
|
WHERE userId = #{userId}
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
<select id="getUserMoney" resultType="java.lang.Double">
|
|
|
- SELECT userMoney FROM user WHERE userID = #{userId}
|
|
|
+ SELECT userMoney
|
|
|
+ FROM user
|
|
|
+ WHERE userID = #{userId}
|
|
|
</select>
|
|
|
<select id="getAbleUserMoney" resultType="java.lang.Double">
|
|
|
- SELECT ableUserMoney FROM user WHERE userID = #{userId}
|
|
|
+ SELECT ableUserMoney
|
|
|
+ FROM user
|
|
|
+ WHERE userID = #{userId}
|
|
|
</select>
|
|
|
<select id="getUserBeans" resultType="java.lang.Integer">
|
|
|
- SELECT userBeans FROM user WHERE userID = #{userId}
|
|
|
+ SELECT userBeans
|
|
|
+ FROM user
|
|
|
+ WHERE userID = #{userId}
|
|
|
</select>
|
|
|
<select id="getPostageFlagList" resultType="com.caimei365.order.model.vo.ProductPostageVo">
|
|
|
SELECT
|
|
|
- productID AS productId,
|
|
|
- freePostFlag AS postageFlag,
|
|
|
- commodityType
|
|
|
+ productID AS productId,
|
|
|
+ freePostFlag AS postageFlag,
|
|
|
+ commodityType
|
|
|
FROM product
|
|
|
WHERE validFlag='2' AND productID in
|
|
|
<foreach collection="productIds" open="(" separator="," close=")" item="productId">
|
|
@@ -167,75 +201,99 @@
|
|
|
</foreach>
|
|
|
</select>
|
|
|
<select id="countUserOrder" resultType="java.lang.Integer">
|
|
|
- SELECT COUNT(*) FROM cm_order WHERE userID = #{userId} AND delFlag=0 AND STATUS != 6
|
|
|
+ SELECT COUNT(*)
|
|
|
+ FROM cm_order
|
|
|
+ WHERE userID = #{userId}
|
|
|
+ AND delFlag = 0
|
|
|
+ AND STATUS != 6
|
|
|
</select>
|
|
|
<select id="getProvinceIdAndCityId" resultType="com.caimei365.order.model.vo.AddressVo">
|
|
|
- SELECT provinceID AS provinceId, cityID AS cityId FROM city
|
|
|
- WHERE cityID =(SELECT cityID from town where townID = #{townId})
|
|
|
+ SELECT provinceID AS provinceId, cityID AS cityId
|
|
|
+ FROM city
|
|
|
+ WHERE cityID = (SELECT cityID from town where townID = #{townId})
|
|
|
</select>
|
|
|
<select id="getTownIdByAddressId" resultType="java.lang.Integer">
|
|
|
- SELECT townID FROM address WHERE addressID = #{addressId}
|
|
|
+ SELECT townID
|
|
|
+ FROM address
|
|
|
+ WHERE addressID = #{addressId}
|
|
|
</select>
|
|
|
<select id="getPurchasePricePo" resultType="com.caimei365.order.model.po.PurchasePricePo">
|
|
|
- SELECT
|
|
|
- id,
|
|
|
- userId,
|
|
|
- clubId,
|
|
|
- orderId,
|
|
|
- productId,
|
|
|
- shopId,
|
|
|
- shopName,
|
|
|
- taxRate,
|
|
|
- currentPrice,
|
|
|
- createTime
|
|
|
+ SELECT id,
|
|
|
+ userId,
|
|
|
+ clubId,
|
|
|
+ orderId,
|
|
|
+ productId,
|
|
|
+ shopId,
|
|
|
+ shopName,
|
|
|
+ taxRate,
|
|
|
+ currentPrice,
|
|
|
+ createTime
|
|
|
FROM repeat_purchase_price
|
|
|
- WHERE userId = #{userId} AND productId = #{productId} AND delFlag='0'
|
|
|
+ WHERE userId = #{userId}
|
|
|
+ AND productId = #{productId}
|
|
|
+ AND delFlag = '0'
|
|
|
</select>
|
|
|
<select id="getBindMobileByUserId" resultType="java.lang.String">
|
|
|
- SELECT bindMobile FROM user WHERE userID = #{userId}
|
|
|
+ SELECT bindMobile
|
|
|
+ FROM user
|
|
|
+ WHERE userID = #{userId}
|
|
|
</select>
|
|
|
<select id="getShopIdByproductId" resultType="java.lang.Integer">
|
|
|
- SELECT shopID FROM product WHERE productID = #{productId}
|
|
|
+ SELECT shopID
|
|
|
+ FROM product
|
|
|
+ WHERE productID = #{productId}
|
|
|
</select>
|
|
|
<select id="getClauseList" resultType="com.caimei365.order.model.vo.ClauseVo">
|
|
|
- SELECT
|
|
|
- id,
|
|
|
- name,
|
|
|
- content,
|
|
|
- clauseType,
|
|
|
- enabledStatus
|
|
|
+ SELECT id,
|
|
|
+ name,
|
|
|
+ content,
|
|
|
+ clauseType,
|
|
|
+ enabledStatus
|
|
|
FROM bp_clause
|
|
|
</select>
|
|
|
- <insert id="insertDiscernReceipt" keyColumn="id" keyProperty="id" parameterType="com.caimei365.order.model.po.DiscernReceiptPo" useGeneratedKeys="true">
|
|
|
+ <insert id="insertDiscernReceipt" keyColumn="id" keyProperty="id"
|
|
|
+ parameterType="com.caimei365.order.model.po.DiscernReceiptPo" useGeneratedKeys="true">
|
|
|
INSERT INTO cm_discern_receipt (payWay, payType, receiptType, receiptStatus, receiptAmount, confirmType,
|
|
|
- receiptDate, confirmDate, reviewDate, updateDate, delFlag, rePayFlag, formData)
|
|
|
+ receiptDate, confirmDate, reviewDate, updateDate, delFlag, rePayFlag, formData)
|
|
|
VALUES (#{payWay}, #{payType}, #{receiptType}, #{receiptStatus}, #{receiptAmount}, #{confirmType},
|
|
|
- #{receiptDate}, #{confirmDate}, #{reviewDate}, #{updateDate}, #{delFlag}, #{rePayFlag}, #{formData})
|
|
|
+ #{receiptDate}, #{confirmDate}, #{reviewDate}, #{updateDate}, #{delFlag}, #{rePayFlag}, #{formData})
|
|
|
</insert>
|
|
|
- <insert id="insertOrderReceiptRelation" keyColumn="id" keyProperty="id" parameterType="com.caimei365.order.model.po.OrderReceiptRelationPo" useGeneratedKeys="true">
|
|
|
- INSERT INTO cm_receipt_order_relation (relationType, receiptId, associateAmount, orderId, vipRecordId, delFlag, mbOrderId, orderRequestNo, splitStatus)
|
|
|
- VALUES (#{relationType}, #{receiptId}, #{associateAmount}, #{orderId}, #{vipRecordId}, #{delFlag}, #{mbOrderId}, #{orderRequestNo}, #{splitStatus})
|
|
|
+ <insert id="insertOrderReceiptRelation" keyColumn="id" keyProperty="id"
|
|
|
+ parameterType="com.caimei365.order.model.po.OrderReceiptRelationPo" useGeneratedKeys="true">
|
|
|
+ INSERT INTO cm_receipt_order_relation (relationType, receiptId, associateAmount, orderId, vipRecordId, delFlag,
|
|
|
+ mbOrderId, orderRequestNo, splitStatus, productId)
|
|
|
+ VALUES (#{relationType}, #{receiptId}, #{associateAmount}, #{orderId}, #{vipRecordId}, #{delFlag}, #{mbOrderId},
|
|
|
+ #{orderRequestNo}, #{splitStatus}, #{productId})
|
|
|
</insert>
|
|
|
<insert id="insertBeansHistory" parameterType="com.caimei365.order.model.po.UserBeansHistoryPo">
|
|
|
INSERT INTO user_beans_history (userId, type, beansType, orderId, num, pushStatus, addTime, delFlag)
|
|
|
VALUES (#{userId}, #{type}, #{beansType}, #{orderId}, #{num}, #{pushStatus}, #{addTime}, #{delFlag})
|
|
|
</insert>
|
|
|
<update id="updateUserBeans">
|
|
|
- UPDATE USER SET userBeans = #{userBeans}
|
|
|
+ UPDATE USER
|
|
|
+ SET userBeans = #{userBeans}
|
|
|
WHERE userID = #{userId}
|
|
|
</update>
|
|
|
<update id="updateUserClubStatus">
|
|
|
- UPDATE user SET clubStatus = #{clubStatus} WHERE userID = #{userId}
|
|
|
+ UPDATE user
|
|
|
+ SET clubStatus = #{clubStatus}
|
|
|
+ WHERE userID = #{userId}
|
|
|
</update>
|
|
|
<update id="updateClubStatus">
|
|
|
- UPDATE club SET status = #{clubStatus} WHERE userID = #{userId}
|
|
|
+ UPDATE club
|
|
|
+ SET status = #{clubStatus}
|
|
|
+ WHERE userID = #{userId}
|
|
|
</update>
|
|
|
<insert id="insertBalanceRecord" parameterType="com.caimei365.order.model.po.BalanceRecordPo">
|
|
|
INSERT INTO cm_user_balance_record (userId, type, balanceType, addDate, amount, orderId, remark, delFlag)
|
|
|
VALUES (#{userId}, #{type}, #{balanceType}, #{addDate}, #{amount}, #{orderId}, #{remark}, #{delFlag})
|
|
|
</insert>
|
|
|
<select id="getSvipUserIdByUserId" resultType="java.lang.Integer">
|
|
|
- select userId from cm_svip_user where userId = #{userId} and delFlag = '0' and now() <![CDATA[ < ]]> endTime
|
|
|
+ select userId
|
|
|
+ from cm_svip_user
|
|
|
+ where userId = #{userId}
|
|
|
+ and delFlag = '0'
|
|
|
+ and now() <![CDATA[ < ]]> endTime
|
|
|
</select>
|
|
|
<select id="getSvipUserIdByClubId" resultType="java.lang.Integer">
|
|
|
select svu.userId
|
|
@@ -246,7 +304,9 @@
|
|
|
and now() <![CDATA[ < ]]> endTime;
|
|
|
</select>
|
|
|
<select id="getClubStatus" resultType="java.lang.Integer">
|
|
|
- select clubStatus from user where userID = #{userId}
|
|
|
+ select clubStatus
|
|
|
+ from user
|
|
|
+ where userID = #{userId}
|
|
|
</select>
|
|
|
<select id="getClubConfirmTime" resultType="java.util.Date">
|
|
|
SELECT confirmTime
|