|
@@ -67,30 +67,10 @@
|
|
INSERT INTO cm_user_balance_record (userId, type, balanceType, addDate, amount, orderId, remark, delFlag)
|
|
INSERT INTO cm_user_balance_record (userId, type, balanceType, addDate, amount, orderId, remark, delFlag)
|
|
VALUES (#{userId}, #{type}, #{balanceType}, #{addDate}, #{amount}, #{orderId}, #{remark}, #{delFlag})
|
|
VALUES (#{userId}, #{type}, #{balanceType}, #{addDate}, #{amount}, #{orderId}, #{remark}, #{delFlag})
|
|
</insert>
|
|
</insert>
|
|
- <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)
|
|
|
|
- VALUES (#{payWay}, #{payType}, #{receiptType}, #{receiptStatus}, #{receiptAmount}, #{confirmType},
|
|
|
|
- #{receiptDate}, #{confirmDate}, #{reviewDate}, #{updateDate}, #{delFlag})
|
|
|
|
- </insert>
|
|
|
|
- <insert id="insertOrderReceiptRelation" keyColumn="id" keyProperty="id" parameterType="com.caimei365.order.model.po.DiscernReceiptPo" useGeneratedKeys="true">
|
|
|
|
- INSERT INTO cm_receipt_order_relation (relationType, receiptId, associateAmount, orderId, delFlag)
|
|
|
|
- VALUES (#{relationType}, #{receiptId}, #{associateAmount}, #{orderId}, #{delFlag})
|
|
|
|
- </insert>
|
|
|
|
<insert id="insertBeansHistory" parameterType="com.caimei365.order.model.po.UserBeansHistoryPo">
|
|
<insert id="insertBeansHistory" parameterType="com.caimei365.order.model.po.UserBeansHistoryPo">
|
|
INSERT INTO user_beans_history (userId, type, beansType, orderId, num, pushStatus, addTime, delFlag)
|
|
INSERT INTO user_beans_history (userId, type, beansType, orderId, num, pushStatus, addTime, delFlag)
|
|
VALUES (#{userId}, #{type}, #{beansType}, #{orderId}, #{num}, #{pushStatus}, #{addTime}, #{delFlag})
|
|
VALUES (#{userId}, #{type}, #{beansType}, #{orderId}, #{num}, #{pushStatus}, #{addTime}, #{delFlag})
|
|
</insert>
|
|
</insert>
|
|
- <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)
|
|
|
|
- VALUES (#{userId}, #{clubId}, #{orderId}, #{productId}, #{shopId}, #{shopName},
|
|
|
|
- #{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>
|
|
|
|
<update id="updateUserMoney">
|
|
<update id="updateUserMoney">
|
|
UPDATE USER SET userMoney = #{userMoney}, ableUserMoney = #{ableUserMoney}
|
|
UPDATE USER SET userMoney = #{userMoney}, ableUserMoney = #{ableUserMoney}
|
|
WHERE userID = #{userId}
|
|
WHERE userID = #{userId}
|
|
@@ -99,11 +79,6 @@
|
|
UPDATE USER SET userBeans = #{userBeans}
|
|
UPDATE USER SET userBeans = #{userBeans}
|
|
WHERE userID = #{userId}
|
|
WHERE userID = #{userId}
|
|
</update>
|
|
</update>
|
|
- <update id="updatePurchasePrice">
|
|
|
|
- UPDATE repeat_purchase_price SET
|
|
|
|
- currentPrice = #{currentPrice}, taxRate = #{taxRate}, updateTime = #{updateTime}
|
|
|
|
- WHERE id = #{id}
|
|
|
|
- </update>
|
|
|
|
<delete id="deleteOrderInvoiceByOrderId">
|
|
<delete id="deleteOrderInvoiceByOrderId">
|
|
DELETE FROM bp_order_invoice WHERE orderId = #{orderId}
|
|
DELETE FROM bp_order_invoice WHERE orderId = #{orderId}
|
|
</delete>
|
|
</delete>
|
|
@@ -124,7 +99,7 @@
|
|
ableUserMoney,
|
|
ableUserMoney,
|
|
userBeans
|
|
userBeans
|
|
FROM user
|
|
FROM user
|
|
- WHERE userID = #{userID}
|
|
|
|
|
|
+ WHERE userID = #{userId}
|
|
</select>
|
|
</select>
|
|
<select id="getShopNameById" resultType="java.lang.String">
|
|
<select id="getShopNameById" resultType="java.lang.String">
|
|
SELECT `name` FROM shop WHERE shopID = #{shopId}
|
|
SELECT `name` FROM shop WHERE shopID = #{shopId}
|
|
@@ -174,21 +149,7 @@
|
|
WHERE a.addressID = #{addressId}
|
|
WHERE a.addressID = #{addressId}
|
|
LIMIT 1
|
|
LIMIT 1
|
|
</select>
|
|
</select>
|
|
- <select id="getPurchasePricePo" resultType="com.caimei365.order.model.po.PurchasePricePo">
|
|
|
|
- SELECT
|
|
|
|
- id,
|
|
|
|
- userId,
|
|
|
|
- clubId,
|
|
|
|
- orderId,
|
|
|
|
- productId,
|
|
|
|
- shopId,
|
|
|
|
- shopName,
|
|
|
|
- taxRate,
|
|
|
|
- currentPrice,
|
|
|
|
- createTime
|
|
|
|
- FROM repeat_purchase_price
|
|
|
|
- WHERE userId = #{userId} AND productId = #{productId} AND delFlag='0'
|
|
|
|
- </select>
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|