From 16fdfa62e4f4b4daaf77f79dbc077baf64b497d1 Mon Sep 17 00:00:00 2001 From: PQZ Date: Fri, 27 Sep 2024 21:17:58 +0800 Subject: [PATCH] 1 --- .../service/impl/CustomerActiveServiceImpl.java | 15 +++++++++------ .../service/impl/CustomerBalanceServiceImpl.java | 11 +++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java index 3c294b7d..04106b2a 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java @@ -95,13 +95,16 @@ public class CustomerActiveServiceImpl extends ServiceImpl couponList = active.getCouponList(); - //转换卡券信息 - customerCouponList = customerCouponService.transCoupon(active.getId(), customer.getId(), customer.getUserId(), couponList); - //转换日志信息 - changeList = changeService.transChange(customer.getId(), customer.getUserId(), active.getName(), couponList); + if ("zcyl".equals(active.getType())){ + /*2.1 打包领取情况*/ + List couponList = active.getCouponList(); + //转换卡券信息 + customerCouponList = customerCouponService.transCoupon(active.getId(), customer.getId(), customer.getUserId(), couponList); + //转换日志信息 + changeList = changeService.transChange(customer.getId(), customer.getUserId(), active.getName(), couponList); + } } else { /*2.2 非打包领取情况*/ //选中卡券校验 diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerBalanceServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerBalanceServiceImpl.java index 8b41f54b..0fe44877 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerBalanceServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerBalanceServiceImpl.java @@ -3,12 +3,15 @@ package cn.iocoder.yudao.module.custom.service.impl; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.custom.entity.CustomerBalance; +import cn.iocoder.yudao.module.custom.entity.CustomerCoupon; import cn.iocoder.yudao.module.custom.mapper.CustomerBalanceMapper; import cn.iocoder.yudao.module.custom.service.CustomerBalanceService; +import cn.iocoder.yudao.module.custom.service.CustomerCouponService; import cn.iocoder.yudao.module.custom.service.CustomerMainService; import cn.iocoder.yudao.module.custom.vo.CustomerBalanceSaveReqVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; import cn.iocoder.yudao.module.member.entity.ActiveRule; +import cn.iocoder.yudao.module.member.entity.MemberCoupon; import cn.iocoder.yudao.module.member.service.ActiveMainService; import cn.iocoder.yudao.module.member.vo.ActiveMainRespVO; import cn.iocoder.yudao.module.order.entity.RepairOrderInfo; @@ -46,6 +49,9 @@ public class CustomerBalanceServiceImpl extends ServiceImpl couponList = active.getCouponList(); + //转换卡券信息 + List customerCouponList = customerCouponService.transCoupon(active.getId(), customer.getId(), customer.getUserId(), couponList); + customerCouponService.saveBatch(customerCouponList); balance = transBalance(customer, orderInfo.getPayMoney(), active.getRuleList()); } else { balance = transBalance(customer, orderInfo.getPayMoney(), null);