1
This commit is contained in:
parent
4b5137900f
commit
16fdfa62e4
@ -95,13 +95,16 @@ public class CustomerActiveServiceImpl extends ServiceImpl<CustomerActiveMapper,
|
|||||||
|
|
||||||
/*2、活动关联卡券处理*/
|
/*2、活动关联卡券处理*/
|
||||||
if (GENERAL_YES.equals(active.getIsCoupon())) {
|
if (GENERAL_YES.equals(active.getIsCoupon())) {
|
||||||
|
//注册有礼情况直接领取
|
||||||
if (GENERAL_YES.equals(active.getIsPack())) {
|
if (GENERAL_YES.equals(active.getIsPack())) {
|
||||||
/*2.1 打包领取情况*/
|
if ("zcyl".equals(active.getType())){
|
||||||
List<MemberCoupon> couponList = active.getCouponList();
|
/*2.1 打包领取情况*/
|
||||||
//转换卡券信息
|
List<MemberCoupon> couponList = active.getCouponList();
|
||||||
customerCouponList = customerCouponService.transCoupon(active.getId(), customer.getId(), customer.getUserId(), couponList);
|
//转换卡券信息
|
||||||
//转换日志信息
|
customerCouponList = customerCouponService.transCoupon(active.getId(), customer.getId(), customer.getUserId(), couponList);
|
||||||
changeList = changeService.transChange(customer.getId(), customer.getUserId(), active.getName(), couponList);
|
//转换日志信息
|
||||||
|
changeList = changeService.transChange(customer.getId(), customer.getUserId(), active.getName(), couponList);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/*2.2 非打包领取情况*/
|
/*2.2 非打包领取情况*/
|
||||||
//选中卡券校验
|
//选中卡券校验
|
||||||
|
@ -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.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
import cn.iocoder.yudao.module.custom.entity.CustomerBalance;
|
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.mapper.CustomerBalanceMapper;
|
||||||
import cn.iocoder.yudao.module.custom.service.CustomerBalanceService;
|
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.service.CustomerMainService;
|
||||||
import cn.iocoder.yudao.module.custom.vo.CustomerBalanceSaveReqVO;
|
import cn.iocoder.yudao.module.custom.vo.CustomerBalanceSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO;
|
import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO;
|
||||||
import cn.iocoder.yudao.module.member.entity.ActiveRule;
|
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.service.ActiveMainService;
|
||||||
import cn.iocoder.yudao.module.member.vo.ActiveMainRespVO;
|
import cn.iocoder.yudao.module.member.vo.ActiveMainRespVO;
|
||||||
import cn.iocoder.yudao.module.order.entity.RepairOrderInfo;
|
import cn.iocoder.yudao.module.order.entity.RepairOrderInfo;
|
||||||
@ -46,6 +49,9 @@ public class CustomerBalanceServiceImpl extends ServiceImpl<CustomerBalanceMappe
|
|||||||
@Resource
|
@Resource
|
||||||
@Lazy
|
@Lazy
|
||||||
private ActiveMainService activeMainService;
|
private ActiveMainService activeMainService;
|
||||||
|
@Resource
|
||||||
|
@Lazy
|
||||||
|
private CustomerCouponService customerCouponService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -73,6 +79,11 @@ public class CustomerBalanceServiceImpl extends ServiceImpl<CustomerBalanceMappe
|
|||||||
if (null != orderInfo.getActiveId()) {
|
if (null != orderInfo.getActiveId()) {
|
||||||
//获取当前活动信息
|
//获取当前活动信息
|
||||||
ActiveMainRespVO active = activeMainService.getActiveMain(orderInfo.getActiveId(), true);
|
ActiveMainRespVO active = activeMainService.getActiveMain(orderInfo.getActiveId(), true);
|
||||||
|
//查询关联卡券信息(充值有礼)
|
||||||
|
List<MemberCoupon> couponList = active.getCouponList();
|
||||||
|
//转换卡券信息
|
||||||
|
List<CustomerCoupon> customerCouponList = customerCouponService.transCoupon(active.getId(), customer.getId(), customer.getUserId(), couponList);
|
||||||
|
customerCouponService.saveBatch(customerCouponList);
|
||||||
balance = transBalance(customer, orderInfo.getPayMoney(), active.getRuleList());
|
balance = transBalance(customer, orderInfo.getPayMoney(), active.getRuleList());
|
||||||
} else {
|
} else {
|
||||||
balance = transBalance(customer, orderInfo.getPayMoney(), null);
|
balance = transBalance(customer, orderInfo.getPayMoney(), null);
|
||||||
|
Loading…
Reference in New Issue
Block a user