过期券发放报错修复
This commit is contained in:
@@ -177,10 +177,14 @@ public class MkShopRechargeServiceImpl extends ServiceImpl<MkShopRechargeMapper,
|
|||||||
// 发放优惠券
|
// 发放优惠券
|
||||||
if (StrUtil.isNotBlank(rechargeDetail.getCouponInfoList())) {
|
if (StrUtil.isNotBlank(rechargeDetail.getCouponInfoList())) {
|
||||||
JSONArray.parseArray(rechargeDetail.getCouponInfoList()).toJavaList(CouponInfoDTO.class).forEach(item -> {
|
JSONArray.parseArray(rechargeDetail.getCouponInfoList()).toJavaList(CouponInfoDTO.class).forEach(item -> {
|
||||||
shopCouponRecordService.grant(shopId, new MkRewardCouponDTO().setCouponId(item.getId())
|
try {
|
||||||
.setNum(item.getNum())
|
shopCouponRecordService.grant(shopId, new MkRewardCouponDTO().setCouponId(item.getId())
|
||||||
.setUserId(shopUser.getUserId())
|
.setNum(item.getNum())
|
||||||
.setShopId(shopId));
|
.setUserId(shopUser.getUserId())
|
||||||
|
.setShopId(shopId));
|
||||||
|
}catch (Exception e) {
|
||||||
|
log.warn("发放优惠券失败", e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 自定义金额
|
// 自定义金额
|
||||||
|
|||||||
Reference in New Issue
Block a user