记得上下班打卡 | git大法好,push需谨慎

Commit db4f09e3 authored by 张国柄's avatar 张国柄

fix:公有券使用时user_coupon.insert逻辑调整;

parent 32cb02d7
......@@ -393,19 +393,20 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
if (vo.getCouType() != -1) {
redisDataUtils.setCouponByUid(uid, dtoList);
LocalDateTime now = LocalDateTime.now();
//入库
if (dto.getCcouponId() == null) {
if (dto.getCcouponId() == null || (null != dto.getCcouponId() && dto.getUsedAt() != null)) {// 是公有券且为使用后退回的券,则更新
queueUtils.sendMsgByRedis(
MQConst.CandyQueue.COUPON_USE.getKey(),
SqlMapping.get("candy_coupon.use",
LocalDateTime.now(), content, uid, uCouponId
now, content, uid, uCouponId
)
);
} else {
queueUtils.sendMsgByRedis(
MQConst.CandyQueue.COUPON_USE.getKey(),
SqlMapping.get("candy_coupon.use_insert",
uCouponId, uid, dto.getCouponId(), LocalDateTime.now(), content
uCouponId, uid, dto.getCouponId(), dto.getBindAt(), dto.getDuedAt(), now, content, now
)
);
}
......
# -- 使用券 --
candy_coupon.use=UPDATE candy_user_coupon SET state = 3 ,used_at = ? , used_for = ? WHERE uid = ? AND ucoupon_id = ?
candy_coupon.use_insert=INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , used_at , used_for ) VALUE ( ? , ? , 3 , ? , ? ,? )
#candy_coupon.use_insert=INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , used_at , used_for ) VALUE ( ? , ? , 3 , ? , ? ,? )
candy_coupon.use_insert=INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , bind_at, dued_at, used_at , used_for, created_at) VALUE ( ? , ? , 3 , ? , ? , ?, ?, ?, ?)
# -- 回退券 --
candy_coupon.back=UPDATE candy_user_coupon SET state = 1 WHERE uid = ? AND ucoupon_id = ?
# -- 领取券 --
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment