|
@@ -81,6 +81,16 @@
|
|
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}
|
|
@@ -89,6 +99,11 @@
|
|
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>
|
|
@@ -159,6 +174,21 @@
|
|
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>
|