事务嵌套问题
This commit is contained in:
@@ -191,14 +191,17 @@ 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 -> {
|
||||||
try {
|
if (item.getId() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// try {
|
||||||
shopCouponRecordService.grant(shopId, new MkRewardCouponDTO().setCouponId(item.getId())
|
shopCouponRecordService.grant(shopId, new MkRewardCouponDTO().setCouponId(item.getId())
|
||||||
.setNum(item.getNum())
|
.setNum(item.getNum())
|
||||||
.setUserId(shopUser.getUserId())
|
.setUserId(shopUser.getUserId())
|
||||||
.setShopId(shopId), "充值赠券");
|
.setShopId(shopId), "充值赠券");
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
log.warn("发放优惠券失败", e);
|
// log.warn("发放优惠券失败", e);
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 自定义金额
|
// 自定义金额
|
||||||
|
|||||||
Reference in New Issue
Block a user