Commit ed1bb074 by wuwenlong

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

parents 937c7882 9d34d6ce
......@@ -116,7 +116,7 @@ public class RedisTask {
expiredCoupons.add(coupon.getId());
}
logger.info("券码:{}->查询结束:{}", coupon.getCouponCode(), getconsumed);
} else if (StringUtils.isNoneEmpty(coupon.getTiktokSkuId()) && coupon.getPlatformType().equals(PlatformTypeEnum.MEITUAN.getCode())) {
} else if (StringUtils.isNoneEmpty(coupon.getTiktokSkuId()) && coupon.getPlatformType().equals(PlatformTypeEnum.TIKTOK.getCode())) {
//抖音复验券
JSONObject object = tiktokService.certificateGet(coupon.getCouponCode());
JSONObject certificate = object.getJSONObject("certificate");
......
......@@ -536,9 +536,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
JSONObject object = tiktokService.certificateGet(byId.getCouponCode());
JSONObject certificate = object.getJSONObject("certificate");
Integer status = certificate.getInt("status");
Boolean isDelete = false;
if (status.equals(TiktokCouponStatusEnum.AVAILABLE.getCode())) {
consumerCouponService.deleteSConsumerCouponById(byId.getId());
throw new RuntimeException("优惠券异常,请重新验劵");
isDelete = true;
}
if (isDelete) {
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