|
@@ -56,7 +56,7 @@
|
|
|
<if test="shopName != null">
|
|
|
shopName=#{shopName},
|
|
|
</if>
|
|
|
- <if test="shopId !=null">
|
|
|
+ <if test="shopId != null">
|
|
|
shopID=#{shopId},
|
|
|
</if>
|
|
|
<if test="shopOrderId !=null">
|
|
@@ -182,7 +182,10 @@
|
|
|
WHERE user_id = #{userId}
|
|
|
</select>
|
|
|
<select id="getReceiptType" resultType="com.caimei365.order.model.vo.cmOfflineCollectionVo">
|
|
|
- SELECT TYPE AS id, bankAccount AS TYPE FROM cm_offline_collection WHERE isDisable != 0 ORDER BY id
|
|
|
+ SELECT TYPE AS id, bankAccount AS TYPE
|
|
|
+ FROM cm_offline_collection
|
|
|
+ WHERE isDisable != 0
|
|
|
+ ORDER BY id
|
|
|
</select>
|
|
|
<select id="getReceiptTypeById" resultType="com.caimei365.order.model.vo.ReceiptTypeVo">
|
|
|
SELECT `id`, `type`
|
|
@@ -1030,6 +1033,14 @@
|
|
|
INSERT INTO cm_rebate_record(type, shopId, receiptID, shopOrderId, rebateAmount, operatTime)
|
|
|
VALUES (#{type}, #{shopId}, #{receiptId}, #{shopOrderId}, #{rebateAmount}, #{operateTime})
|
|
|
</insert>
|
|
|
+ <insert id="insertPutAwayFeeRecordForNew">
|
|
|
+ INSERT INTO cm_receipt (validityDate, dateStrings, receiptID)
|
|
|
+ VALUES (NOW(), DATE_ADD(NOW(), INTERVAL 1 YEAR), #{receiptId})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertPutAwayFeeRecordForOld">
|
|
|
+ INSERT INTO cm_receipt (validityDate, dateStrings, receiptID)
|
|
|
+ VALUES (#{dateStrings}, DATE_ADD(#{dateStrings}, INTERVAL 1 YEAR), #{receiptId})
|
|
|
+ </insert>
|
|
|
<select id="getOrderReceiptRelationList" resultType="com.caimei365.order.model.po.OrderReceiptRelationPo">
|
|
|
SELECT cror.id,
|
|
|
cror.relationType,
|
|
@@ -1112,6 +1123,7 @@
|
|
|
|
|
|
|
|
|
</select>
|
|
|
+
|
|
|
<select id="getTeamClubUserIdBySpId" resultType="java.lang.Integer">
|
|
|
SELECT userID
|
|
|
FROM club
|
|
@@ -1120,5 +1132,16 @@
|
|
|
WHERE teamId = (SELECT teamId FROM cm_serviceteam_group WHERE serviceId = #{spId}))
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
+ <select id="findPutAwayFee" resultType="com.caimei365.order.model.po.PutAwayFeePo">
|
|
|
+ SELECT cc.validityDate, cc.dateStrings, cc.receiptId, cdr.shopId
|
|
|
+ FROM cm_receipt cc
|
|
|
+ LEFT JOIN cm_discern_receipt cdr ON cc.receiptId = cdr.id
|
|
|
+ WHERE cdr.newReceiptType = 1
|
|
|
+ AND cdr.receStatct = 0
|
|
|
+ AND cdr.shopId IS NOT NULL
|
|
|
+ AND cdr.shopID = #{shopId}
|
|
|
+ AND DATE_FORMAT(cc.dateStrings, '%y-%m-%d') > DATE_FORMAT(NOW(), '%y-%m-%d')
|
|
|
+ ORDER BY dateStrings DESC
|
|
|
+ LIMIT 1
|
|
|
+ </select>
|
|
|
</mapper>
|