Commit bf6d268c by wuwenlong

Merge remote-tracking branch 'origin/dev' into dev

parents b8ae7060 5c27aca8
......@@ -124,6 +124,9 @@ public class RedisTask {
JSONObject object = tiktokService.certificateGet(coupon.getCouponCode());
JSONObject certificate = object.getJSONObject("certificate");
Integer status = certificate.getInt("status");
if (status.equals(TiktokCouponStatusEnum.AVAILABLE.getCode())) {
expiredCoupons.add(coupon.getId());
}
if (status.equals(TiktokCouponStatusEnum.REFUND_SUCCESS.getCode()) | status.equals(TiktokCouponStatusEnum.REFUNDING.getCode())) {
expiredCoupons.add(coupon.getId());
}
......
......@@ -536,6 +536,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
JSONObject object = tiktokService.certificateGet(byId.getCouponCode());
JSONObject certificate = object.getJSONObject("certificate");
Integer status = certificate.getInt("status");
if (status.equals(TiktokCouponStatusEnum.AVAILABLE.getCode())) {
consumerCouponService.deleteSConsumerCouponById(byId.getId());
throw new RuntimeException("优惠券异常,请重新验劵");
}
if (status.equals(TiktokCouponStatusEnum.REFUND_SUCCESS.getCode()) | status.equals(TiktokCouponStatusEnum.REFUNDING.getCode())) {
throw new RuntimeException("优惠券异常,请稍后再试");
}
......
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