## 去掉不需要的活动代码;
This commit is contained in:
parent
77c389c85e
commit
ab2f87992c
|
|
@ -1,31 +0,0 @@
|
|||
package com.hzs.activity.base;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.EApprovalBusiness;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
|
||||
/**
|
||||
* 活动审批相关服务入口
|
||||
*/
|
||||
public interface IActivityApprovalServiceApi {
|
||||
|
||||
/**
|
||||
* 活动服务信息处理回调
|
||||
*
|
||||
* @param approvalBusinessResultDTO
|
||||
* @return
|
||||
*/
|
||||
R<Boolean> approvalCallback(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
|
||||
/**
|
||||
* 活动服务信息签呈查询
|
||||
*
|
||||
* @param eApprovalBusiness 业务类型
|
||||
* @param businessCode 业务单号
|
||||
* @param pkCountry 所属国家
|
||||
* @return
|
||||
*/
|
||||
R<?> queryApprovalData(EApprovalBusiness eApprovalBusiness, String businessCode, Integer pkCountry);
|
||||
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ package com.hzs.activity.base;
|
|||
import com.hzs.activity.dto.AcRecommendUpgradeDTO;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.activity.recommend.AcRepurCouponsRuleConfig;
|
||||
import com.hzs.common.domain.activity.recommend.ext.AcRepurSharRuleConfigExt;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -54,15 +53,6 @@ public interface IActivityServiceApi {
|
|||
*/
|
||||
R<List<AcRepurCouponsRuleConfig>> queryAcRepurchaseCouponsRule(Date settleDate);
|
||||
|
||||
/**
|
||||
* 查询复购券均分收益
|
||||
*
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
R<List<AcRepurSharRuleConfigExt>> queryRepurSharRuleConfig(Date startDate, Date endDate);
|
||||
|
||||
/**
|
||||
* 调用调用直推升级接口
|
||||
*
|
||||
|
|
|
|||
|
|
@ -5,9 +5,6 @@ import com.hzs.common.domain.activity.base.AcApprovalLog;
|
|||
|
||||
/**
|
||||
* 活动审批日志 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-22
|
||||
*/
|
||||
public interface AcApprovalLogMapper extends BaseMapper<AcApprovalLog> {
|
||||
|
||||
|
|
|
|||
|
|
@ -6,14 +6,6 @@ import lombok.Data;
|
|||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: hzs_cloud
|
||||
* @BelongsPackage: com.hzs.activity.controller.param
|
||||
* @Author: yh
|
||||
* @CreateTime: 2023-04-20 17:02
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ConsumeRuleConfigParam implements Serializable {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,240 +0,0 @@
|
|||
package com.hzs.activity.base.provider;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.hzs.activity.base.IActivityApprovalServiceApi;
|
||||
import com.hzs.activity.base.service.IAcApprovalLogService;
|
||||
import com.hzs.activity.base.service.IActivityService;
|
||||
import com.hzs.activity.consume.service.IAcConsumeRuleConfigService;
|
||||
import com.hzs.activity.consume.service.IAcMemberConsumeRuleService;
|
||||
import com.hzs.activity.draw.param.PurchasedTimesParam;
|
||||
import com.hzs.activity.draw.service.IAcDrawGiftRuleConfigService;
|
||||
import com.hzs.activity.draw.service.IAcDrawRewardNumService;
|
||||
import com.hzs.activity.pick.param.AcPickSaveDetailParam;
|
||||
import com.hzs.activity.pick.service.IAcPickService;
|
||||
import com.hzs.activity.recommend.param.AcRecommendParam;
|
||||
import com.hzs.activity.recommend.service.IAcRepurCouponsRuleConfigService;
|
||||
import com.hzs.activity.wares.service.IAcWaresRuleConfigService;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.exception.base.BaseException;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.domain.activity.base.AcApprovalLog;
|
||||
import com.hzs.member.base.IMemberServiceApi;
|
||||
import com.hzs.sale.product.IProductServiceApi;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动审批相关服务
|
||||
*/
|
||||
@DubboService
|
||||
public class ActivityApprovalProvider implements IActivityApprovalServiceApi {
|
||||
|
||||
@Autowired
|
||||
private IAcDrawRewardNumService drawRewardNumService;
|
||||
@Autowired
|
||||
private IAcConsumeRuleConfigService consumeRuleConfigService;
|
||||
@Autowired
|
||||
private IActivityService activityService;
|
||||
@Autowired
|
||||
private IAcWaresRuleConfigService waresRuleConfigService;
|
||||
@Autowired
|
||||
private IAcDrawGiftRuleConfigService drawGiftConfigService;
|
||||
@Autowired
|
||||
private IAcPickService iAcPickService;
|
||||
@Autowired
|
||||
private IAcApprovalLogService iAcApprovalLogService;
|
||||
@Autowired
|
||||
private IAcRepurCouponsRuleConfigService acRepurCouponsRuleConfigService;
|
||||
@Autowired
|
||||
private IAcMemberConsumeRuleService iAcMemberConsumeRuleService;
|
||||
|
||||
@DubboReference
|
||||
IMemberServiceApi iMemberServiceApi;
|
||||
@DubboReference
|
||||
IProductServiceApi iProductServiceApi;
|
||||
|
||||
|
||||
@Override
|
||||
public R<Boolean> approvalCallback(ApprovalBusinessResultDTO approvalBusinessResultDTO) {
|
||||
try {
|
||||
// 返回内容
|
||||
String str = null;
|
||||
if (EApproveStatus.FINISH.getValue() == approvalBusinessResultDTO.getEApproveStatus().getValue()) {
|
||||
// 通过处理
|
||||
switch (approvalBusinessResultDTO.getEApprovalBusiness()) {
|
||||
case PICK_ADD:
|
||||
// 提货充值
|
||||
str = iAcPickService.pickApprovalAgree(approvalBusinessResultDTO);
|
||||
break;
|
||||
case PICK_ADD_DEL:
|
||||
// 提货充值删除
|
||||
str = iAcPickService.delpickApprovalAgree(approvalBusinessResultDTO);
|
||||
break;
|
||||
// 直推赠送
|
||||
case DIRECT_PUSH_GIFT:
|
||||
str = acRepurCouponsRuleConfigService.approvalAgree(approvalBusinessResultDTO);
|
||||
break;
|
||||
case LOTTERY_DRAW:
|
||||
str = drawGiftConfigService.approvalAgree(approvalBusinessResultDTO);
|
||||
break;
|
||||
case TOURISM_SAVE:
|
||||
case TOURISM_UPDATE:
|
||||
case TOURISM_DELETE:
|
||||
str = activityService.approvalAgree(approvalBusinessResultDTO);
|
||||
break;
|
||||
case PRODUCT_GIFT_ADD:
|
||||
case PRODUCT_GIFT_UPDATE:
|
||||
case PRODUCT_GIFT_REMOVE:
|
||||
// 商品赠送添加/修改/删除
|
||||
str = waresRuleConfigService.approvalAgree(approvalBusinessResultDTO);
|
||||
break;
|
||||
case CONSUME_GIFT_ADD:
|
||||
case CONSUME_GIFT_UPDATE:
|
||||
case CONSUME_GIFT_REMOVE:
|
||||
// 消费赠送添加/修改/删除
|
||||
consumeRuleConfigService.approvalAgree(approvalBusinessResultDTO);
|
||||
break;
|
||||
case MEMBER_CONSUME_GIFT_ADD:
|
||||
case MEMBER_CONSUME_GIFT_UPDATE:
|
||||
case MEMBER_CONSUME_GIFT_REMOVE:
|
||||
// 会员消费赠送添加/修改/删除
|
||||
iAcMemberConsumeRuleService.approvalAgree(approvalBusinessResultDTO);
|
||||
break;
|
||||
case LOTTERY_DRAW_ADD:
|
||||
case LOTTERY_DRAW_UPDATE:
|
||||
case LOTTERY_DRAW_REMOVE:
|
||||
// 抽奖配置添加/修改/删除
|
||||
drawGiftConfigService.approvalAgree(approvalBusinessResultDTO);
|
||||
break;
|
||||
case PUR_CHASED_TIMES:
|
||||
// 充值已购买次数
|
||||
drawRewardNumService.rechargePurchasedTimes(approvalBusinessResultDTO);
|
||||
break;
|
||||
case UN_PUR_CHASED_TIMES:
|
||||
// 充值未购买次数
|
||||
drawRewardNumService.unRechargePurchasedTimes(approvalBusinessResultDTO);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
} else {
|
||||
// 驳回处理
|
||||
switch (approvalBusinessResultDTO.getEApprovalBusiness()) {
|
||||
case PICK_ADD:
|
||||
// 提货充值
|
||||
str = iAcPickService.pickApprovalReject(approvalBusinessResultDTO);
|
||||
break;
|
||||
// 直推赠送
|
||||
case DIRECT_PUSH_GIFT:
|
||||
str = acRepurCouponsRuleConfigService.approvalReject(approvalBusinessResultDTO);
|
||||
break;
|
||||
case LOTTERY_DRAW:
|
||||
str = acRepurCouponsRuleConfigService.approvalReject(approvalBusinessResultDTO);
|
||||
break;
|
||||
case PRODUCT_GIFT_ADD:
|
||||
case PRODUCT_GIFT_UPDATE:
|
||||
case PRODUCT_GIFT_REMOVE:
|
||||
// 商品赠送添加
|
||||
str = waresRuleConfigService.approvalReject(approvalBusinessResultDTO);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(str)) {
|
||||
// 返回有信息,说明有问题,抛出异常
|
||||
throw new BaseException(str);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 活动类审批诉求查询
|
||||
* @author:
|
||||
* @date: 2023/4/25 16:55
|
||||
* @param: [eApprovalBusiness, businessCode, pkCountry]
|
||||
* @return: com.hzs.common.core.domain.R
|
||||
**/
|
||||
@Override
|
||||
public R<?> queryApprovalData(EApprovalBusiness eApprovalBusiness, String businessCode, Integer pkCountry) {
|
||||
try {
|
||||
List<AcApprovalLog> acApprovalLogList = iAcApprovalLogService.queryApprovalLogList(eApprovalBusiness, businessCode, pkCountry);
|
||||
switch (eApprovalBusiness) {
|
||||
case PICK_ADD:
|
||||
case PICK_ADD_DEL:
|
||||
// 提货充值
|
||||
List<AcPickSaveDetailParam> list = new ArrayList<>();
|
||||
for (AcApprovalLog approvalLog : acApprovalLogList) {
|
||||
AcPickSaveDetailParam afterData = JSONUtil.toBean(approvalLog.getAfterData(), AcPickSaveDetailParam.class);
|
||||
afterData.setMemberName(iMemberServiceApi.getMember(afterData.getMemberCode()).getData().getMemberName());
|
||||
if (afterData.getPkProduct() != null) {
|
||||
afterData.setProductName(iProductServiceApi.getProduct(afterData.getPkProduct()).getData().getProductName() + "(" + afterData.getSpecsName() + ")");
|
||||
}
|
||||
list.add(afterData);
|
||||
}
|
||||
return R.ok(list);
|
||||
// 直推赠送
|
||||
case DIRECT_PUSH_GIFT:
|
||||
case TOURISM_UPDATE:
|
||||
case TOURISM_DELETE:
|
||||
case TOURISM_SAVE:
|
||||
case LOTTERY_DRAW:
|
||||
// 抽奖
|
||||
return R.ok(getRecommendApprovalData(acApprovalLogList.get(0)));
|
||||
case PUR_CHASED_TIMES:
|
||||
case UN_PUR_CHASED_TIMES:
|
||||
// 充值已购买次数
|
||||
return R.ok(getRecommendApprovalDataInfo(acApprovalLogList.get(0)));
|
||||
case CONSUME_GIFT_ADD:
|
||||
case CONSUME_GIFT_UPDATE:
|
||||
case CONSUME_GIFT_REMOVE:
|
||||
case PRODUCT_GIFT_ADD:
|
||||
case PRODUCT_GIFT_UPDATE:
|
||||
case PRODUCT_GIFT_REMOVE:
|
||||
case LOTTERY_DRAW_ADD:
|
||||
case LOTTERY_DRAW_UPDATE:
|
||||
case LOTTERY_DRAW_REMOVE:
|
||||
case MEMBER_CONSUME_GIFT_ADD:
|
||||
case MEMBER_CONSUME_GIFT_UPDATE:
|
||||
case MEMBER_CONSUME_GIFT_REMOVE:
|
||||
return R.ok(getRecommendApprovalData(acApprovalLogList.get(0)));
|
||||
default:
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
private AcRecommendParam getRecommendApprovalData(AcApprovalLog acApprovalLog) {
|
||||
String data = acApprovalLog.getAfterData();
|
||||
return JSONUtil.toBean(data, AcRecommendParam.class);
|
||||
|
||||
}
|
||||
|
||||
private PurchasedTimesParam getRecommendApprovalDataInfo(AcApprovalLog acApprovalLog) {
|
||||
String data = acApprovalLog.getAfterData();
|
||||
if (StringUtils.isNotBlank(data)) {
|
||||
JSONObject js = new JSONObject(data);
|
||||
String memberCode = js.getStr("memberCode");
|
||||
String memberName = js.getStr("memberName");
|
||||
Integer num = js.getInt("num");
|
||||
PurchasedTimesParam purchasedTimesParam = new PurchasedTimesParam();
|
||||
purchasedTimesParam.setMemberCode(memberCode);
|
||||
purchasedTimesParam.setMemberName(memberName);
|
||||
purchasedTimesParam.setNum(num);
|
||||
return purchasedTimesParam;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -7,10 +7,8 @@ import com.hzs.activity.draw.service.IAcDrawRewardNumService;
|
|||
import com.hzs.activity.dto.AcRecommendUpgradeDTO;
|
||||
import com.hzs.activity.recommend.dto.AcRecommendUpgrade;
|
||||
import com.hzs.activity.recommend.service.IAcRepurCouponsRuleConfigService;
|
||||
import com.hzs.activity.recommend.service.IAcRepurSharRuleConfigService;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.activity.recommend.AcRepurCouponsRuleConfig;
|
||||
import com.hzs.common.domain.activity.recommend.ext.AcRepurSharRuleConfigExt;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
|
|
@ -32,8 +30,6 @@ public class ActivityServiceProvider implements IActivityServiceApi {
|
|||
@Autowired
|
||||
private IAcRepurCouponsRuleConfigService acRepurCouponsRuleConfigService;
|
||||
@Autowired
|
||||
private IAcRepurSharRuleConfigService acRepurSharRuleConfigService;
|
||||
@Autowired
|
||||
private IActivityService iActivityService;
|
||||
|
||||
@Override
|
||||
|
|
@ -82,11 +78,6 @@ public class ActivityServiceProvider implements IActivityServiceApi {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<AcRepurSharRuleConfigExt>> queryRepurSharRuleConfig(Date startDate, Date endDate) {
|
||||
return R.ok(acRepurSharRuleConfigService.queryRepurSharRuleConfig(startDate, endDate));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> invokeRecommendUpgrade(AcRecommendUpgradeDTO recommendUpgradeDTO) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 活动审批日志 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-22
|
||||
*/
|
||||
public interface IAcApprovalLogService extends IService<AcApprovalLog> {
|
||||
|
||||
|
|
@ -25,16 +22,6 @@ public interface IAcApprovalLogService extends IService<AcApprovalLog> {
|
|||
*/
|
||||
AcApprovalLog queryApprovalLog(EApprovalBusiness eApprovalBusiness, String businessCode, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 查询审批记录列表
|
||||
*
|
||||
* @param eApprovalBusiness 业务类型
|
||||
* @param businessCode 业务单号
|
||||
* @param pkCountry 所属国家
|
||||
* @return
|
||||
*/
|
||||
List<AcApprovalLog> queryApprovalLogList(EApprovalBusiness eApprovalBusiness, String businessCode, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 更新审核修改记录
|
||||
*
|
||||
|
|
|
|||
|
|
@ -11,13 +11,9 @@ import com.hzs.common.domain.activity.base.AcApprovalLog;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动审批日志 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-22
|
||||
*/
|
||||
@Service
|
||||
public class AcApprovalLogServiceImpl extends ServiceImpl<AcApprovalLogMapper, AcApprovalLog> implements IAcApprovalLogService {
|
||||
|
|
@ -32,16 +28,6 @@ public class AcApprovalLogServiceImpl extends ServiceImpl<AcApprovalLogMapper, A
|
|||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AcApprovalLog> queryApprovalLogList(EApprovalBusiness eApprovalBusiness, String businessCode, Integer pkCountry) {
|
||||
// 查询修改记录
|
||||
LambdaQueryWrapper<AcApprovalLog> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AcApprovalLog::getBusinessCode, businessCode);
|
||||
queryWrapper.eq(AcApprovalLog::getApprovalType, eApprovalBusiness.getValue());
|
||||
queryWrapper.eq(AcApprovalLog::getPkCountry, pkCountry);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateApprovalLog(EApprovalBusiness eApprovalBusiness, String businessCode, Integer pkCountry, Long userId,
|
||||
EApproveRechargeStatus approveStatus, String remark) {
|
||||
|
|
|
|||
|
|
@ -7,14 +7,6 @@ import lombok.EqualsAndHashCode;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: hzs_cloud
|
||||
* @BelongsPackage: com.hzs.activity.base.vo
|
||||
* @Author: yh
|
||||
* @CreateTime: 2023-04-21 18:56
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ConsumeRuleConfigVo extends AcConsumeRuleConfig {
|
||||
|
|
|
|||
|
|
@ -9,17 +9,11 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 消费买赠规则配置表 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-20
|
||||
*/
|
||||
public interface AcConsumeRuleConfigMapper extends BaseMapper<AcConsumeRuleConfig> {
|
||||
|
||||
/*
|
||||
* @description: 查询买赠活动赠品配置根据条件
|
||||
* @author: sui q
|
||||
* @date: 2023/4/25 19:26
|
||||
* @param: null null
|
||||
* 查询买赠活动赠品配置根据条件
|
||||
**/
|
||||
List<AcConsumeRuleConfigExt> queryConsumeGiftConfigByCondition(GiftConfigParam giftConfigParam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 会员消费赠送活动规则配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/11/28 11:30
|
||||
* @param:
|
||||
* @return:
|
||||
* 会员消费赠送活动规则配置
|
||||
**/
|
||||
public interface AcMemberConsumeRuleMapper extends BaseMapper<AcMemberConsumeRule> {
|
||||
|
||||
|
|
|
|||
|
|
@ -11,17 +11,11 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 消费买赠规则配置表 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-20
|
||||
*/
|
||||
public interface IAcConsumeRuleConfigService extends IService<AcConsumeRuleConfig> {
|
||||
|
||||
/*
|
||||
* @description: 查询业绩赠送活动赠品配置根据条件
|
||||
* @author: sui q
|
||||
* @date: 2023/4/25 19:26
|
||||
* @param: null null
|
||||
* 查询业绩赠送活动赠品配置根据条件
|
||||
**/
|
||||
List<AcConsumeRuleConfigExt> queryConsumeGiftConfigByCondition(GiftConfigParam giftConfigParam);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package com.hzs.activity.consume.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.activity.base.vo.AcMemberConsumeRuleVo;
|
||||
import com.hzs.activity.recommend.param.AcRecommendParam;
|
||||
import com.hzs.common.domain.activity.consume.AcMemberConsumeRule;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
import com.hzs.common.domain.activity.consume.ext.AcMemberConsumeRuleExt;
|
||||
|
|
@ -12,32 +10,20 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 会员消费赠送活动规则配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/11/28 11:30
|
||||
* @param:
|
||||
* @return:
|
||||
* 会员消费赠送活动规则配置
|
||||
**/
|
||||
public interface IAcMemberConsumeRuleService extends IService<AcMemberConsumeRule> {
|
||||
|
||||
|
||||
/**
|
||||
* @description:会员消费赠送发起签呈
|
||||
* @author: zhang jing
|
||||
* @date: 2024/11/29 9:42
|
||||
* @param: [memberConsumeRuleVo]
|
||||
* @return: java.lang.Boolean
|
||||
* 会员消费赠送发起签呈
|
||||
**/
|
||||
String onLinePetition(AcMemberConsumeRuleVo memberConsumeRuleVo);
|
||||
|
||||
/**
|
||||
* @description: 会员消费赠审批
|
||||
* @author: zhang jing
|
||||
* @date: 2024/11/29 16:32
|
||||
* @param: [approvalBusinessResultDTO]
|
||||
* @return: java.lang.String
|
||||
* 会员消费赠审批
|
||||
**/
|
||||
String approvalAgree(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
/**
|
||||
* 规则列表以及商品信息
|
||||
*
|
||||
|
|
@ -51,27 +37,17 @@ public interface IAcMemberConsumeRuleService extends IService<AcMemberConsumeRul
|
|||
List<AcMemberConsumeRuleExt> listRuleAndProduct(Date startDate, Date endDate, Integer pkGrade, Integer memberPoint, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* @description: 新增会员消费活动
|
||||
* @author: zhang jing
|
||||
* @date: 2024/12/2 17:15
|
||||
* @param: [mcrVo]
|
||||
* @return: java.lang.Long
|
||||
* 新增会员消费活动
|
||||
**/
|
||||
Long saveMemberConsumeRule(AcMemberConsumeRuleVo mcrVo);
|
||||
|
||||
/**
|
||||
* @description: 修改会员消费活动规则表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/12/2 17:14
|
||||
* @param: [mcrVo]
|
||||
* @return: void
|
||||
* 修改会员消费活动规则表
|
||||
**/
|
||||
void updateConsumptionGift(AcMemberConsumeRuleVo mcrVo);
|
||||
|
||||
/**
|
||||
* @description: 删除会员消费活动
|
||||
* @author: zhang jing
|
||||
* @date: 2024/12/2 17:14
|
||||
* @param: [pkId]
|
||||
* @return: void
|
||||
* 删除会员消费活动
|
||||
**/
|
||||
void removeActivity(Integer pkId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,9 +43,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 消费买赠规则配置表 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-20
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -3,22 +3,17 @@ package com.hzs.activity.consume.service.impl;
|
|||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.activity.base.param.ActivityParam;
|
||||
import com.hzs.activity.base.param.ConsumeRuleConfigParam;
|
||||
import com.hzs.activity.base.service.IAcApprovalLogService;
|
||||
import com.hzs.activity.base.service.IAcBaseConfigService;
|
||||
import com.hzs.activity.base.service.IAcGoalMemberConfigService;
|
||||
import com.hzs.activity.base.service.IActivityService;
|
||||
import com.hzs.activity.base.vo.AcMemberConsumeRuleVo;
|
||||
import com.hzs.activity.base.vo.ConsumeRuleConfigVo;
|
||||
import com.hzs.activity.consume.mapper.AcMemberConsumeRuleMapper;
|
||||
import com.hzs.activity.consume.service.IAcMemberConsumeRuleService;
|
||||
import com.hzs.activity.recommend.param.AcRecommendParam;
|
||||
import com.hzs.activity.wares.service.IAcGiftConfigService;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.CommonUtil;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
|
|
@ -27,18 +22,12 @@ import com.hzs.common.domain.activity.base.AcBaseConfig;
|
|||
import com.hzs.common.domain.activity.base.AcGiftConfig;
|
||||
import com.hzs.common.domain.activity.base.AcGoalMemberConfig;
|
||||
import com.hzs.common.domain.activity.base.ext.AcGiftConfigExt;
|
||||
import com.hzs.common.domain.activity.consume.AcConsumeRuleConfig;
|
||||
import com.hzs.common.domain.activity.consume.AcConsumeShieldConfig;
|
||||
import com.hzs.common.domain.activity.consume.AcMemberConsumeRule;
|
||||
import com.hzs.common.domain.activity.consume.ext.AcMemberConsumeRuleExt;
|
||||
import com.hzs.common.domain.activity.wares.AcWaresRuleConfig;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.system.sys.IApprovalServiceApi;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
import com.hzs.system.sys.dto.ApprovalSubmitDTO;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -47,14 +36,9 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 会员消费赠送活动规则配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/11/28 11:30
|
||||
* @param:
|
||||
* @return:
|
||||
* 会员消费赠送活动规则配置
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
|
|
@ -64,8 +48,6 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
private IAcApprovalLogService acApprovalLogService;
|
||||
@Autowired
|
||||
private IActivityService iActivityService;
|
||||
@DubboReference
|
||||
IApprovalServiceApi approvalServiceApi;
|
||||
@Autowired
|
||||
private IAcBaseConfigService baseConfigService;
|
||||
@Autowired
|
||||
|
|
@ -73,18 +55,10 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
@Autowired
|
||||
private IAcGoalMemberConfigService iAcGoalMemberConfigService;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 会员消费赠送发起签呈
|
||||
* @author: zhang jing
|
||||
* @date: 2024/11/29 9:42
|
||||
* @param: [memberConsumeRuleVo]
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String onLinePetition(AcMemberConsumeRuleVo memberConsumeRuleVo) {
|
||||
log.info("商品赠送入参{}",JSONUtil.toJsonStr(memberConsumeRuleVo));
|
||||
log.info("商品赠送入参{}", JSONUtil.toJsonStr(memberConsumeRuleVo));
|
||||
EApprovalBusiness approvalBusiness = null;
|
||||
if (memberConsumeRuleVo.getControlType() == EControlType.SAVE.getValue()) {
|
||||
approvalBusiness = EApprovalBusiness.MEMBER_CONSUME_GIFT_ADD;
|
||||
|
|
@ -113,7 +87,7 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
activityParam.setActType(EActType.MEMBER_CONSUMPTION.getValue());
|
||||
memberConsumeRuleVo.setActivityParam(activityParam);
|
||||
updateConsumptionGift(memberConsumeRuleVo);
|
||||
}else if (memberConsumeRuleVo.getControlType().equals(EControlType.DELETE.getValue())) {
|
||||
} else if (memberConsumeRuleVo.getControlType().equals(EControlType.DELETE.getValue())) {
|
||||
ActivityParam activityParam = memberConsumeRuleVo.getActivityParam();
|
||||
Long pkId = activityParam.getPkId();
|
||||
removeActivity(pkId.intValue());
|
||||
|
|
@ -129,34 +103,7 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
}
|
||||
|
||||
/**
|
||||
* @description: 发起签呈
|
||||
* @author: zhang jing
|
||||
* @date: 2024/11/29 9:44
|
||||
* @param: [memberConsumeRuleVo, approvalBusiness]
|
||||
* @return: java.lang.Boolean
|
||||
**/
|
||||
public Boolean submitApproval(AcMemberConsumeRuleVo memberConsumeRuleVo, EApprovalBusiness approvalBusiness) {
|
||||
//保存审批日志
|
||||
AcApprovalLog approvalLog = saveApprovalLog(memberConsumeRuleVo, approvalBusiness);
|
||||
ApprovalSubmitDTO approvalSubmitDTO = ApprovalSubmitDTO.builder().eApprovalBusiness(approvalBusiness)
|
||||
.businessCode(approvalLog.getBusinessCode())
|
||||
.businessData(JSONObject.toJSONString(memberConsumeRuleVo.getActivityParam()))
|
||||
.signType(ESignType.getEnumByValue(memberConsumeRuleVo.getSignType())).userIdList(memberConsumeRuleVo.getUserIdList())
|
||||
.sendIdList(memberConsumeRuleVo.getSendIdList()).remark(memberConsumeRuleVo.getRemark()).fileList(memberConsumeRuleVo.getFileList())
|
||||
.build();
|
||||
R<String> submit = approvalServiceApi.submit(approvalSubmitDTO, memberConsumeRuleVo.getLoginUser());
|
||||
if (!submit.isSuccess()) {
|
||||
throw new RuntimeException("旅游活动参数提交审批失败!");
|
||||
}
|
||||
return submit.isSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 保存审批日志
|
||||
* @author: zhang jing
|
||||
* @date: 2024/11/29 9:44
|
||||
* @param: [memberConsumeRuleVo, approvalBusiness]
|
||||
* @return: com.hzs.common.domain.activity.base.AcApprovalLog
|
||||
* 保存审批日志
|
||||
**/
|
||||
public AcApprovalLog saveApprovalLog(AcMemberConsumeRuleVo memberConsumeRuleVo, EApprovalBusiness approvalBusiness) {
|
||||
Integer controlType = memberConsumeRuleVo.getControlType();
|
||||
|
|
@ -176,14 +123,8 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
return approvalLog;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description: 会员消费赠送审批
|
||||
* @author: zhang jing
|
||||
* @date: 2024/11/29 16:33
|
||||
* @param: [businessResult]
|
||||
* @return: java.lang.String
|
||||
* 会员消费赠送审批
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
@ -218,7 +159,7 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
updateConsumptionGift(memberConsumeRuleVo);
|
||||
// IActivityService.createBaseConfigLog(activityParam, new StringBuffer(), activityParam.getPkBaseId(), EApprovalBusiness.CONSUME_GIFT_UPDATE.getValue(), true);
|
||||
return null;
|
||||
}else if (controlType.equals(EControlType.DELETE.getValue())) {
|
||||
} else if (controlType.equals(EControlType.DELETE.getValue())) {
|
||||
ActivityParam activityParam = memberConsumeRuleVo.getActivityParam();
|
||||
Long pkBaseId = activityParam.getPkBaseId();
|
||||
AcBaseConfig baseConfig = baseConfigService.getById(pkBaseId);
|
||||
|
|
@ -229,13 +170,6 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增消费赠送规格
|
||||
*
|
||||
* @param mcrVo
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long saveMemberConsumeRule(AcMemberConsumeRuleVo mcrVo) {
|
||||
|
|
@ -248,13 +182,6 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
return baseConfig.getPkId();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description:修改会员消费赠送规则
|
||||
* @author: zhang jing
|
||||
* @date: 2024/12/2 16:17
|
||||
* @param: [mcrVo]
|
||||
* @return: void
|
||||
**/
|
||||
@Override
|
||||
public void updateConsumptionGift(AcMemberConsumeRuleVo mcrVo) {
|
||||
Long pkId = mcrVo.getActivityParam().getPkId();
|
||||
|
|
@ -262,8 +189,8 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
AcBaseConfig baseConfig = BeanUtil.copyProperties(mcrVo.getActivityParam(), AcBaseConfig.class);
|
||||
baseConfigService.updateById(baseConfig);
|
||||
//删除会员消费活动赠品配置表
|
||||
if(CollectionUtil.isNotEmpty(mcrVo.getMcrList())){
|
||||
for(AcMemberConsumeRuleExt mcrex:mcrVo.getMcrList()){
|
||||
if (CollectionUtil.isNotEmpty(mcrVo.getMcrList())) {
|
||||
for (AcMemberConsumeRuleExt mcrex : mcrVo.getMcrList()) {
|
||||
// 消费赠送规格配置
|
||||
LambdaQueryWrapper<AcGiftConfig> delGif = new LambdaQueryWrapper<>();
|
||||
delGif.eq(AcGiftConfig::getPkRuleId, mcrex.getPkId());
|
||||
|
|
@ -285,11 +212,7 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
}
|
||||
|
||||
/**
|
||||
* @description: 新增会员消费活动规则和活动赠品
|
||||
* @author: zhang jing
|
||||
* @date: 2024/12/2 16:43
|
||||
* @param: [mcrVo, baseConfig]
|
||||
* @return: void
|
||||
* 新增会员消费活动规则和活动赠品
|
||||
**/
|
||||
public void saveConsumeRuleConfigService(AcMemberConsumeRuleVo mcrVo, AcBaseConfig baseConfig) {
|
||||
List<AcMemberConsumeRuleExt> mcrList = mcrVo.getMcrList();
|
||||
|
|
@ -297,36 +220,32 @@ public class AcMemberConsumeRuleServiceImpl extends ServiceImpl<AcMemberConsumeR
|
|||
/**
|
||||
* 新增会员消费规则配置
|
||||
*/
|
||||
Date date=new Date();
|
||||
Date date = new Date();
|
||||
mcr.setPkBaseId(baseConfig.getPkId());
|
||||
mcr.setCreationTime(date);
|
||||
mcr.setPkCreator(mcrVo.getLoginUser().getUserId());
|
||||
mcr.setPkCountry(mcrVo.getLoginUser().getDataCountry());
|
||||
baseMapper.insert(mcr);
|
||||
/**
|
||||
* 活动赠品配置
|
||||
*/
|
||||
List<AcGiftConfigExt> giftConfigExList = mcr.getWgcList();
|
||||
List<AcGiftConfig> giftConfigList = new ArrayList<>();
|
||||
for (AcGiftConfigExt giftConfigExt : giftConfigExList) {
|
||||
giftConfigExt.setPkRuleId(mcr.getPkId());
|
||||
giftConfigExt.setActType(baseConfig.getActType());
|
||||
giftConfigExt.setPkCreator(baseConfig.getPkCreator());
|
||||
giftConfigExt.setPkCountry(baseConfig.getPkCountry());
|
||||
AcGiftConfig acGiftConfig = BeanUtil.copyProperties(giftConfigExt, AcGiftConfig.class);
|
||||
giftConfigList.add(acGiftConfig);
|
||||
}
|
||||
waresGiftConfigService.saveBatch(giftConfigList);
|
||||
/**
|
||||
* 活动赠品配置
|
||||
*/
|
||||
List<AcGiftConfigExt> giftConfigExList = mcr.getWgcList();
|
||||
List<AcGiftConfig> giftConfigList = new ArrayList<>();
|
||||
for (AcGiftConfigExt giftConfigExt : giftConfigExList) {
|
||||
giftConfigExt.setPkRuleId(mcr.getPkId());
|
||||
giftConfigExt.setActType(baseConfig.getActType());
|
||||
giftConfigExt.setPkCreator(baseConfig.getPkCreator());
|
||||
giftConfigExt.setPkCountry(baseConfig.getPkCountry());
|
||||
AcGiftConfig acGiftConfig = BeanUtil.copyProperties(giftConfigExt, AcGiftConfig.class);
|
||||
giftConfigList.add(acGiftConfig);
|
||||
}
|
||||
waresGiftConfigService.saveBatch(giftConfigList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除会员消费活动
|
||||
* @author: zhang jing
|
||||
* @date: 2024/12/2 17:08
|
||||
* @param: [pkId]
|
||||
* @return: void
|
||||
* 删除会员消费活动
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
|
|||
|
|
@ -9,17 +9,11 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 活动赠品配置 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-21
|
||||
*/
|
||||
public interface AcDrawGiftRuleConfigMapper extends BaseMapper<AcDrawGiftRuleConfig> {
|
||||
|
||||
/*
|
||||
* @description: 查询活动的赠品配置
|
||||
* @author: sui q
|
||||
* @date: 2023/4/21 19:53
|
||||
* @param: null null
|
||||
* 查询活动的赠品配置
|
||||
**/
|
||||
List<AcDrawGiftRuleConfigExt> queryAcDrawGiftConfig(DrawGiftConfigParam drawGiftConfigParam);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,25 +10,16 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 会员可抽奖次数记录 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-21
|
||||
*/
|
||||
public interface AcDrawRewardNumMapper extends BaseMapper<AcDrawRewardNum> {
|
||||
|
||||
/*
|
||||
* @description: 查询
|
||||
* @author: sui q
|
||||
* @date: 2023/4/27 15:14
|
||||
* @param: null null
|
||||
* 查询
|
||||
**/
|
||||
AcDrawRewardNumExt queryDrawRewardNumByCondition(AcDrawRewardNumParam acDrawRewardNumParam);
|
||||
|
||||
/*
|
||||
* @description: 会员后台查询抽奖次数
|
||||
* @author: sui q
|
||||
* @date: 2023/6/1 10:36
|
||||
* @param: null null
|
||||
* 会员后台查询抽奖次数
|
||||
**/
|
||||
List<AcDrawRewardNumExt> queryDrawRewardExtNumByCondition(AcDrawRewardNumParam acDrawRewardNumParam);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,17 +12,11 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 活动赠品配置 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-21
|
||||
*/
|
||||
public interface IAcDrawGiftRuleConfigService extends IService<AcDrawGiftRuleConfig> {
|
||||
|
||||
/*
|
||||
* @description: 查询活动的赠品配置
|
||||
* @author: sui q
|
||||
* @date: 2023/4/21 19:53
|
||||
* @param: null null
|
||||
* 查询活动的赠品配置
|
||||
**/
|
||||
List<AcDrawGiftRuleConfigExt> queryAcDrawGiftConfig(DrawGiftConfigParam drawGiftConfigParam);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,33 +15,21 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 会员可抽奖次数记录 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-21
|
||||
*/
|
||||
public interface IAcDrawRewardNumService extends IService<AcDrawRewardNum> {
|
||||
|
||||
/*
|
||||
* @description: 查询会员抽奖活动,查询会员的抽奖次数
|
||||
* @author: sui q
|
||||
* @date: 2023/4/22 10:11
|
||||
* @param: null null
|
||||
* 查询会员抽奖活动,查询会员的抽奖次数
|
||||
**/
|
||||
AcDrawRewardNum queryAcDrawRewardNum(AcDrawRewardNumParam acDrawRewardNumParam);
|
||||
|
||||
/*
|
||||
* @description: 会员后台查询抽奖次数
|
||||
* @author: sui q
|
||||
* @date: 2023/6/1 10:36
|
||||
* @param: null null
|
||||
* 会员后台查询抽奖次数
|
||||
**/
|
||||
List<AcDrawRewardNumExt> queryDrawRewardExtNumByCondition(AcDrawRewardNumParam acDrawRewardNumParam);
|
||||
|
||||
/*
|
||||
* @description: 更新会员抽奖次数
|
||||
* @author: sui q
|
||||
* @date: 2023/4/22 10:43
|
||||
* @param: null null
|
||||
* 更新会员抽奖次数
|
||||
**/
|
||||
Boolean updateAcDrawRewardNum(AcDrawRewardNum acDrawRewardNum);
|
||||
|
||||
|
|
@ -49,65 +37,41 @@ public interface IAcDrawRewardNumService extends IService<AcDrawRewardNum> {
|
|||
* 查询会员账户状态,账户信息
|
||||
*
|
||||
* @param cuMemberAccount 会员账户条件信息
|
||||
* @return: List<CuMemberAccountExt>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/5 11:57
|
||||
*/
|
||||
List<CuMemberAccountExt> queryMemberAccountByCondition(CuMemberAccount cuMemberAccount);
|
||||
|
||||
/*
|
||||
* @description: 查询
|
||||
* @author: sui q
|
||||
* @date: 2023/4/27 15:14
|
||||
* @param: null null
|
||||
* 查询
|
||||
**/
|
||||
AcDrawRewardNumExt queryDrawRewardNumByCondition(AcDrawRewardNumParam acDrawRewardNumParam);
|
||||
|
||||
/*
|
||||
* @description: 支付抽奖次数
|
||||
* @author: sui q
|
||||
* @date: 2023/4/27 15:34
|
||||
* @param: null null
|
||||
* 支付抽奖次数
|
||||
**/
|
||||
void payDrawRewardNum(CuMemberAccountExt cuMemberAccountExt, Integer payNum, AcDrawRewardNumExt acDrawRewardNumExt);
|
||||
|
||||
/*
|
||||
* @description: 在线支付确认生成待支付订单
|
||||
* @author: sui q
|
||||
* @date: 2023/4/27 17:54
|
||||
* @param: null null
|
||||
* 在线支付确认生成待支付订单
|
||||
**/
|
||||
String confirmDrawRewardPayNum(AcDrawRewardNumParam acDrawRewardNumParam, AcDrawRewardNumExt acDrawRewardNum);
|
||||
|
||||
/*
|
||||
* @description: 在线支付查询待支付金额
|
||||
* @author: sui q
|
||||
* @date: 2023/4/27 17:57
|
||||
* @param: null null
|
||||
* 在线支付查询待支付金额
|
||||
**/
|
||||
BigDecimal queryDrawRewardPayNumMoney(Long pkMember, String orderCode);
|
||||
|
||||
/*
|
||||
* @description: 抽奖在线支付购买次数
|
||||
* @author: sui q
|
||||
* @date: 2023/4/27 18:00
|
||||
* @param: null null
|
||||
* 抽奖在线支付购买次数
|
||||
**/
|
||||
Boolean callBackOnlinePay(Long pkMember, String orderCode);
|
||||
|
||||
/*
|
||||
* @description: 赠送抽奖次数
|
||||
* @author: sui q
|
||||
* @date: 2023/4/28 11:27
|
||||
* @param: null null
|
||||
* 赠送抽奖次数
|
||||
**/
|
||||
Boolean giveMemberDrawNum(SaOrderExt saOrderExt);
|
||||
|
||||
/*
|
||||
* @description: 撤单时回退抽奖次数
|
||||
* @author: sui q
|
||||
* @date: 2023/5/9 9:46
|
||||
* @param: null null
|
||||
* 撤单时回退抽奖次数
|
||||
**/
|
||||
Boolean backGiveMemberDrawNum(SaOrderExt saOrderExt);
|
||||
|
||||
|
|
@ -135,14 +99,6 @@ public interface IAcDrawRewardNumService extends IService<AcDrawRewardNum> {
|
|||
*/
|
||||
String approvalAgree(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
/**
|
||||
* 修改已购买次数 审批驳回
|
||||
*
|
||||
* @param approvalBusinessResultDTO
|
||||
* @return
|
||||
*/
|
||||
String approvalReject(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
/**
|
||||
* 充值未购买次数 (审批发起)
|
||||
*
|
||||
|
|
@ -151,17 +107,4 @@ public interface IAcDrawRewardNumService extends IService<AcDrawRewardNum> {
|
|||
*/
|
||||
void unpurchasedTimes(PurchasedTimesParam purchasedTimesParam);
|
||||
|
||||
/**
|
||||
* 充值已购买次数
|
||||
*
|
||||
* @param approvalBusinessResultDTO
|
||||
*/
|
||||
void rechargePurchasedTimes(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
/**
|
||||
* 充值未购买次数
|
||||
*
|
||||
* @param approvalBusinessResultDTO
|
||||
*/
|
||||
void unRechargePurchasedTimes(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,9 +44,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 活动赠品配置 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
|
|
@ -186,7 +183,7 @@ public class AcDrawGiftRuleConfigServiceImpl extends ServiceImpl<AcDrawGiftRuleC
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String onLinePetition(AcRecommendParam recommendParam) {
|
||||
log.info("抽奖配置入参{}",JSONUtil.toJsonStr(recommendParam));
|
||||
log.info("抽奖配置入参{}", JSONUtil.toJsonStr(recommendParam));
|
||||
EApprovalBusiness approvalBusiness = null;
|
||||
if (recommendParam.getControlType().equals(EControlType.SAVE.getValue())) {
|
||||
approvalBusiness = EApprovalBusiness.LOTTERY_DRAW_ADD;
|
||||
|
|
@ -222,51 +219,6 @@ public class AcDrawGiftRuleConfigServiceImpl extends ServiceImpl<AcDrawGiftRuleC
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param recommendParam 抽奖参数
|
||||
*/
|
||||
public Boolean submitApproval(AcRecommendParam recommendParam, EApprovalBusiness approvalBusiness) {
|
||||
//保存审批日志
|
||||
AcApprovalLog approvalLog = saveApprovalLog(recommendParam, approvalBusiness);
|
||||
ApprovalSubmitDTO approvalSubmitDTO = ApprovalSubmitDTO.builder().eApprovalBusiness(approvalBusiness)
|
||||
.businessCode(approvalLog.getBusinessCode())
|
||||
.businessData(JSONObject.toJSONString(recommendParam)).fileList(recommendParam.getFileList())
|
||||
.signType(ESignType.getEnumByValue(recommendParam.getSignType())).userIdList(recommendParam.getUserIdList())
|
||||
.sendIdList(recommendParam.getSendIdList()).remark(recommendParam.getRemark()).build();
|
||||
R<String> submit = approvalServiceApi.submit(approvalSubmitDTO, recommendParam.getLoginUser());
|
||||
if (!submit.isSuccess()) {
|
||||
throw new RuntimeException("抽奖参数提交审批失败!");
|
||||
}
|
||||
|
||||
//添加操作日志
|
||||
StringBuffer str = new StringBuffer();
|
||||
Integer value = null;
|
||||
if (recommendParam.getControlType() == EControlType.SAVE.getValue()) {
|
||||
str.append(EControlType.SAVE.getLabel());
|
||||
value = EApprovalBusiness.LOTTERY_DRAW_ADD.getValue();
|
||||
}
|
||||
if (recommendParam.getControlType() == EControlType.MODIFY.getValue()) {
|
||||
str.append(EControlType.MODIFY.getLabel());
|
||||
value = EApprovalBusiness.LOTTERY_DRAW_UPDATE.getValue();
|
||||
}
|
||||
if (recommendParam.getControlType() == EControlType.DELETE.getValue()) {
|
||||
AcBaseConfig baseConfig = BeanUtil.copyProperties(recommendParam.getActivityParam(), AcBaseConfig.class);
|
||||
baseConfig.setPkCreator(approvalLog.getPkCreator());
|
||||
baseConfig.setPkCountry(recommendParam.getPkCountry());
|
||||
baseConfig.setBusinessCode(approvalLog.getBusinessCode());
|
||||
iActivityService.removeBaseConfigLog(baseConfig, str, null, EApprovalBusiness.LOTTERY_DRAW_REMOVE.getValue(), false);
|
||||
} else {
|
||||
ActivityParam activityParam = BeanUtil.copyProperties(recommendParam.getActivityParam(), ActivityParam.class);
|
||||
activityParam.setPkCreator(approvalLog.getPkCreator());
|
||||
activityParam.setPkCountry(recommendParam.getPkCountry());
|
||||
activityParam.setBusinessCode(approvalLog.getBusinessCode());
|
||||
iActivityService.createBaseConfigLog(activityParam, str, null, value, false);
|
||||
}
|
||||
return submit.isSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存活动审批日志信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -51,9 +51,6 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
/**
|
||||
* 会员可抽奖次数记录 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
|
|
@ -241,7 +238,7 @@ public class AcDrawRewardNumServiceImpl extends ServiceImpl<AcDrawRewardNumMappe
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void purchasedTimes(PurchasedTimesParam purchasedTimesParam) {
|
||||
log.info("修改已购买次数入参{}",JSONUtil.toJsonStr(purchasedTimesParam));
|
||||
log.info("修改已购买次数入参{}", JSONUtil.toJsonStr(purchasedTimesParam));
|
||||
String memberCode = purchasedTimesParam.getMemberCode();
|
||||
Integer num = purchasedTimesParam.getNum();
|
||||
Long pkBaseId = purchasedTimesParam.getPkBaseId();
|
||||
|
|
@ -359,27 +356,6 @@ public class AcDrawRewardNumServiceImpl extends ServiceImpl<AcDrawRewardNumMappe
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改已购买次数 审批驳回
|
||||
*
|
||||
* @param approvalBusinessResultDTO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String approvalReject(ApprovalBusinessResultDTO approvalBusinessResultDTO) {
|
||||
R<CuMemberServiceLog> cuMemberServiceLogR = memberServiceLogServiceApi.selectByBusinessNo(approvalBusinessResultDTO.getBusinessCode());
|
||||
|
||||
if (null == cuMemberServiceLogR) {
|
||||
log.error("修改已购买次数失败: 签呈不存在!");
|
||||
return TransactionUtils.getContent(CommonMsgConstants.APPROVAL_NOT_EXIST);
|
||||
}
|
||||
// 更新 日志
|
||||
CuMemberServiceLog memberServiceLog = cuMemberServiceLogR.getData();
|
||||
memberServiceLog.setApproveStatus(EApproveStatus.REJECTED.getValue());
|
||||
memberServiceLogServiceApi.updateByBusinessNo(memberServiceLog);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改未购买次数 (审批发起)
|
||||
*
|
||||
|
|
@ -388,7 +364,7 @@ public class AcDrawRewardNumServiceImpl extends ServiceImpl<AcDrawRewardNumMappe
|
|||
*/
|
||||
@Override
|
||||
public void unpurchasedTimes(PurchasedTimesParam purchasedTimesParam) {
|
||||
log.info("修改未购买次数入参{}",JSONUtil.toJsonStr(purchasedTimesParam));
|
||||
log.info("修改未购买次数入参{}", JSONUtil.toJsonStr(purchasedTimesParam));
|
||||
String memberCode = purchasedTimesParam.getMemberCode();
|
||||
Integer num = purchasedTimesParam.getNum();
|
||||
Long pkBaseId = purchasedTimesParam.getPkBaseId();
|
||||
|
|
@ -414,76 +390,6 @@ public class AcDrawRewardNumServiceImpl extends ServiceImpl<AcDrawRewardNumMappe
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值已购买次数
|
||||
*
|
||||
* @param approvalBusinessResultDTO
|
||||
*/
|
||||
@Override
|
||||
public void rechargePurchasedTimes(ApprovalBusinessResultDTO approvalBusinessResultDTO) {
|
||||
String businessData = approvalBusinessResultDTO.getBusinessData();
|
||||
JSONObject js = JSONObject.parseObject(businessData);
|
||||
String memberCode = js.getString("memberCode");
|
||||
Integer num = js.getInteger("num");
|
||||
Long pkBaseId = js.getLong("pkBaseId");
|
||||
R<CuMember> memberDto = memberServiceApi.getMember(memberCode);
|
||||
Long pkMember = memberDto.getData().getPkId();
|
||||
|
||||
LambdaQueryWrapper<AcDrawRewardNum> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AcDrawRewardNum::getPkBaseId, pkBaseId);
|
||||
queryWrapper.eq(AcDrawRewardNum::getPkMember, pkMember);
|
||||
AcDrawRewardNum drawRewardNum = this.getOne(queryWrapper);
|
||||
if (drawRewardNum != null) {
|
||||
baseMapper.updatePurchasedTimesByBaseId(pkMember, num, pkBaseId);
|
||||
} else {
|
||||
drawRewardNum = new AcDrawRewardNum();
|
||||
drawRewardNum.setPkBaseId(pkBaseId);
|
||||
drawRewardNum.setPkMember(pkMember);
|
||||
drawRewardNum.setTotalUsedNum(num);
|
||||
drawRewardNum.setAvailableNum(num);
|
||||
drawRewardNum.setTotalNum(num);
|
||||
drawRewardNum.setAvailableSurplusNum(num);
|
||||
drawRewardNum.setCreationTime(DateUtils.currentDateTime());
|
||||
drawRewardNum.setPkCreator(memberDto.getData().getPkCreator());
|
||||
drawRewardNum.setPkCountry(memberDto.getData().getPkCountry());
|
||||
this.save(drawRewardNum);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值未购买次数
|
||||
*
|
||||
* @param approvalBusinessResultDTO
|
||||
*/
|
||||
@Override
|
||||
public void unRechargePurchasedTimes(ApprovalBusinessResultDTO approvalBusinessResultDTO) {
|
||||
String businessData = approvalBusinessResultDTO.getBusinessData();
|
||||
JSONObject js = JSONObject.parseObject(businessData);
|
||||
String memberCode = js.getString("memberCode");
|
||||
Integer num = js.getInteger("num");
|
||||
Long pkBaseId = js.getLong("pkBaseId");
|
||||
R<CuMember> memberDto = memberServiceApi.getMember(memberCode);
|
||||
Long pkMember = memberDto.getData().getPkId();
|
||||
|
||||
LambdaQueryWrapper<AcDrawRewardNum> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AcDrawRewardNum::getPkBaseId, pkBaseId);
|
||||
queryWrapper.eq(AcDrawRewardNum::getPkMember, pkMember);
|
||||
AcDrawRewardNum drawRewardNum = this.getOne(queryWrapper);
|
||||
if (drawRewardNum != null) {
|
||||
baseMapper.updateUnpurchasedTimesByPkbaseId(pkMember, num, pkBaseId);
|
||||
} else {
|
||||
drawRewardNum = new AcDrawRewardNum();
|
||||
drawRewardNum.setPkBaseId(pkBaseId);
|
||||
drawRewardNum.setPkMember(pkMember);
|
||||
drawRewardNum.setTotalNum(num);
|
||||
drawRewardNum.setTotalSurplusNum(num);
|
||||
drawRewardNum.setCreationTime(DateUtils.currentDateTime());
|
||||
drawRewardNum.setPkCreator(memberDto.getData().getPkCreator());
|
||||
drawRewardNum.setPkCountry(memberDto.getData().getPkCountry());
|
||||
this.save(drawRewardNum);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改已购买总次数 (已购买次数)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -44,11 +44,7 @@ import java.util.List;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @Description: 会员端提货处理控制器
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/4/24 13:55
|
||||
* @Classname: ApiPickController
|
||||
* @PackageName: com.hzs.activity.pick.controller.api
|
||||
* 会员端提货处理控制器
|
||||
*/
|
||||
@RequestMapping("/api/pick")
|
||||
@RestController
|
||||
|
|
|
|||
|
|
@ -95,11 +95,7 @@ public interface AcPickMapper extends BaseMapper<AcPick> {
|
|||
int updatePickByPkId(@Param("acPick") AcPick acPick);
|
||||
|
||||
/**
|
||||
* @description: 删除充值提货卡
|
||||
* @author: zhang jing
|
||||
* @date: 2023/10/26 13:45
|
||||
* @param: [acPick]
|
||||
* @return: boolean
|
||||
* 删除充值提货卡
|
||||
**/
|
||||
boolean removePickByPkId(@Param("acPick") AcPick acPick);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import com.hzs.activity.pick.vo.ApiPickListVO;
|
|||
import com.hzs.common.domain.activity.pick.AcPick;
|
||||
import com.hzs.common.domain.activity.pick.AcPickMemberLog;
|
||||
import com.hzs.common.domain.activity.pick.ext.AcPickExt;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -92,27 +91,6 @@ public interface IAcPickService extends IService<AcPick> {
|
|||
**/
|
||||
boolean delPick(AcPickSaveParam anpParam);
|
||||
|
||||
/**
|
||||
* 提货变动审批通过
|
||||
*
|
||||
* @param resultDTO
|
||||
* @return
|
||||
*/
|
||||
String pickApprovalAgree(ApprovalBusinessResultDTO resultDTO);
|
||||
|
||||
/**
|
||||
* @description: 审核删除充值提货卡
|
||||
**/
|
||||
String delpickApprovalAgree(ApprovalBusinessResultDTO resultDTO);
|
||||
|
||||
/**
|
||||
* 提货变动审批驳回
|
||||
*
|
||||
* @param resultDTO
|
||||
* @return
|
||||
*/
|
||||
String pickApprovalReject(ApprovalBusinessResultDTO resultDTO);
|
||||
|
||||
/**
|
||||
* 会员提货列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.hzs.activity.pick.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.hzs.activity.base.service.IAcApprovalLogService;
|
||||
|
|
@ -15,14 +14,12 @@ import com.hzs.activity.pick.vo.ApiPickListVO;
|
|||
import com.hzs.activity.wares.service.IAcGiftConfigService;
|
||||
import com.hzs.common.core.constant.RabbitMqConstants;
|
||||
import com.hzs.common.core.constant.SystemFieldConstants;
|
||||
import com.hzs.common.core.constant.msg.ActivityMsgConstants;
|
||||
import com.hzs.common.core.constant.msg.DocumentMsgConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.exception.ServiceException;
|
||||
import com.hzs.common.core.utils.CommonUtil;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.domain.activity.base.AcApprovalLog;
|
||||
import com.hzs.common.domain.activity.base.AcPickUpConfig;
|
||||
import com.hzs.common.domain.activity.base.ext.AcGiftConfigExt;
|
||||
import com.hzs.common.domain.activity.pick.AcPick;
|
||||
|
|
@ -36,7 +33,6 @@ import com.hzs.member.base.IMemberServiceApi;
|
|||
import com.hzs.sale.postage.IPostageServiceApi;
|
||||
import com.hzs.sale.postage.dto.PostageProductDTO;
|
||||
import com.hzs.sale.product.service.IBdProductService;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
import com.hzs.system.sys.dto.BusinessLogDTO;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -57,8 +53,6 @@ import java.util.stream.Collectors;
|
|||
@Service
|
||||
public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> implements IAcPickService {
|
||||
|
||||
@Autowired
|
||||
private IAcApprovalLogService iAcApprovalLogService;
|
||||
@Autowired
|
||||
private IAcPickLogService iAcPickLogService;
|
||||
@Autowired
|
||||
|
|
@ -474,227 +468,6 @@ public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> impleme
|
|||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public String pickApprovalAgree(ApprovalBusinessResultDTO resultDTO) {
|
||||
// 用户ID
|
||||
Long userId = resultDTO.getLoginUser().getUserId();
|
||||
// 所属国家
|
||||
Integer pkCountry = resultDTO.getLoginUser().getDataCountry();
|
||||
|
||||
List<AcApprovalLog> approvalLogList = iAcApprovalLogService.queryApprovalLogList(resultDTO.getEApprovalBusiness(), resultDTO.getBusinessCode(), pkCountry);
|
||||
// 一批审批可能有多个
|
||||
AcApprovalLog approvalLog = approvalLogList.get(0);
|
||||
if (null == approvalLog) {
|
||||
log.error("提货充值同意处理失败: 签呈不存在!");
|
||||
return TransactionUtils.getContent(ActivityMsgConstants.PICK_NOT_EXIST);
|
||||
}
|
||||
if (EAgentApprovalStatus.UNAPPROVED.getValue() != approvalLog.getApprovalStatus()) {
|
||||
log.error("提货充值同意处理失败: 签呈已处理");
|
||||
return TransactionUtils.getContent(ActivityMsgConstants.PICK_PROCESSED);
|
||||
}
|
||||
|
||||
// 新増提货列表
|
||||
List<AcPick> createList = new ArrayList<>();
|
||||
// 修改提货列表
|
||||
List<AcPick> updateList = new ArrayList<>();
|
||||
|
||||
for (AcApprovalLog acApprovalLog : approvalLogList) {
|
||||
// 存在业务ID,则为修改
|
||||
AcPickSaveDetailParam detailParam = JSONUtil.toBean(acApprovalLog.getAfterData(), AcPickSaveDetailParam.class);
|
||||
// 当前会员
|
||||
CuMember cuMember = iMemberServiceApi.getMember(detailParam.getMemberCode()).getData();
|
||||
// 提货ID
|
||||
Long pickId = null;
|
||||
// 提货类型
|
||||
Integer pickType = null != detailParam.getPickType() ? detailParam.getPickType() : EPickType.PICK_PRODUCT.getValue();
|
||||
|
||||
if (null == detailParam.getPkId()) {
|
||||
LambdaQueryWrapper<AcPick> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AcPick::getPickType, pickType);
|
||||
queryWrapper.eq(AcPick::getPkBaseConfig, 0);
|
||||
queryWrapper.eq(AcPick::getPkDataId, detailParam.getPkProduct());
|
||||
queryWrapper.eq(AcPick::getSpecsNameId, detailParam.getSpecsNameId());
|
||||
queryWrapper.eq(AcPick::getPkMember, cuMember.getPkId());
|
||||
AcPick acPick = this.getOne(queryWrapper);
|
||||
if (null != acPick) {
|
||||
pickId = acPick.getPkId();
|
||||
}
|
||||
} else {
|
||||
pickId = detailParam.getPkId();
|
||||
}
|
||||
|
||||
AcPick acPick = new AcPick();
|
||||
if (null == pickId) {
|
||||
// 新增提货数据
|
||||
acPick.setPkMember(cuMember.getPkId());
|
||||
acPick.setPickType(pickType);
|
||||
acPick.setPkDataId(detailParam.getPkProduct().longValue());
|
||||
acPick.setSpecsName(detailParam.getSpecsName());
|
||||
acPick.setSpecsNameId(detailParam.getSpecsNameId());
|
||||
acPick.setUsableQuantity(detailParam.getQuantity());
|
||||
acPick.setBaseQuantity(detailParam.getBaseQuantity());
|
||||
acPick.setReceiveTime(detailParam.getReceiveTime());
|
||||
acPick.setIsFreeMail(detailParam.getIsFreeMail());
|
||||
acPick.setPkPostage(detailParam.getPkPostage());
|
||||
acPick.setPkCreator(userId);
|
||||
acPick.setPkCountry(pkCountry);
|
||||
createList.add(acPick);
|
||||
} else {
|
||||
// 修改提货数据
|
||||
acPick.setPkId(pickId);
|
||||
acPick.setUsableQuantity(detailParam.getQuantity());
|
||||
acPick.setBaseQuantity(detailParam.getBaseQuantity());
|
||||
acPick.setReceiveTime(detailParam.getReceiveTime());
|
||||
acPick.setIsFreeMail(detailParam.getIsFreeMail());
|
||||
acPick.setPkPostage(detailParam.getPkPostage());
|
||||
acPick.setPkModified(userId);
|
||||
acPick.setModifiedTime(new Date());
|
||||
updateList.add(acPick);
|
||||
}
|
||||
}
|
||||
|
||||
if (iAcApprovalLogService.updateApprovalLog(resultDTO.getEApprovalBusiness(), resultDTO.getBusinessCode(), pkCountry, userId, EApproveRechargeStatus.AGREE, resultDTO.getApproveRemark())) {
|
||||
// 更新修改记录
|
||||
|
||||
// 提货操作日志
|
||||
List<AcPickLog> logList = new ArrayList<>();
|
||||
|
||||
// 插入提货数据
|
||||
if (CollectionUtil.isNotEmpty(createList)) {
|
||||
for (AcPick acPick : createList) {
|
||||
this.baseMapper.insert(acPick);
|
||||
|
||||
AcPickLog acPickLog = new AcPickLog();
|
||||
acPickLog.setPkPick(acPick.getPkId());
|
||||
acPickLog.setQuantity(acPick.getUsableQuantity());
|
||||
acPickLog.setPkUser(userId);
|
||||
acPickLog.setPkCountry(pkCountry);
|
||||
logList.add(acPickLog);
|
||||
}
|
||||
}
|
||||
// 更新提货数据
|
||||
if (CollectionUtil.isNotEmpty(updateList)) {
|
||||
for (AcPick acPick : updateList) {
|
||||
this.baseMapper.updatePickByPkId(acPick);
|
||||
|
||||
AcPickLog acPickLog = new AcPickLog();
|
||||
acPickLog.setPkPick(acPick.getPkId());
|
||||
acPickLog.setQuantity(acPick.getUsableQuantity());
|
||||
acPickLog.setPkUser(userId);
|
||||
acPickLog.setPkCountry(pkCountry);
|
||||
logList.add(acPickLog);
|
||||
}
|
||||
}
|
||||
// 插入提货操作日志
|
||||
iAcPickLogService.insertBatch(logList);
|
||||
|
||||
return null;
|
||||
}
|
||||
log.error("提货充值同意处理失败: 更新数据失败");
|
||||
return TransactionUtils.getContent(DocumentMsgConstants.DOCUMENT_ORDER_ERROR);
|
||||
}
|
||||
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public String delpickApprovalAgree(ApprovalBusinessResultDTO resultDTO) {
|
||||
// 用户ID
|
||||
Long userId = resultDTO.getLoginUser().getUserId();
|
||||
// 所属国家
|
||||
Integer pkCountry = resultDTO.getLoginUser().getDataCountry();
|
||||
|
||||
List<AcApprovalLog> approvalLogList = iAcApprovalLogService.queryApprovalLogList(resultDTO.getEApprovalBusiness(), resultDTO.getBusinessCode(), pkCountry);
|
||||
// 一批审批可能有多个
|
||||
AcApprovalLog approvalLog = approvalLogList.get(0);
|
||||
if (null == approvalLog) {
|
||||
log.error("提货充值同意处理失败: 签呈不存在!");
|
||||
return TransactionUtils.getContent(ActivityMsgConstants.PICK_NOT_EXIST);
|
||||
}
|
||||
if (EAgentApprovalStatus.UNAPPROVED.getValue() != approvalLog.getApprovalStatus()) {
|
||||
log.error("提货充值同意处理失败: 签呈已处理");
|
||||
return TransactionUtils.getContent(ActivityMsgConstants.PICK_PROCESSED);
|
||||
}
|
||||
|
||||
// 删除提货列表
|
||||
List<AcPick> updateList = new ArrayList<>();
|
||||
|
||||
for (AcApprovalLog acApprovalLog : approvalLogList) {
|
||||
// 存在业务ID,则为修改
|
||||
AcPickSaveDetailParam detailParam = JSONUtil.toBean(acApprovalLog.getAfterData(), AcPickSaveDetailParam.class);
|
||||
// 当前会员
|
||||
CuMember cuMember = iMemberServiceApi.getMember(detailParam.getMemberCode()).getData();
|
||||
// 提货ID
|
||||
Long pickId = null;
|
||||
if (null == detailParam.getPkId()) {
|
||||
LambdaQueryWrapper<AcPick> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AcPick::getPickType, EPickType.PICK_PRODUCT.getValue());
|
||||
queryWrapper.eq(AcPick::getPkBaseConfig, 0);
|
||||
queryWrapper.eq(AcPick::getPkDataId, detailParam.getPkProduct());
|
||||
queryWrapper.eq(AcPick::getPkMember, cuMember.getPkId());
|
||||
AcPick acPick = this.getOne(queryWrapper);
|
||||
if (null != acPick) {
|
||||
pickId = acPick.getPkId();
|
||||
}
|
||||
} else {
|
||||
pickId = detailParam.getPkId();
|
||||
}
|
||||
|
||||
AcPick acPick = new AcPick();
|
||||
if (null != pickId) {
|
||||
// 删除提货数据
|
||||
acPick.setPkId(pickId);
|
||||
acPick.setPkModified(userId);
|
||||
acPick.setModifiedTime(new Date());
|
||||
updateList.add(acPick);
|
||||
} else {
|
||||
log.error("提货充值同意处理失败: 更新数据失败");
|
||||
return TransactionUtils.getContent(DocumentMsgConstants.DOCUMENT_ORDER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if (iAcApprovalLogService.updateApprovalLog(resultDTO.getEApprovalBusiness(), resultDTO.getBusinessCode(), pkCountry, userId, EApproveRechargeStatus.AGREE, resultDTO.getApproveRemark())) {
|
||||
// 更新修改记录
|
||||
|
||||
// 更新提货数据
|
||||
if (CollectionUtil.isNotEmpty(updateList)) {
|
||||
for (AcPick acPick : updateList) {
|
||||
this.baseMapper.removePickByPkId(acPick);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
log.error("提货充值同意处理失败: 更新数据失败");
|
||||
return TransactionUtils.getContent(DocumentMsgConstants.DOCUMENT_ORDER_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String pickApprovalReject(ApprovalBusinessResultDTO resultDTO) {
|
||||
// 用户ID
|
||||
Long userId = resultDTO.getLoginUser().getUserId();
|
||||
// 所属国家
|
||||
Integer pkCountry = resultDTO.getLoginUser().getDataCountry();
|
||||
|
||||
List<AcApprovalLog> approvalLogList = iAcApprovalLogService.queryApprovalLogList(resultDTO.getEApprovalBusiness(), resultDTO.getBusinessCode(), pkCountry);
|
||||
// 一批审批可能有多个
|
||||
AcApprovalLog approvalLog = approvalLogList.get(0);
|
||||
if (null == approvalLog) {
|
||||
log.error("提货充值驳回处理失败: 签呈不存在!");
|
||||
return TransactionUtils.getContent(ActivityMsgConstants.PICK_NOT_EXIST);
|
||||
}
|
||||
if (EAgentApprovalStatus.UNAPPROVED.getValue() != approvalLog.getApprovalStatus()) {
|
||||
log.error("提货充值驳回处理失败: 签呈已处理");
|
||||
return TransactionUtils.getContent(ActivityMsgConstants.PICK_PROCESSED);
|
||||
}
|
||||
|
||||
if (iAcApprovalLogService.updateApprovalLog(resultDTO.getEApprovalBusiness(), resultDTO.getBusinessCode(), pkCountry, userId, EApproveRechargeStatus.REJECT, resultDTO.getApproveRemark())) {
|
||||
return null;
|
||||
}
|
||||
log.error("提货充值驳回处理失败: 更新数据失败");
|
||||
return TransactionUtils.getContent(DocumentMsgConstants.DOCUMENT_ORDER_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ApiPickListVO> pickList(Long pkMember, Integer pkCountry) {
|
||||
return baseMapper.pickList(pkMember, pkCountry);
|
||||
|
|
|
|||
|
|
@ -10,9 +10,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 复购均分配置 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-04
|
||||
*/
|
||||
public interface AcRepurSharRuleConfigMapper extends BaseMapper<AcRepurSharRuleConfig> {
|
||||
|
||||
|
|
@ -27,12 +24,4 @@ public interface AcRepurSharRuleConfigMapper extends BaseMapper<AcRepurSharRuleC
|
|||
Integer deleteSharRuleConfigByActivityId(@Param("orderTypeList") List<Integer> orderTypeList,
|
||||
@Param("activityId") Long activityId, @Param("pkModifyId") Long pkModifyId);
|
||||
|
||||
/*
|
||||
* @description: 查询复购券均分收益
|
||||
* @author: sui q
|
||||
* @date: 2023/5/5 16:29
|
||||
* @param: null null
|
||||
**/
|
||||
List<AcRepurSharRuleConfigExt> queryRepurSharRuleConfig(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,12 +17,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 直推赠送参数
|
||||
*
|
||||
* @Description:
|
||||
* @Author: ljc
|
||||
* @Time: 2023/4/24 11:14
|
||||
* @Classname: AcRecommendParam
|
||||
* @Package_name: com.hzs.activity.recommend.param
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
|||
|
|
@ -53,12 +53,6 @@ public interface IAcRepurCouponsRuleConfigService extends IService<AcRepurCoupon
|
|||
*/
|
||||
String approvalAgree(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
/**
|
||||
* @param approvalBusinessResultDTO 业务审批操作DTO
|
||||
* @return String
|
||||
*/
|
||||
String approvalReject(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
/**
|
||||
* 调用直推升级(对外提供接口)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2,16 +2,9 @@ package com.hzs.activity.recommend.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.activity.recommend.AcRepurSharRuleConfig;
|
||||
import com.hzs.common.domain.activity.recommend.ext.AcRepurSharRuleConfigExt;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 复购均分配置 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-04
|
||||
*/
|
||||
public interface IAcRepurSharRuleConfigService extends IService<AcRepurSharRuleConfig> {
|
||||
|
||||
|
|
@ -33,12 +26,4 @@ public interface IAcRepurSharRuleConfigService extends IService<AcRepurSharRuleC
|
|||
*/
|
||||
Boolean deleteSharRuleConfigByActivityId(Long activityId, Long pkModifyId);
|
||||
|
||||
/*
|
||||
* @description: 查询复购券均分收益
|
||||
* @author: sui q
|
||||
* @date: 2023/5/5 16:29
|
||||
* @param: null null
|
||||
**/
|
||||
List<AcRepurSharRuleConfigExt> queryRepurSharRuleConfig(Date startDate, Date endDate);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import com.hzs.activity.recommend.vo.*;
|
|||
import com.hzs.activity.wares.service.IAcGiftConfigService;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.constant.RabbitMqConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.CommonUtil;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
|
|
@ -36,9 +35,7 @@ import com.hzs.common.domain.sale.order.SaOrder;
|
|||
import com.hzs.common.service.ITransactionCommonService;
|
||||
import com.hzs.member.base.IMemberServiceApi;
|
||||
import com.hzs.sale.product.IProductServiceApi;
|
||||
import com.hzs.system.sys.IApprovalServiceApi;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
import com.hzs.system.sys.dto.ApprovalSubmitDTO;
|
||||
import com.hzs.system.sys.dto.BusinessLogDTO;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -81,8 +78,6 @@ public class AcRepurCouponsRuleConfigServiceImpl extends ServiceImpl<AcRepurCoup
|
|||
@Autowired
|
||||
IAcBaseAuthorityService iAcBaseAuthorityService;
|
||||
|
||||
@DubboReference
|
||||
IApprovalServiceApi approvalServiceApi;
|
||||
@DubboReference
|
||||
IMemberServiceApi memberServiceApi;
|
||||
@DubboReference
|
||||
|
|
@ -97,7 +92,7 @@ public class AcRepurCouponsRuleConfigServiceImpl extends ServiceImpl<AcRepurCoup
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String onLinePetition(AcRecommendParam recommendParam) {
|
||||
log.info("直推参数{}",JSONUtil.toJsonStr(recommendParam));
|
||||
log.info("直推参数{}", JSONUtil.toJsonStr(recommendParam));
|
||||
EApprovalBusiness approvalBusiness = EApprovalBusiness.DIRECT_PUSH_GIFT;
|
||||
//根据产品ID查询产品名称
|
||||
List<AcRecommendUpgradeVO> recommendUpgradeList = recommendParam.getRecommendUpgradeList();
|
||||
|
|
@ -204,23 +199,6 @@ public class AcRepurCouponsRuleConfigServiceImpl extends ServiceImpl<AcRepurCoup
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String approvalReject(ApprovalBusinessResultDTO businessResult) {
|
||||
EApprovalBusiness eApprovalBusiness = businessResult.getEApprovalBusiness();
|
||||
String businessCode = businessResult.getBusinessCode();
|
||||
LoginUser loginUser = businessResult.getLoginUser();
|
||||
AcApprovalLog approvalLog = acApprovalLogService.queryApprovalLog(eApprovalBusiness, businessCode, loginUser.getDataCountry());
|
||||
if (null == approvalLog) {
|
||||
return "审批数据不存在!";
|
||||
}
|
||||
//更新审批状态
|
||||
acApprovalLogService.updateApprovalLog(eApprovalBusiness, businessCode, loginUser.getDataCountry(),
|
||||
loginUser.getUserId(), EApproveRechargeStatus.REJECT, businessResult.getApproveRemark());
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存直推赠送数据
|
||||
*
|
||||
|
|
@ -433,26 +411,6 @@ public class AcRepurCouponsRuleConfigServiceImpl extends ServiceImpl<AcRepurCoup
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param recommendParam 直推赠送参数
|
||||
*/
|
||||
public Boolean submitApproval(AcRecommendParam recommendParam, EApprovalBusiness approvalBusiness, String businessCode) {
|
||||
//保存审批日志
|
||||
AcApprovalLog approvalLog = saveApprovalLog(recommendParam, approvalBusiness, businessCode);
|
||||
ApprovalSubmitDTO approvalSubmitDTO = ApprovalSubmitDTO.builder().eApprovalBusiness(approvalBusiness)
|
||||
.businessCode(approvalLog.getBusinessCode())
|
||||
.signType(ESignType.getEnumByValue(recommendParam.getSignType())).userIdList(recommendParam.getUserIdList())
|
||||
.sendIdList(recommendParam.getSendIdList()).remark(recommendParam.getRemark()).build();
|
||||
R<String> submit = approvalServiceApi.submit(approvalSubmitDTO, recommendParam.getLoginUser());
|
||||
if (!submit.isSuccess()) {
|
||||
throw new RuntimeException("直推赠送提交审批失败!");
|
||||
}
|
||||
return submit.isSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存活动审批日志信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,17 +7,12 @@ import com.hzs.activity.recommend.mapper.AcRepurSharRuleConfigMapper;
|
|||
import com.hzs.activity.recommend.service.IAcRepurSharRuleConfigService;
|
||||
import com.hzs.common.core.enums.EDelFlag;
|
||||
import com.hzs.common.domain.activity.recommend.AcRepurSharRuleConfig;
|
||||
import com.hzs.common.domain.activity.recommend.ext.AcRepurSharRuleConfigExt;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 复购均分配置 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-04
|
||||
*/
|
||||
@Service
|
||||
public class AcRepurSharRuleConfigServiceImpl extends ServiceImpl<AcRepurSharRuleConfigMapper, AcRepurSharRuleConfig> implements IAcRepurSharRuleConfigService {
|
||||
|
|
@ -39,8 +34,4 @@ public class AcRepurSharRuleConfigServiceImpl extends ServiceImpl<AcRepurSharRul
|
|||
return update(updateWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AcRepurSharRuleConfigExt> queryRepurSharRuleConfig(Date startDate, Date endDate) {
|
||||
return baseMapper.queryRepurSharRuleConfig(startDate, endDate);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,17 +10,11 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 商品买赠规则配置表 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-20
|
||||
*/
|
||||
public interface AcWaresRuleConfigMapper extends BaseMapper<AcWaresRuleConfig> {
|
||||
|
||||
/*
|
||||
* @description: 查询买赠活动赠品配置根据条件
|
||||
* @author: sui q
|
||||
* @date: 2023/4/25 19:26
|
||||
* @param: null null
|
||||
* 查询买赠活动赠品配置根据条件
|
||||
**/
|
||||
List<AcWaresRuleConfigExt> queryWaresGiftConfigByCondition(@Param("giftConfigParam") GiftConfigParam giftConfigParam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,17 +12,11 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 商品买赠规则配置表 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-20
|
||||
*/
|
||||
public interface IAcWaresRuleConfigService extends IService<AcWaresRuleConfig> {
|
||||
|
||||
/*
|
||||
* @description: 查询买赠活动赠品配置根据条件
|
||||
* @author: sui q
|
||||
* @date: 2023/4/25 19:26
|
||||
* @param: null null
|
||||
* 查询买赠活动赠品配置根据条件
|
||||
**/
|
||||
List<AcWaresRuleConfigExt> queryWaresGiftConfigByCondition(GiftConfigParam giftConfigParam);
|
||||
|
||||
|
|
@ -64,11 +58,4 @@ public interface IAcWaresRuleConfigService extends IService<AcWaresRuleConfig> {
|
|||
*/
|
||||
String approvalAgree(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
/**
|
||||
* 商品赠送 审核规则驳回
|
||||
*
|
||||
* @param approvalBusinessResultDTO
|
||||
* @return
|
||||
*/
|
||||
String approvalReject(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.hzs.activity.wares.service.impl;
|
|||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.activity.base.param.ActivityParam;
|
||||
|
|
@ -13,7 +12,6 @@ import com.hzs.activity.base.service.IAcBaseConfigService;
|
|||
import com.hzs.activity.base.service.IAcGoalMemberConfigService;
|
||||
import com.hzs.activity.recommend.param.AcRecommendParam;
|
||||
import com.hzs.activity.wares.service.IAcGiftConfigService;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.CommonUtil;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
|
|
@ -26,12 +24,9 @@ import com.hzs.activity.wares.mapper.AcWaresRuleConfigMapper;
|
|||
import com.hzs.activity.wares.service.IAcWaresRuleConfigService;
|
||||
import com.hzs.common.domain.activity.wares.ext.AcWaresRuleConfigExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.system.sys.IApprovalServiceApi;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
import com.hzs.system.sys.dto.ApprovalSubmitDTO;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -40,9 +35,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 商品买赠规则配置表 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-20
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
|
|
@ -61,8 +53,6 @@ public class AcWaresRuleConfigServiceImpl extends ServiceImpl<AcWaresRuleConfigM
|
|||
@Autowired
|
||||
private IAcWaresRuleConfigService waresRuleConfigService;
|
||||
|
||||
@DubboReference
|
||||
IApprovalServiceApi approvalServiceApi;
|
||||
|
||||
@Override
|
||||
public List<AcWaresRuleConfigExt> queryWaresGiftConfigByCondition(GiftConfigParam giftConfigParam) {
|
||||
|
|
@ -113,7 +103,7 @@ public class AcWaresRuleConfigServiceImpl extends ServiceImpl<AcWaresRuleConfigM
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String onLinePetition(AcRecommendParam recommendParam) {
|
||||
log.info("商品赠送入参{}",recommendParam);
|
||||
log.info("商品赠送入参{}", recommendParam);
|
||||
EApprovalBusiness approvalBusiness = null;
|
||||
if (recommendParam.getControlType() == EControlType.SAVE.getValue()) {
|
||||
approvalBusiness = EApprovalBusiness.PRODUCT_GIFT_ADD;
|
||||
|
|
@ -198,48 +188,6 @@ public class AcWaresRuleConfigServiceImpl extends ServiceImpl<AcWaresRuleConfigM
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品赠送审核规则
|
||||
*
|
||||
* @param businessResult
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String approvalReject(ApprovalBusinessResultDTO businessResult) {
|
||||
EApprovalBusiness eApprovalBusiness = businessResult.getEApprovalBusiness();
|
||||
String businessCode = businessResult.getBusinessCode();
|
||||
LoginUser loginUser = businessResult.getLoginUser();
|
||||
AcApprovalLog approvalLog = acApprovalLogService.queryApprovalLog(eApprovalBusiness, businessCode, loginUser.getDataCountry());
|
||||
if (null == approvalLog) {
|
||||
return "审批数据不存在!";
|
||||
}
|
||||
//更新审批状态
|
||||
acApprovalLogService.updateApprovalLog(eApprovalBusiness, businessCode, loginUser.getDataCountry(),
|
||||
loginUser.getUserId(), EApproveRechargeStatus.REJECT, businessResult.getApproveRemark());
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param recommendParam 抽奖参数
|
||||
*/
|
||||
public Boolean submitApproval(AcRecommendParam recommendParam, EApprovalBusiness approvalBusiness) {
|
||||
//保存审批日志
|
||||
AcApprovalLog approvalLog = saveApprovalLog(recommendParam, approvalBusiness);
|
||||
ApprovalSubmitDTO approvalSubmitDTO = ApprovalSubmitDTO.builder().eApprovalBusiness(approvalBusiness)
|
||||
.businessCode(approvalLog.getBusinessCode())
|
||||
.businessData(JSONObject.toJSONString(recommendParam.getActivityParam()))
|
||||
.signType(ESignType.getEnumByValue(recommendParam.getSignType())).userIdList(recommendParam.getUserIdList())
|
||||
.sendIdList(recommendParam.getSendIdList()).remark(recommendParam.getRemark()).fileList(recommendParam.getFileList())
|
||||
.build();
|
||||
R<String> submit = approvalServiceApi.submit(approvalSubmitDTO, recommendParam.getLoginUser());
|
||||
if (!submit.isSuccess()) {
|
||||
throw new RuntimeException("旅游活动参数提交审批失败!");
|
||||
}
|
||||
return submit.isSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存活动审批日志信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@
|
|||
order by aw.order_amount desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -34,16 +34,4 @@
|
|||
)
|
||||
</update>
|
||||
|
||||
<select id="queryRepurSharRuleConfig" resultMap="AcRepurSharRuleConfigExt">
|
||||
select ar.order_amount, ar.order_achieve, ar.ratio_value, ao.order_type, ac.pk_country
|
||||
from ac_base_config ac
|
||||
inner join ac_repur_shar_rule_config ar
|
||||
on ac.pk_id = ar.pk_base_id
|
||||
inner join ac_repur_shar_order_type ao
|
||||
on ar.pk_id = ao.pk_rule_id
|
||||
where ar.del_flag = 0
|
||||
and ao.del_flag = 0
|
||||
and ac.ACT_START_DATE <= #{startDate, jdbcType=DATE}
|
||||
and ac.ACT_END_DATE > #{endDate, jdbcType=DATE}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,9 @@ package com.hzs.system.sys.controller.manage;
|
|||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.json.JSONConfig;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.hzs.activity.base.IActivityApprovalServiceApi;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.annotation.RepeatSubmitSimple;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
|
|
@ -90,8 +88,6 @@ public class SysApprovalBusinessController extends BaseController {
|
|||
@DubboReference
|
||||
ICuAwardsControlServiceApi controlServiceApi;
|
||||
@DubboReference
|
||||
IActivityApprovalServiceApi iActivityApprovalServiceApi;
|
||||
@DubboReference
|
||||
IUpPolicyCurrencyServiceApi upPolicyCurrencyServiceApi;
|
||||
@DubboReference
|
||||
IUpdateExpireStopServiceApi updateExpireStopServiceApi;
|
||||
|
|
@ -285,16 +281,6 @@ public class SysApprovalBusinessController extends BaseController {
|
|||
approvalBusinessVO.setBusinessData(sysApprovalBusinessData.getBusinessData());
|
||||
}
|
||||
break;
|
||||
case ACTIVITY_BUSINESS:
|
||||
// 活动服务信息处理
|
||||
R<?> activityR = iActivityApprovalServiceApi.queryApprovalData(EApprovalBusiness.getEnumByValue(approvalBusinessExt.getApprovalBusiness()), approvalBusinessExt.getBusinessCode(), SecurityUtils.getPkCountry());
|
||||
if (activityR.isSuccess()) {
|
||||
if (null != activityR.getData()) {
|
||||
JSONConfig jsonConfig = JSONConfig.create().setDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
approvalBusinessVO.setBusinessData(JSONUtil.toJsonStr(activityR.getData(), jsonConfig));
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
return AjaxResult.success(approvalBusinessVO);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.hzs.activity.base.IActivityApprovalServiceApi;
|
||||
import com.hzs.common.core.constant.SystemFieldConstants;
|
||||
import com.hzs.common.core.constant.msg.DocumentMsgConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
|
|
@ -79,8 +78,6 @@ public class ApprovalServiceImpl implements IApprovalService {
|
|||
@DubboReference
|
||||
INoticeAuditServiceApi iNoticeAuditServiceApi;
|
||||
@DubboReference
|
||||
IActivityApprovalServiceApi iActivityApprovalServiceApi;
|
||||
@DubboReference
|
||||
IApprovalPushInfo iApprovalPushInfo;
|
||||
@DubboReference
|
||||
IStatisticalLogServiceApi statisticalLogServiceApi;
|
||||
|
|
@ -478,10 +475,6 @@ public class ApprovalServiceImpl implements IApprovalService {
|
|||
// 公告、站内信相关
|
||||
resultR = iNoticeAuditServiceApi.noticeAuditProcess(approvalBusinessResultDTO);
|
||||
break;
|
||||
case ACTIVITY_BUSINESS:
|
||||
// 活动相关处理
|
||||
resultR = iActivityApprovalServiceApi.approvalCallback(approvalBusinessResultDTO);
|
||||
break;
|
||||
case CUSTOM_BUSINESS:
|
||||
// 自定义签呈不需要进行后续业务操作
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -40,11 +40,6 @@ public enum EApprovalType {
|
|||
*/
|
||||
NOTICE_BUSINESS(5, "公告站内信"),
|
||||
|
||||
/**
|
||||
* 活动相关处理
|
||||
*/
|
||||
ACTIVITY_BUSINESS(7, "活动相关处理"),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -10,9 +10,6 @@ import lombok.experimental.Accessors;
|
|||
|
||||
/**
|
||||
* 活动审批日志
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-22
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
|
|
|||
|
|
@ -12,12 +12,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 消费买赠规则配置表
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
|||
|
|
@ -10,12 +10,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 消费赠送屏蔽配置表
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
|||
|
|
@ -9,12 +9,7 @@ import java.io.Serializable;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 业绩赠送配置
|
||||
* @author: sui q
|
||||
* @time: 2023/4/26 10:30
|
||||
* @classname: AcConsumeRuleConfigExt
|
||||
* @package_name: com.hzs.common.domain.activity.consume.ext
|
||||
* version 1.0.0
|
||||
* 业绩赠送配置
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -9,12 +9,7 @@ import lombok.*;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 抽奖活动赠品配置
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
|||
|
|
@ -9,12 +9,7 @@ import lombok.*;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会员可抽奖次数记录
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
|||
|
|
@ -9,12 +9,7 @@ import lombok.EqualsAndHashCode;
|
|||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @description: 扩展类
|
||||
* @author: sui q
|
||||
* @time: 2023/4/27 15:07
|
||||
* @classname: AcDrawRewardNumExt
|
||||
* @package_name: com.hzs.common.domain.activity.draw.ext
|
||||
* version 1.0.0
|
||||
* 扩展类
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -10,12 +10,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 商品买赠规则配置表
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-04-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
|||
|
|
@ -8,12 +8,7 @@ import lombok.EqualsAndHashCode;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 商品买赠规则扩展表
|
||||
* @author: sui q
|
||||
* @time: 2023/4/25 19:41
|
||||
* @classname: AcWaresRuleConfigExt
|
||||
* @package_name: com.hzs.common.domain.activity.wares.ext
|
||||
* version 1.0.0
|
||||
* 商品买赠规则扩展表
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
|
|
|||
Loading…
Reference in New Issue