forked from angelo/java-retail-app
Compare commits
4 Commits
8d941689d5
...
ccbf6d1b37
| Author | SHA1 | Date |
|---|---|---|
|
|
ccbf6d1b37 | |
|
|
a3e141de80 | |
|
|
0d88669404 | |
|
|
0f4b362a4b |
|
|
@ -1,6 +1,7 @@
|
||||||
package com.hzs.member.base.vo;
|
package com.hzs.member.base.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.hzs.common.core.annotation.BigDecimalFormat;
|
||||||
import com.hzs.common.core.annotation.Excel;
|
import com.hzs.common.core.annotation.Excel;
|
||||||
import com.hzs.common.core.annotation.Transaction;
|
import com.hzs.common.core.annotation.Transaction;
|
||||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
|
|
@ -90,13 +91,15 @@ public class RetailMemberVO implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 消费金额 注册金额
|
* 消费金额 注册金额
|
||||||
*/
|
*/
|
||||||
@Excel(name = "注册金额")
|
@Excel(name = "注册金额", scale = 2)
|
||||||
|
@BigDecimalFormat()
|
||||||
private BigDecimal consumeMoney;
|
private BigDecimal consumeMoney;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消费业绩 注册业绩
|
* 消费业绩 注册业绩
|
||||||
*/
|
*/
|
||||||
@Excel(name = "注册业绩($)")
|
@Excel(name = "注册业绩", scale = 2)
|
||||||
|
@BigDecimalFormat()
|
||||||
private BigDecimal consumeAchieve;
|
private BigDecimal consumeAchieve;
|
||||||
/**
|
/**
|
||||||
* 隶属体系
|
* 隶属体系
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,6 @@ import com.hzs.activity.consume.service.IAcMemberConsumeRuleService;
|
||||||
import com.hzs.activity.draw.param.PurchasedTimesParam;
|
import com.hzs.activity.draw.param.PurchasedTimesParam;
|
||||||
import com.hzs.activity.draw.service.IAcDrawGiftRuleConfigService;
|
import com.hzs.activity.draw.service.IAcDrawGiftRuleConfigService;
|
||||||
import com.hzs.activity.draw.service.IAcDrawRewardNumService;
|
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.pick.service.IAcRetailPickProductConfigService;
|
import com.hzs.activity.pick.service.IAcRetailPickProductConfigService;
|
||||||
import com.hzs.activity.recommend.param.AcRecommendParam;
|
import com.hzs.activity.recommend.param.AcRecommendParam;
|
||||||
import com.hzs.activity.recommend.service.IAcRepurCouponsRuleConfigService;
|
import com.hzs.activity.recommend.service.IAcRepurCouponsRuleConfigService;
|
||||||
|
|
@ -21,14 +18,10 @@ import com.hzs.common.core.enums.*;
|
||||||
import com.hzs.common.core.exception.base.BaseException;
|
import com.hzs.common.core.exception.base.BaseException;
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
import com.hzs.common.core.utils.StringUtils;
|
||||||
import com.hzs.common.domain.activity.base.AcApprovalLog;
|
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 com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
|
||||||
import org.apache.dubbo.config.annotation.DubboService;
|
import org.apache.dubbo.config.annotation.DubboService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -46,8 +39,6 @@ public class ActivityApprovalProvider implements IActivityApprovalServiceApi {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAcDrawGiftRuleConfigService drawGiftConfigService;
|
private IAcDrawGiftRuleConfigService drawGiftConfigService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAcPickService iAcPickService;
|
|
||||||
@Autowired
|
|
||||||
private IAcApprovalLogService iAcApprovalLogService;
|
private IAcApprovalLogService iAcApprovalLogService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAcRepurCouponsRuleConfigService acRepurCouponsRuleConfigService;
|
private IAcRepurCouponsRuleConfigService acRepurCouponsRuleConfigService;
|
||||||
|
|
@ -56,12 +47,6 @@ public class ActivityApprovalProvider implements IActivityApprovalServiceApi {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAcRetailPickProductConfigService iAcRetailPickProductConfigService;
|
private IAcRetailPickProductConfigService iAcRetailPickProductConfigService;
|
||||||
|
|
||||||
@DubboReference
|
|
||||||
IMemberServiceApi iMemberServiceApi;
|
|
||||||
@DubboReference
|
|
||||||
IProductServiceApi iProductServiceApi;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<Boolean> approvalCallback(ApprovalBusinessResultDTO approvalBusinessResultDTO) {
|
public R<Boolean> approvalCallback(ApprovalBusinessResultDTO approvalBusinessResultDTO) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -70,14 +55,6 @@ public class ActivityApprovalProvider implements IActivityApprovalServiceApi {
|
||||||
if (EApproveStatus.FINISH.getValue() == approvalBusinessResultDTO.getEApproveStatus().getValue()) {
|
if (EApproveStatus.FINISH.getValue() == approvalBusinessResultDTO.getEApproveStatus().getValue()) {
|
||||||
// 通过处理
|
// 通过处理
|
||||||
switch (approvalBusinessResultDTO.getEApprovalBusiness()) {
|
switch (approvalBusinessResultDTO.getEApprovalBusiness()) {
|
||||||
case PICK_ADD:
|
|
||||||
// 提货充值
|
|
||||||
str = iAcPickService.pickApprovalAgree(approvalBusinessResultDTO);
|
|
||||||
break;
|
|
||||||
case PICK_ADD_DEL:
|
|
||||||
// 提货充值删除
|
|
||||||
str = iAcPickService.delpickApprovalAgree(approvalBusinessResultDTO);
|
|
||||||
break;
|
|
||||||
// 直推赠送
|
// 直推赠送
|
||||||
case DIRECT_PUSH_GIFT:
|
case DIRECT_PUSH_GIFT:
|
||||||
str = acRepurCouponsRuleConfigService.approvalAgree(approvalBusinessResultDTO);
|
str = acRepurCouponsRuleConfigService.approvalAgree(approvalBusinessResultDTO);
|
||||||
|
|
@ -128,10 +105,6 @@ public class ActivityApprovalProvider implements IActivityApprovalServiceApi {
|
||||||
} else {
|
} else {
|
||||||
// 驳回处理
|
// 驳回处理
|
||||||
switch (approvalBusinessResultDTO.getEApprovalBusiness()) {
|
switch (approvalBusinessResultDTO.getEApprovalBusiness()) {
|
||||||
case PICK_ADD:
|
|
||||||
// 提货充值
|
|
||||||
str = iAcPickService.pickApprovalReject(approvalBusinessResultDTO);
|
|
||||||
break;
|
|
||||||
// 直推赠送
|
// 直推赠送
|
||||||
case DIRECT_PUSH_GIFT:
|
case DIRECT_PUSH_GIFT:
|
||||||
str = acRepurCouponsRuleConfigService.approvalReject(approvalBusinessResultDTO);
|
str = acRepurCouponsRuleConfigService.approvalReject(approvalBusinessResultDTO);
|
||||||
|
|
@ -163,19 +136,6 @@ public class ActivityApprovalProvider implements IActivityApprovalServiceApi {
|
||||||
try {
|
try {
|
||||||
List<AcApprovalLog> acApprovalLogList = iAcApprovalLogService.queryApprovalLogList(eApprovalBusiness, businessCode, pkCountry);
|
List<AcApprovalLog> acApprovalLogList = iAcApprovalLogService.queryApprovalLogList(eApprovalBusiness, businessCode, pkCountry);
|
||||||
switch (eApprovalBusiness) {
|
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 DIRECT_PUSH_GIFT:
|
||||||
case LOTTERY_DRAW:
|
case LOTTERY_DRAW:
|
||||||
// 抽奖
|
// 抽奖
|
||||||
|
|
@ -209,11 +169,9 @@ public class ActivityApprovalProvider implements IActivityApprovalServiceApi {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private AcRecommendParam getRecommendApprovalData(AcApprovalLog acApprovalLog) {
|
private AcRecommendParam getRecommendApprovalData(AcApprovalLog acApprovalLog) {
|
||||||
String data = acApprovalLog.getAfterData();
|
String data = acApprovalLog.getAfterData();
|
||||||
return JSONUtil.toBean(data, AcRecommendParam.class);
|
return JSONUtil.toBean(data, AcRecommendParam.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private PurchasedTimesParam getRecommendApprovalDataInfo(AcApprovalLog acApprovalLog) {
|
private PurchasedTimesParam getRecommendApprovalDataInfo(AcApprovalLog acApprovalLog) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import com.hzs.activity.pick.vo.AcPickQueryDetailVO;
|
||||||
import com.hzs.activity.pick.vo.AcPickQueryVO;
|
import com.hzs.activity.pick.vo.AcPickQueryVO;
|
||||||
import com.hzs.activity.wares.service.IAcGiftConfigService;
|
import com.hzs.activity.wares.service.IAcGiftConfigService;
|
||||||
import com.hzs.common.core.annotation.Log;
|
import com.hzs.common.core.annotation.Log;
|
||||||
import com.hzs.common.core.constant.msg.CommonMsgConstants;
|
|
||||||
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
||||||
import com.hzs.common.core.constant.msg.ProductMsgConstants;
|
import com.hzs.common.core.constant.msg.ProductMsgConstants;
|
||||||
import com.hzs.common.core.enums.*;
|
import com.hzs.common.core.enums.*;
|
||||||
|
|
@ -93,7 +92,8 @@ public class AcPickController extends BaseController {
|
||||||
|
|
||||||
acPickQueryVO.setPickTypeVal(EPickType.getEnumByValue(acPickQueryVO.getPickType()).getLabel());
|
acPickQueryVO.setPickTypeVal(EPickType.getEnumByValue(acPickQueryVO.getPickType()).getLabel());
|
||||||
|
|
||||||
if (EPickType.PICK_PRODUCT.getValue() == acPickExt.getPickType()) {
|
if (EPickType.PICK_PRODUCT.getValue() == acPickExt.getPickType()
|
||||||
|
|| EPickType.COMPANY_PRODUCT.getValue() == acPickExt.getPickType()) {
|
||||||
// 提货产品
|
// 提货产品
|
||||||
acPickQueryVO.setDetailList(Collections.singletonList(AcPickQueryDetailVO.builder()
|
acPickQueryVO.setDetailList(Collections.singletonList(AcPickQueryDetailVO.builder()
|
||||||
.productName(acPickExt.getProductName())
|
.productName(acPickExt.getProductName())
|
||||||
|
|
@ -155,7 +155,8 @@ public class AcPickController extends BaseController {
|
||||||
|
|
||||||
acPickQueryVO.setPickTypeVal(EPickType.getEnumByValue(acPickQueryVO.getPickType()).getLabel());
|
acPickQueryVO.setPickTypeVal(EPickType.getEnumByValue(acPickQueryVO.getPickType()).getLabel());
|
||||||
|
|
||||||
if (EPickType.PICK_PRODUCT.getValue() == acPickExt.getPickType()) {
|
if (EPickType.PICK_PRODUCT.getValue() == acPickExt.getPickType()
|
||||||
|
|| EPickType.COMPANY_PRODUCT.getValue() == acPickExt.getPickType()) {
|
||||||
// 产品处理
|
// 产品处理
|
||||||
acPickQueryVO.setDetailList(Collections.singletonList(AcPickQueryDetailVO.builder()
|
acPickQueryVO.setDetailList(Collections.singletonList(AcPickQueryDetailVO.builder()
|
||||||
.productName(acPickExt.getProductName())
|
.productName(acPickExt.getProductName())
|
||||||
|
|
@ -199,7 +200,8 @@ public class AcPickController extends BaseController {
|
||||||
AcPickExt acPickExt = iAcPickService.queryDetail(pkId, pkCountry);
|
AcPickExt acPickExt = iAcPickService.queryDetail(pkId, pkCountry);
|
||||||
if (null != acPickExt) {
|
if (null != acPickExt) {
|
||||||
acPickQueryVO = BeanUtil.copyProperties(acPickExt, AcPickQueryVO.class);
|
acPickQueryVO = BeanUtil.copyProperties(acPickExt, AcPickQueryVO.class);
|
||||||
if (EPickType.PICK_PRODUCT.getValue() == acPickExt.getPickType()) {
|
if (EPickType.PICK_PRODUCT.getValue() == acPickExt.getPickType()
|
||||||
|
|| EPickType.COMPANY_PRODUCT.getValue() == acPickExt.getPickType()) {
|
||||||
// 产品处理
|
// 产品处理
|
||||||
acPickQueryVO.setDetailList(Collections.singletonList(AcPickQueryDetailVO.builder()
|
acPickQueryVO.setDetailList(Collections.singletonList(AcPickQueryDetailVO.builder()
|
||||||
.pkProduct(acPickExt.getPkDataId().intValue())
|
.pkProduct(acPickExt.getPkDataId().intValue())
|
||||||
|
|
@ -233,23 +235,17 @@ public class AcPickController extends BaseController {
|
||||||
@Log(module = EOperationModule.RECHARGE_PICK, business = EOperationBusiness.RECHARGE_PICK, method = EOperationMethod.SUBMIT)
|
@Log(module = EOperationModule.RECHARGE_PICK, business = EOperationBusiness.RECHARGE_PICK, method = EOperationMethod.SUBMIT)
|
||||||
@PostMapping("/submit")
|
@PostMapping("/submit")
|
||||||
public AjaxResult submit(@RequestBody AcPickSaveParam param) {
|
public AjaxResult submit(@RequestBody AcPickSaveParam param) {
|
||||||
if (null == param.getSignType() || CollectionUtil.isEmpty(param.getUserIdList())
|
|
||||||
|| CollectionUtil.isEmpty(param.getDetailList())) {
|
|
||||||
// 缺少参数
|
|
||||||
return AjaxResult.error(TransactionUtils.getContent(CommonMsgConstants.MISSING_PARAM));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (AcPickSaveDetailParam detailParam : param.getDetailList()) {
|
for (AcPickSaveDetailParam detailParam : param.getDetailList()) {
|
||||||
if (StringUtils.isAnyEmpty(detailParam.getMemberCode(), detailParam.getSpecsName(), detailParam.getSpecsNameId())
|
if (StringUtils.isAnyEmpty(detailParam.getMemberCode(), detailParam.getSpecsName(), detailParam.getSpecsNameId())
|
||||||
|| null == detailParam.getPkProduct() || null == detailParam.getBaseQuantity() || null == detailParam.getQuantity()
|
|| null == detailParam.getPkProduct() || null == detailParam.getBaseQuantity() || null == detailParam.getQuantity()
|
||||||
|| null == detailParam.getIsFreeMail()) {
|
|| null == detailParam.getIsFreeMail()) {
|
||||||
// 缺少参数
|
// 缺少参数
|
||||||
return AjaxResult.error(TransactionUtils.getContent(CommonMsgConstants.MISSING_PARAM));
|
return AjaxResult.error("缺少参数");
|
||||||
}
|
}
|
||||||
if (EYesNo.NO.getIntValue() == detailParam.getIsFreeMail() && null == detailParam.getPkPostage()) {
|
if (EYesNo.NO.getIntValue() == detailParam.getIsFreeMail() && null == detailParam.getPkPostage()) {
|
||||||
// 不包邮,则必须传入邮费模板
|
// 不包邮,则必须传入邮费模板
|
||||||
// 缺少参数
|
// 缺少参数
|
||||||
return AjaxResult.error(TransactionUtils.getContent(CommonMsgConstants.MISSING_PARAM));
|
return AjaxResult.error("缺少参数");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 手动添加提货数据比较少,此处查人和产品先单次查,如果同时操作人过多可以改成批量,或者不进行校验
|
// 手动添加提货数据比较少,此处查人和产品先单次查,如果同时操作人过多可以改成批量,或者不进行校验
|
||||||
|
|
@ -274,19 +270,14 @@ public class AcPickController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 删除充值提货卡
|
* 删除充值提货卡
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2023/10/17 17:35
|
|
||||||
* @param: [anpParam]
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@Log(module = EOperationModule.RECHARGE_PICK, business = EOperationBusiness.RECHARGE_PICK, method = EOperationMethod.DELETE)
|
@Log(module = EOperationModule.RECHARGE_PICK, business = EOperationBusiness.RECHARGE_PICK, method = EOperationMethod.DELETE)
|
||||||
@PostMapping("/del-pick")
|
@PostMapping("/del-pick")
|
||||||
public AjaxResult delPick(@RequestBody AcPickSaveParam anpParam) {
|
public AjaxResult delPick(@RequestBody AcPickSaveParam anpParam) {
|
||||||
if (null == anpParam.getSignType() || CollectionUtil.isEmpty(anpParam.getUserIdList())
|
if (CollectionUtil.isEmpty(anpParam.getDetailList())) {
|
||||||
|| CollectionUtil.isEmpty(anpParam.getDetailList())) {
|
|
||||||
// 缺少参数
|
// 缺少参数
|
||||||
return AjaxResult.error(TransactionUtils.getContent(CommonMsgConstants.MISSING_PARAM));
|
return AjaxResult.error("缺少参数");
|
||||||
}
|
}
|
||||||
// 设置参数
|
// 设置参数
|
||||||
LoginUser loginUser = userTokenService.getLoginUser();
|
LoginUser loginUser = userTokenService.getLoginUser();
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,7 @@ import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 提货明细保存入参
|
* 提货明细保存入参
|
||||||
* @Author: jiang chao
|
|
||||||
* @Time: 2023/5/10 19:06
|
|
||||||
* @Classname: AcPickSaveDetailParam
|
|
||||||
* @PackageName: com.hzs.activity.pick.param
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class AcPickSaveDetailParam implements Serializable {
|
public class AcPickSaveDetailParam implements Serializable {
|
||||||
|
|
@ -76,4 +72,9 @@ public class AcPickSaveDetailParam implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String productName;
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提货类型
|
||||||
|
*/
|
||||||
|
private Integer pickType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 提货保存入参
|
* 提货保存入参
|
||||||
* @Author: jiang chao
|
|
||||||
* @Time: 2023/4/22 11:26
|
|
||||||
* @Classname: AcPickSaveParam
|
|
||||||
* @PackageName: com.hzs.activity.pick.param
|
|
||||||
*/
|
*/
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import com.hzs.activity.pick.param.AcPickSaveParam;
|
||||||
import com.hzs.activity.pick.vo.ApiPickListVO;
|
import com.hzs.activity.pick.vo.ApiPickListVO;
|
||||||
import com.hzs.common.domain.activity.pick.AcPick;
|
import com.hzs.common.domain.activity.pick.AcPick;
|
||||||
import com.hzs.common.domain.activity.pick.ext.AcPickExt;
|
import com.hzs.common.domain.activity.pick.ext.AcPickExt;
|
||||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
|
||||||
import com.hzs.system.sys.dto.LoginUser;
|
import com.hzs.system.sys.dto.LoginUser;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -38,7 +37,6 @@ public interface IAcPickService extends IService<AcPick> {
|
||||||
Integer usableQuantity, String pickCover, Date receiveTime, Integer pkPostage,
|
Integer usableQuantity, String pickCover, Date receiveTime, Integer pkPostage,
|
||||||
Long pkCreator, Integer pkCountry, Long pkBaseId);
|
Long pkCreator, Integer pkCountry, Long pkBaseId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据会员和活动类型回退使用数量
|
* 根据会员和活动类型回退使用数量
|
||||||
*
|
*
|
||||||
|
|
@ -81,31 +79,10 @@ public interface IAcPickService extends IService<AcPick> {
|
||||||
String pickSubmit(AcPickSaveParam param, LoginUser loginUser);
|
String pickSubmit(AcPickSaveParam param, LoginUser loginUser);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除充值提货卡发起签呈
|
* 删除充值提货卡
|
||||||
**/
|
**/
|
||||||
boolean delPick(AcPickSaveParam anpParam);
|
boolean delPick(AcPickSaveParam anpParam);
|
||||||
|
|
||||||
/**
|
|
||||||
* 提货变动审批通过
|
|
||||||
*
|
|
||||||
* @param resultDTO
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String pickApprovalAgree(ApprovalBusinessResultDTO resultDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 审核删除充值提货卡
|
|
||||||
**/
|
|
||||||
String delpickApprovalAgree(ApprovalBusinessResultDTO resultDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 提货变动审批驳回
|
|
||||||
*
|
|
||||||
* @param resultDTO
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String pickApprovalReject(ApprovalBusinessResultDTO resultDTO);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员提货列表
|
* 会员提货列表
|
||||||
*
|
*
|
||||||
|
|
@ -135,7 +112,6 @@ public interface IAcPickService extends IService<AcPick> {
|
||||||
*/
|
*/
|
||||||
int batchSaveOrUpdatePick(List<AcPick> pickList);
|
int batchSaveOrUpdatePick(List<AcPick> pickList);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID更新会员提货数据
|
* 根据ID更新会员提货数据
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package com.hzs.activity.pick.service.impl;
|
package com.hzs.activity.pick.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
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.query.LambdaQueryWrapper;
|
||||||
import com.hzs.activity.base.service.IAcApprovalLogService;
|
|
||||||
import com.hzs.activity.pick.mapper.AcPickMapper;
|
import com.hzs.activity.pick.mapper.AcPickMapper;
|
||||||
import com.hzs.activity.pick.param.AcPickQueryParam;
|
import com.hzs.activity.pick.param.AcPickQueryParam;
|
||||||
import com.hzs.activity.pick.param.AcPickSaveDetailParam;
|
import com.hzs.activity.pick.param.AcPickSaveDetailParam;
|
||||||
|
|
@ -13,15 +11,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.hzs.activity.pick.vo.ApiPickListVO;
|
import com.hzs.activity.pick.vo.ApiPickListVO;
|
||||||
import com.hzs.activity.wares.service.IAcGiftConfigService;
|
import com.hzs.activity.wares.service.IAcGiftConfigService;
|
||||||
import com.hzs.common.core.constant.RabbitMqConstants;
|
import com.hzs.common.core.constant.RabbitMqConstants;
|
||||||
import com.hzs.common.core.constant.msg.ActivityMsgConstants;
|
|
||||||
import com.hzs.common.core.constant.msg.CommonMsgConstants;
|
|
||||||
import com.hzs.common.core.constant.msg.DocumentMsgConstants;
|
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.enums.*;
|
||||||
import com.hzs.common.core.exception.base.BaseException;
|
import com.hzs.common.core.exception.ServiceException;
|
||||||
import com.hzs.common.core.utils.CommonUtil;
|
import com.hzs.common.core.utils.CommonUtil;
|
||||||
import com.hzs.common.core.utils.DateUtils;
|
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.AcPickUpConfig;
|
||||||
import com.hzs.common.domain.activity.base.ext.AcGiftConfigExt;
|
import com.hzs.common.domain.activity.base.ext.AcGiftConfigExt;
|
||||||
import com.hzs.common.domain.activity.pick.AcPick;
|
import com.hzs.common.domain.activity.pick.AcPick;
|
||||||
|
|
@ -34,9 +28,6 @@ import com.hzs.member.base.IMemberServiceApi;
|
||||||
import com.hzs.sale.postage.dto.PostageProductDTO;
|
import com.hzs.sale.postage.dto.PostageProductDTO;
|
||||||
import com.hzs.sale.postage.service.IPostageBusinessService;
|
import com.hzs.sale.postage.service.IPostageBusinessService;
|
||||||
import com.hzs.sale.product.service.IBdProductService;
|
import com.hzs.sale.product.service.IBdProductService;
|
||||||
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.BusinessLogDTO;
|
||||||
import com.hzs.system.sys.dto.LoginUser;
|
import com.hzs.system.sys.dto.LoginUser;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -57,8 +48,6 @@ import java.util.stream.Collectors;
|
||||||
@Service
|
@Service
|
||||||
public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> implements IAcPickService {
|
public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> implements IAcPickService {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IAcApprovalLogService iAcApprovalLogService;
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAcPickLogService iAcPickLogService;
|
private IAcPickLogService iAcPickLogService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -72,8 +61,6 @@ public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> impleme
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPostageBusinessService iPostageBusinessService;
|
private IPostageBusinessService iPostageBusinessService;
|
||||||
|
|
||||||
@DubboReference
|
|
||||||
IApprovalServiceApi iApprovalServiceApi;
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberServiceApi iMemberServiceApi;
|
IMemberServiceApi iMemberServiceApi;
|
||||||
|
|
||||||
|
|
@ -141,222 +128,25 @@ public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> impleme
|
||||||
// 操作日志列表
|
// 操作日志列表
|
||||||
List<BusinessLogDTO> logDTOList = new ArrayList<>();
|
List<BusinessLogDTO> logDTOList = new ArrayList<>();
|
||||||
|
|
||||||
// 批量保存日志
|
|
||||||
List<AcApprovalLog> approvalLogList = new ArrayList<>();
|
|
||||||
|
|
||||||
// 产品数据map
|
// 产品数据map
|
||||||
Map<Integer, BdProduct> productMap = iBdProductService.queryProductMap(param.getDetailList().stream().map(AcPickSaveDetailParam::getPkProduct).collect(Collectors.toList()), pkCountry);
|
Map<Integer, BdProduct> productMap = iBdProductService.queryProductMap(param.getDetailList().stream().map(AcPickSaveDetailParam::getPkProduct).collect(Collectors.toList()), pkCountry);
|
||||||
|
|
||||||
for (AcPickSaveDetailParam detailParam : param.getDetailList()) {
|
|
||||||
// 活动审批日志
|
|
||||||
AcApprovalLog acApprovalLog = new AcApprovalLog();
|
|
||||||
acApprovalLog.setApprovalType(EApprovalBusiness.PICK_ADD.getValue());
|
|
||||||
acApprovalLog.setBusinessCode(businessCode);
|
|
||||||
acApprovalLog.setPkCreator(userId);
|
|
||||||
acApprovalLog.setPkCountry(pkCountry);
|
|
||||||
acApprovalLog.setAfterData(JSONUtil.toJsonStr(detailParam));
|
|
||||||
if (null != detailParam.getPkId()) {
|
|
||||||
acApprovalLog.setPkBusiness(detailParam.getPkId());
|
|
||||||
}
|
|
||||||
approvalLogList.add(acApprovalLog);
|
|
||||||
|
|
||||||
// 产品信息
|
|
||||||
BdProduct bdProduct = productMap.get(detailParam.getPkProduct());
|
|
||||||
// 操作日志内容
|
|
||||||
StringBuilder content = new StringBuilder();
|
|
||||||
content.append("会员编号 ").append(detailParam.getMemberCode());
|
|
||||||
content.append(" 充值提货卡 ").append(bdProduct.getProductName()).append("(").append(detailParam.getSpecsName()).append(")");
|
|
||||||
content.append(",提货基数 ").append(detailParam.getBaseQuantity());
|
|
||||||
content.append(",充值数量 ").append(detailParam.getQuantity());
|
|
||||||
if (null != detailParam.getReceiveTime()) {
|
|
||||||
content.append(",截止日期 ").append(DateUtils.parseDateToFormat(DateUtils.YYYY_MM_DD_HH_MM_SS, detailParam.getReceiveTime()));
|
|
||||||
}
|
|
||||||
if (EYesNo.YES.getIntValue() == detailParam.getIsFreeMail()) {
|
|
||||||
content.append(",包邮;");
|
|
||||||
} else {
|
|
||||||
content.append(",不包邮;");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 会员信息
|
|
||||||
CuMember cuMember = iMemberServiceApi.queryMember(detailParam.getMemberCode()).getData();
|
|
||||||
// 封装业务操作日志
|
|
||||||
logDTOList.add(BusinessLogDTO.builder()
|
|
||||||
.businessType(EApprovalBusiness.PICK_ADD.getValue())
|
|
||||||
.businessCode(businessCode)
|
|
||||||
.content(content.toString())
|
|
||||||
.pkMember(cuMember.getPkId())
|
|
||||||
.pkCreator(userId)
|
|
||||||
.pkCountry(pkCountry)
|
|
||||||
.freeSignFlag(false)
|
|
||||||
.build());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iAcApprovalLogService.saveBatch(approvalLogList)) {
|
|
||||||
// 保存审批日志成功,提交签呈
|
|
||||||
|
|
||||||
// 提交签呈处理
|
|
||||||
R<String> resultR = iApprovalServiceApi.submitOrder(
|
|
||||||
ApprovalSubmitDTO.builder()
|
|
||||||
.eApprovalBusiness(EApprovalBusiness.PICK_ADD)
|
|
||||||
.businessCode(businessCode)
|
|
||||||
.signType(ESignType.getEnumByValue(param.getSignType()))
|
|
||||||
.userIdList(param.getUserIdList())
|
|
||||||
.sendIdList(param.getSendIdList())
|
|
||||||
.remark(param.getRemark())
|
|
||||||
.fileList(param.getFileList())
|
|
||||||
.build(),
|
|
||||||
loginUser,
|
|
||||||
null
|
|
||||||
);
|
|
||||||
if (resultR.isSuccess()) {
|
|
||||||
// 推送业务操作日志
|
|
||||||
rabbitTemplate.convertAndSend(RabbitMqConstants.BUSINESS_LOG_EXCHANGE, RabbitMqConstants.BUSINESS_LOG_KEY, logDTOList);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
throw new BaseException(TransactionUtils.getContent(CommonMsgConstants.OPERATION_FAILED) + ": " + resultR.getMsg());
|
|
||||||
}
|
|
||||||
return TransactionUtils.getContent(CommonMsgConstants.OPERATION_FAILED);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean delPick(AcPickSaveParam param) {
|
|
||||||
// 会员ID
|
|
||||||
Long userId = param.getLoginUser().getUserId();
|
|
||||||
// 所属国家
|
|
||||||
Integer pkCountry = param.getLoginUser().getDataCountry();
|
|
||||||
// 业务编号
|
|
||||||
String businessCode = CommonUtil.createSerialNumber(EOrderPrefix.ACTIVITY_CODE);
|
|
||||||
|
|
||||||
// 操作日志列表
|
|
||||||
List<BusinessLogDTO> logDTOList = new ArrayList<>();
|
|
||||||
|
|
||||||
// 批量保存日志
|
|
||||||
List<AcApprovalLog> approvalLogList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (AcPickSaveDetailParam detailParam : param.getDetailList()) {
|
|
||||||
// 活动审批日志
|
|
||||||
AcApprovalLog acApprovalLog = new AcApprovalLog();
|
|
||||||
acApprovalLog.setApprovalType(EApprovalBusiness.PICK_ADD_DEL.getValue());
|
|
||||||
acApprovalLog.setBusinessCode(businessCode);
|
|
||||||
acApprovalLog.setPkCreator(userId);
|
|
||||||
acApprovalLog.setPkCountry(pkCountry);
|
|
||||||
acApprovalLog.setAfterData(JSONUtil.toJsonStr(detailParam));
|
|
||||||
if (null != detailParam.getPkId()) {
|
|
||||||
acApprovalLog.setPkBusiness(detailParam.getPkId());
|
|
||||||
}
|
|
||||||
approvalLogList.add(acApprovalLog);
|
|
||||||
|
|
||||||
// 操作日志内容
|
|
||||||
StringBuilder content = new StringBuilder("删除会员编号 ").append(detailParam.getMemberCode()).append(" 的 ");
|
|
||||||
|
|
||||||
// 查询提货数量
|
|
||||||
AcPick acPick = this.getById(detailParam.getPkId());
|
|
||||||
EPickType ePickType = EPickType.getEnumByValue(acPick.getPickType());
|
|
||||||
switch (ePickType) {
|
|
||||||
case PICK_PRODUCT:
|
|
||||||
case PRIZE:
|
|
||||||
// 提货产品、抽奖
|
|
||||||
if (null != detailParam.getPkProduct()) {
|
|
||||||
BdProduct product = iBdProductService.getProduct(detailParam.getPkProduct());
|
|
||||||
content.append(ePickType.getLabel()).append(",").append(product.getProductName()).append("(").append(acPick.getSpecsName()).append(");");
|
|
||||||
} else {
|
|
||||||
content.append(ePickType.getLabel()).append(",").append(";");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CONSUMPTION_GIFT:
|
|
||||||
case DIRECT_PUSH_GIFT:
|
|
||||||
case LOTTERY_DRAW:
|
|
||||||
// 消费赠送、直推赠送、抽奖
|
|
||||||
content.append(ePickType.getLabel());
|
|
||||||
List<AcGiftConfigExt> acGiftConfigList = iAcGiftConfigService.queryListByRuleIdList(acPick.getPkDataId(), acPick.getPkCountry());
|
|
||||||
if (CollectionUtil.isNotEmpty(acGiftConfigList)) {
|
|
||||||
content.append(",");
|
|
||||||
for (AcGiftConfigExt acGiftConfigExt : acGiftConfigList) {
|
|
||||||
content.append(acGiftConfigExt.getProductName()).append("(").append(acGiftConfigExt.getSpecsName()).append(") ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
content.append(";");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
|
|
||||||
// 被操作会员
|
|
||||||
CuMember cuMember = iMemberServiceApi.queryMember(detailParam.getMemberCode()).getData();
|
|
||||||
// 封装业务操作日志
|
|
||||||
logDTOList.add(BusinessLogDTO.builder()
|
|
||||||
.businessType(EApprovalBusiness.PICK_ADD_DEL.getValue())
|
|
||||||
.businessCode(businessCode)
|
|
||||||
.content(content.toString())
|
|
||||||
.pkMember(cuMember.getPkId())
|
|
||||||
.pkCreator(userId)
|
|
||||||
.pkCountry(pkCountry)
|
|
||||||
.freeSignFlag(false)
|
|
||||||
.build());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iAcApprovalLogService.saveBatch(approvalLogList)) {
|
|
||||||
// 保存审批日志成功,提交签呈
|
|
||||||
// 提交签呈处理
|
|
||||||
R<String> resultR = iApprovalServiceApi.submitOrder(
|
|
||||||
ApprovalSubmitDTO.builder()
|
|
||||||
.eApprovalBusiness(EApprovalBusiness.PICK_ADD_DEL)
|
|
||||||
.businessCode(businessCode)
|
|
||||||
.signType(ESignType.getEnumByValue(param.getSignType()))
|
|
||||||
.userIdList(param.getUserIdList())
|
|
||||||
.sendIdList(param.getSendIdList())
|
|
||||||
.remark(param.getRemark())
|
|
||||||
.fileList(param.getFileList())
|
|
||||||
.build(),
|
|
||||||
param.getLoginUser(),
|
|
||||||
null
|
|
||||||
);
|
|
||||||
if (resultR.isSuccess()) {
|
|
||||||
// 推送业务操作日志
|
|
||||||
rabbitTemplate.convertAndSend(RabbitMqConstants.BUSINESS_LOG_EXCHANGE, RabbitMqConstants.BUSINESS_LOG_KEY, logDTOList);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
throw new BaseException(TransactionUtils.getContent(CommonMsgConstants.OPERATION_FAILED) + ": " + resultR.getMsg());
|
|
||||||
}
|
|
||||||
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> createList = new ArrayList<>();
|
||||||
// 修改提货列表
|
// 修改提货列表
|
||||||
List<AcPick> updateList = new ArrayList<>();
|
List<AcPick> updateList = new ArrayList<>();
|
||||||
|
|
||||||
for (AcApprovalLog acApprovalLog : approvalLogList) {
|
for (AcPickSaveDetailParam detailParam : param.getDetailList()) {
|
||||||
// 存在业务ID,则为修改
|
// 会员信息
|
||||||
AcPickSaveDetailParam detailParam = JSONUtil.toBean(acApprovalLog.getAfterData(), AcPickSaveDetailParam.class);
|
CuMember cuMember = iMemberServiceApi.queryMember(detailParam.getMemberCode()).getData();
|
||||||
// 当前会员
|
|
||||||
CuMember cuMember = iMemberServiceApi.getMember(detailParam.getMemberCode()).getData();
|
|
||||||
// 提货ID
|
// 提货ID
|
||||||
Long pickId = null;
|
Long pickId = null;
|
||||||
|
// 提货类型
|
||||||
|
Integer pickType = null != detailParam.getPickType() ? detailParam.getPickType() : EPickType.COMPANY_PRODUCT.getValue();
|
||||||
|
|
||||||
if (null == detailParam.getPkId()) {
|
if (null == detailParam.getPkId()) {
|
||||||
LambdaQueryWrapper<AcPick> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<AcPick> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(AcPick::getPickType, EPickType.PICK_PRODUCT.getValue());
|
queryWrapper.eq(AcPick::getPickType, pickType);
|
||||||
queryWrapper.eq(AcPick::getPkBaseConfig, 0);
|
queryWrapper.eq(AcPick::getPkBaseConfig, 0);
|
||||||
queryWrapper.eq(AcPick::getPkDataId, detailParam.getPkProduct());
|
queryWrapper.eq(AcPick::getPkDataId, detailParam.getPkProduct());
|
||||||
queryWrapper.eq(AcPick::getSpecsNameId, detailParam.getSpecsNameId());
|
queryWrapper.eq(AcPick::getSpecsNameId, detailParam.getSpecsNameId());
|
||||||
|
|
@ -373,7 +163,7 @@ public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> impleme
|
||||||
if (null == pickId) {
|
if (null == pickId) {
|
||||||
// 新增提货数据
|
// 新增提货数据
|
||||||
acPick.setPkMember(cuMember.getPkId());
|
acPick.setPkMember(cuMember.getPkId());
|
||||||
acPick.setPickType(EPickType.PICK_PRODUCT.getValue());
|
acPick.setPickType(pickType);
|
||||||
acPick.setPkDataId(detailParam.getPkProduct().longValue());
|
acPick.setPkDataId(detailParam.getPkProduct().longValue());
|
||||||
acPick.setSpecsName(detailParam.getSpecsName());
|
acPick.setSpecsName(detailParam.getSpecsName());
|
||||||
acPick.setSpecsNameId(detailParam.getSpecsNameId());
|
acPick.setSpecsNameId(detailParam.getSpecsNameId());
|
||||||
|
|
@ -397,82 +187,96 @@ public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> impleme
|
||||||
acPick.setModifiedTime(new Date());
|
acPick.setModifiedTime(new Date());
|
||||||
updateList.add(acPick);
|
updateList.add(acPick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 产品信息
|
||||||
|
BdProduct bdProduct = productMap.get(detailParam.getPkProduct());
|
||||||
|
// 操作日志内容
|
||||||
|
StringBuilder content = new StringBuilder();
|
||||||
|
content.append("会员编号 ").append(detailParam.getMemberCode());
|
||||||
|
content.append(" 充值提货卡 ").append(bdProduct.getProductName()).append("(").append(detailParam.getSpecsName()).append(")");
|
||||||
|
content.append(",提货基数 ").append(detailParam.getBaseQuantity());
|
||||||
|
content.append(",充值数量 ").append(detailParam.getQuantity());
|
||||||
|
if (null != detailParam.getReceiveTime()) {
|
||||||
|
content.append(",截止日期 ").append(DateUtils.parseDateToFormat(DateUtils.YYYY_MM_DD_HH_MM_SS, detailParam.getReceiveTime()));
|
||||||
|
}
|
||||||
|
if (EYesNo.YES.getIntValue() == detailParam.getIsFreeMail()) {
|
||||||
|
content.append(",包邮;");
|
||||||
|
} else {
|
||||||
|
content.append(",不包邮;");
|
||||||
|
}
|
||||||
|
// 封装业务操作日志
|
||||||
|
logDTOList.add(BusinessLogDTO.builder()
|
||||||
|
.businessType(EApprovalBusiness.PICK_ADD.getValue())
|
||||||
|
.businessCode(businessCode)
|
||||||
|
.content(content.toString())
|
||||||
|
.pkMember(cuMember.getPkId())
|
||||||
|
.pkCreator(userId)
|
||||||
|
.pkCountry(pkCountry)
|
||||||
|
.freeSignFlag(false)
|
||||||
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iAcApprovalLogService.updateApprovalLog(resultDTO.getEApprovalBusiness(), resultDTO.getBusinessCode(), pkCountry, userId, EApproveRechargeStatus.AGREE, resultDTO.getApproveRemark())) {
|
// 提货操作日志
|
||||||
// 更新修改记录
|
List<AcPickLog> logList = new ArrayList<>();
|
||||||
|
|
||||||
// 提货操作日志
|
// 插入提货数据
|
||||||
List<AcPickLog> logList = new ArrayList<>();
|
if (CollectionUtil.isNotEmpty(createList)) {
|
||||||
|
for (AcPick acPick : createList) {
|
||||||
|
this.baseMapper.insert(acPick);
|
||||||
|
|
||||||
// 插入提货数据
|
AcPickLog acPickLog = new AcPickLog();
|
||||||
if (CollectionUtil.isNotEmpty(createList)) {
|
acPickLog.setPkPick(acPick.getPkId());
|
||||||
for (AcPick acPick : createList) {
|
acPickLog.setQuantity(acPick.getUsableQuantity());
|
||||||
this.baseMapper.insert(acPick);
|
acPickLog.setPkUser(userId);
|
||||||
|
acPickLog.setPkCountry(pkCountry);
|
||||||
AcPickLog acPickLog = new AcPickLog();
|
logList.add(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);
|
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);
|
||||||
|
|
||||||
|
// 推送业务操作日志
|
||||||
|
rabbitTemplate.convertAndSend(RabbitMqConstants.BUSINESS_LOG_EXCHANGE, RabbitMqConstants.BUSINESS_LOG_KEY, logDTOList);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
@Override
|
@Override
|
||||||
public String delpickApprovalAgree(ApprovalBusinessResultDTO resultDTO) {
|
public boolean delPick(AcPickSaveParam param) {
|
||||||
// 用户ID
|
// 会员ID
|
||||||
Long userId = resultDTO.getLoginUser().getUserId();
|
Long userId = param.getLoginUser().getUserId();
|
||||||
// 所属国家
|
// 所属国家
|
||||||
Integer pkCountry = resultDTO.getLoginUser().getDataCountry();
|
Integer pkCountry = param.getLoginUser().getDataCountry();
|
||||||
|
// 业务编号
|
||||||
|
String businessCode = CommonUtil.createSerialNumber(EOrderPrefix.ACTIVITY_CODE);
|
||||||
|
|
||||||
List<AcApprovalLog> approvalLogList = iAcApprovalLogService.queryApprovalLogList(resultDTO.getEApprovalBusiness(), resultDTO.getBusinessCode(), pkCountry);
|
// 操作日志列表
|
||||||
// 一批审批可能有多个
|
List<BusinessLogDTO> logDTOList = new ArrayList<>();
|
||||||
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<>();
|
List<AcPick> updateList = new ArrayList<>();
|
||||||
|
|
||||||
for (AcApprovalLog acApprovalLog : approvalLogList) {
|
for (AcPickSaveDetailParam detailParam : param.getDetailList()) {
|
||||||
// 存在业务ID,则为修改
|
// 被操作会员
|
||||||
AcPickSaveDetailParam detailParam = JSONUtil.toBean(acApprovalLog.getAfterData(), AcPickSaveDetailParam.class);
|
CuMember cuMember = iMemberServiceApi.queryMember(detailParam.getMemberCode()).getData();
|
||||||
// 当前会员
|
|
||||||
CuMember cuMember = iMemberServiceApi.getMember(detailParam.getMemberCode()).getData();
|
|
||||||
// 提货ID
|
// 提货ID
|
||||||
Long pickId = null;
|
Long pickId = null;
|
||||||
if (null == detailParam.getPkId()) {
|
if (null == detailParam.getPkId()) {
|
||||||
LambdaQueryWrapper<AcPick> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<AcPick> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(AcPick::getPickType, EPickType.PICK_PRODUCT.getValue());
|
queryWrapper.eq(AcPick::getPickType, EPickType.COMPANY_PRODUCT.getValue());
|
||||||
queryWrapper.eq(AcPick::getPkBaseConfig, 0);
|
queryWrapper.eq(AcPick::getPkBaseConfig, 0);
|
||||||
queryWrapper.eq(AcPick::getPkDataId, detailParam.getPkProduct());
|
queryWrapper.eq(AcPick::getPkDataId, detailParam.getPkProduct());
|
||||||
queryWrapper.eq(AcPick::getPkMember, cuMember.getPkId());
|
queryWrapper.eq(AcPick::getPkMember, cuMember.getPkId());
|
||||||
|
|
@ -493,50 +297,65 @@ public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> impleme
|
||||||
updateList.add(acPick);
|
updateList.add(acPick);
|
||||||
} else {
|
} else {
|
||||||
log.error("提货充值同意处理失败: 更新数据失败");
|
log.error("提货充值同意处理失败: 更新数据失败");
|
||||||
return TransactionUtils.getContent(DocumentMsgConstants.DOCUMENT_ORDER_ERROR);
|
throw new ServiceException(TransactionUtils.getContent(DocumentMsgConstants.DOCUMENT_ORDER_ERROR));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 操作日志内容
|
||||||
|
StringBuilder content = new StringBuilder("删除会员编号 ").append(detailParam.getMemberCode()).append(" 的 ");
|
||||||
|
|
||||||
|
// 查询提货数量
|
||||||
|
AcPick delAcPick = this.getById(detailParam.getPkId());
|
||||||
|
EPickType ePickType = EPickType.getEnumByValue(delAcPick.getPickType());
|
||||||
|
switch (ePickType) {
|
||||||
|
case PICK_PRODUCT:
|
||||||
|
case PRIZE:
|
||||||
|
case COMPANY_PRODUCT:
|
||||||
|
// 提货产品、抽奖、分公司产品
|
||||||
|
if (null != detailParam.getPkProduct()) {
|
||||||
|
BdProduct product = iBdProductService.getProduct(detailParam.getPkProduct());
|
||||||
|
content.append(ePickType.getLabel()).append(",").append(product.getProductName()).append("(").append(acPick.getSpecsName()).append(");");
|
||||||
|
} else {
|
||||||
|
content.append(ePickType.getLabel()).append(",").append(";");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CONSUMPTION_GIFT:
|
||||||
|
case DIRECT_PUSH_GIFT:
|
||||||
|
case LOTTERY_DRAW:
|
||||||
|
// 消费赠送、直推赠送、抽奖
|
||||||
|
content.append(ePickType.getLabel());
|
||||||
|
List<AcGiftConfigExt> acGiftConfigList = iAcGiftConfigService.queryListByRuleIdList(acPick.getPkDataId(), acPick.getPkCountry());
|
||||||
|
if (CollectionUtil.isNotEmpty(acGiftConfigList)) {
|
||||||
|
content.append(",");
|
||||||
|
for (AcGiftConfigExt acGiftConfigExt : acGiftConfigList) {
|
||||||
|
content.append(acGiftConfigExt.getProductName()).append("(").append(acGiftConfigExt.getSpecsName()).append(") ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
content.append(";");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
// 封装业务操作日志
|
||||||
|
logDTOList.add(BusinessLogDTO.builder()
|
||||||
|
.businessType(EApprovalBusiness.PICK_ADD_DEL.getValue())
|
||||||
|
.businessCode(businessCode)
|
||||||
|
.content(content.toString())
|
||||||
|
.pkMember(cuMember.getPkId())
|
||||||
|
.pkCreator(userId)
|
||||||
|
.pkCountry(pkCountry)
|
||||||
|
.freeSignFlag(false)
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新提货数据
|
||||||
|
if (CollectionUtil.isNotEmpty(updateList)) {
|
||||||
|
for (AcPick acPick : updateList) {
|
||||||
|
this.baseMapper.removePickByPkId(acPick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iAcApprovalLogService.updateApprovalLog(resultDTO.getEApprovalBusiness(), resultDTO.getBusinessCode(), pkCountry, userId, EApproveRechargeStatus.AGREE, resultDTO.getApproveRemark())) {
|
// 推送业务操作日志
|
||||||
// 更新修改记录
|
rabbitTemplate.convertAndSend(RabbitMqConstants.BUSINESS_LOG_EXCHANGE, RabbitMqConstants.BUSINESS_LOG_KEY, logDTOList);
|
||||||
|
return true;
|
||||||
// 更新提货数据
|
|
||||||
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
|
@Override
|
||||||
|
|
@ -593,7 +412,6 @@ public class AcPickServiceImpl extends ServiceImpl<AcPickMapper, AcPick> impleme
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
return iPostageBusinessService.queryPostage(acPick.getPkPostage(), productList, recProvince, recCity);
|
return iPostageBusinessService.queryPostage(acPick.getPkPostage(), productList, recProvince, recCity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -633,7 +633,6 @@ public class ApiRetailOrderController {
|
||||||
.channel(shoppingCartRedis.getSource())
|
.channel(shoppingCartRedis.getSource())
|
||||||
.waresCode(shoppingCartRedis.getWaresCode())
|
.waresCode(shoppingCartRedis.getWaresCode())
|
||||||
.quantity(shoppingCartRedis.getNumber())
|
.quantity(shoppingCartRedis.getNumber())
|
||||||
.pkMakerSpace(shoppingCartRedis.getPkMakerSpace())
|
|
||||||
.build();
|
.build();
|
||||||
List<WaresItemsParam> waresItemsParamList = new ArrayList<>(shoppingCartRedis.getProductGroup().size());
|
List<WaresItemsParam> waresItemsParamList = new ArrayList<>(shoppingCartRedis.getProductGroup().size());
|
||||||
for (ProductGroup productGroup : shoppingCartRedis.getProductGroup()) {
|
for (ProductGroup productGroup : shoppingCartRedis.getProductGroup()) {
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
|
|
||||||
if (boxWaresList.contains(waresDetailExt.getWaresCode())) {
|
if (boxWaresList.contains(waresDetailExt.getWaresCode())) {
|
||||||
// 商品是盒数商品,需要累计数量
|
// 商品是盒数商品,需要累计数量
|
||||||
boxNum += orderItems.getWaresQuantity();
|
boxNum += waresDetailExt.getBoxNum() * orderItems.getWaresQuantity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -601,7 +601,6 @@ public abstract class ParentOrderController extends BaseController {
|
||||||
.channel(shoppingCartRedis.getSource())
|
.channel(shoppingCartRedis.getSource())
|
||||||
.waresCode(shoppingCartRedis.getWaresCode())
|
.waresCode(shoppingCartRedis.getWaresCode())
|
||||||
.quantity(shoppingCartRedis.getNumber())
|
.quantity(shoppingCartRedis.getNumber())
|
||||||
.pkMakerSpace(shoppingCartRedis.getPkMakerSpace())
|
|
||||||
.build();
|
.build();
|
||||||
List<WaresItemsParam> waresItemsParamList = new ArrayList<>(shoppingCartRedis.getProductGroup().size());
|
List<WaresItemsParam> waresItemsParamList = new ArrayList<>(shoppingCartRedis.getProductGroup().size());
|
||||||
for (ProductGroup productGroup : shoppingCartRedis.getProductGroup()) {
|
for (ProductGroup productGroup : shoppingCartRedis.getProductGroup()) {
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,9 @@ public class OrderItemsParam implements Serializable {
|
||||||
private Integer quantity;
|
private Integer quantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创客空间id
|
* 商品盒数
|
||||||
*/
|
*/
|
||||||
private Long pkMakerSpace;
|
private Integer boxNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品明细
|
* 商品明细
|
||||||
|
|
|
||||||
|
|
@ -2157,11 +2157,13 @@ public class SaOrderServiceImpl extends ServiceImpl<SaOrderMapper, SaOrder> impl
|
||||||
|
|
||||||
// 当前产品盒数
|
// 当前产品盒数
|
||||||
int boxNum = 0;
|
int boxNum = 0;
|
||||||
|
// 处理商品盒数
|
||||||
|
this.handleWaresBoxNum(specialArea, orderItemsParams);
|
||||||
// 判断订单明细中指定产品数量,校验等级
|
// 判断订单明细中指定产品数量,校验等级
|
||||||
for (OrderItemsParam orderItemsParam : orderItemsParams) {
|
for (OrderItemsParam orderItemsParam : orderItemsParams) {
|
||||||
if (boxWaresList.contains(orderItemsParam.getWaresCode())) {
|
if (boxWaresList.contains(orderItemsParam.getWaresCode())) {
|
||||||
// 存在指定商品,需要累计盒数
|
// 存在指定商品,需要累计盒数
|
||||||
boxNum += orderItemsParam.getQuantity();
|
boxNum += orderItemsParam.getBoxNum() * orderItemsParam.getQuantity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2297,4 +2299,29 @@ public class SaOrderServiceImpl extends ServiceImpl<SaOrderMapper, SaOrder> impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理商品盒数
|
||||||
|
*
|
||||||
|
* @param orderItemsParams
|
||||||
|
*/
|
||||||
|
private void handleWaresBoxNum(Integer specialArea, List<OrderItemsParam> orderItemsParams) {
|
||||||
|
if (CollectionUtil.isNotEmpty(orderItemsParams)) {
|
||||||
|
List<String> waresCodeList = orderItemsParams.stream().map(OrderItemsParam::getWaresCode).collect(Collectors.toList());
|
||||||
|
List<BdWares> waresList = iBdWaresService.list(Wrappers.<BdWares>lambdaQuery()
|
||||||
|
.eq(BdWares::getSpecialArea, specialArea)
|
||||||
|
.in(BdWares::getWaresCode, waresCodeList)
|
||||||
|
);
|
||||||
|
if (CollectionUtil.isNotEmpty(waresList)) {
|
||||||
|
for (OrderItemsParam orderItemsParam : orderItemsParams) {
|
||||||
|
for (BdWares bdWares : waresList) {
|
||||||
|
if (orderItemsParam.getWaresCode().equals(bdWares.getWaresCode())) {
|
||||||
|
orderItemsParam.setBoxNum(bdWares.getBoxNum());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,6 @@ public class ApiShoppingCartController extends BaseController {
|
||||||
String jsonString = innerShopMap.get(innerKey.toString());
|
String jsonString = innerShopMap.get(innerKey.toString());
|
||||||
ShoppingCartRedis shoppingCartRedis = JSONUtil.toBean(jsonString, ShoppingCartRedis.class);
|
ShoppingCartRedis shoppingCartRedis = JSONUtil.toBean(jsonString, ShoppingCartRedis.class);
|
||||||
shoppingCartRedis.setNumber(shoppingCartRedis.getNumber() + scr.getNumber());
|
shoppingCartRedis.setNumber(shoppingCartRedis.getNumber() + scr.getNumber());
|
||||||
shoppingCartRedis.setPkMakerSpace(scr.getPkMakerSpace());
|
|
||||||
|
|
||||||
innerShopMap.put(innerKey.toString(), JSONUtil.toJsonStr(shoppingCartRedis));
|
innerShopMap.put(innerKey.toString(), JSONUtil.toJsonStr(shoppingCartRedis));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,6 @@ public class ShoppingCartRedis implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer number;
|
private Integer number;
|
||||||
|
|
||||||
/**
|
|
||||||
* 创客空间id
|
|
||||||
*/
|
|
||||||
private Long pkMakerSpace;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品 sku 组合
|
* 产品 sku 组合
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,6 @@ import com.hzs.sale.wares.param.WaresDetailParams;
|
||||||
import com.hzs.sale.wares.param.*;
|
import com.hzs.sale.wares.param.*;
|
||||||
import com.hzs.sale.wares.service.*;
|
import com.hzs.sale.wares.service.*;
|
||||||
import com.hzs.sale.wares.vo.*;
|
import com.hzs.sale.wares.vo.*;
|
||||||
import com.hzs.system.base.ICurrencyServiceApi;
|
|
||||||
import com.hzs.system.base.dto.CurrencyDTO;
|
|
||||||
import com.hzs.system.config.IRangeServiceApi;
|
import com.hzs.system.config.IRangeServiceApi;
|
||||||
import com.hzs.system.sys.dto.LoginUser;
|
import com.hzs.system.sys.dto.LoginUser;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -57,8 +55,6 @@ import java.util.stream.Collectors;
|
||||||
@RequestMapping("/manage/wares")
|
@RequestMapping("/manage/wares")
|
||||||
public class BdWaresController extends BaseController {
|
public class BdWaresController extends BaseController {
|
||||||
|
|
||||||
@DubboReference
|
|
||||||
ICurrencyServiceApi iCurrencyServiceApi;
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IRangeServiceApi iRangeServiceApi;
|
IRangeServiceApi iRangeServiceApi;
|
||||||
|
|
||||||
|
|
@ -116,8 +112,6 @@ public class BdWaresController extends BaseController {
|
||||||
startPage();
|
startPage();
|
||||||
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
|
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
|
||||||
if (CollectionUtil.isNotEmpty(resultList)) {
|
if (CollectionUtil.isNotEmpty(resultList)) {
|
||||||
R<CurrencyDTO> currencyDto = iCurrencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
|
|
||||||
|
|
||||||
resultList.parallelStream().forEach(waresVo -> {
|
resultList.parallelStream().forEach(waresVo -> {
|
||||||
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
||||||
if (waresAuthorityVo != null) {
|
if (waresAuthorityVo != null) {
|
||||||
|
|
@ -131,10 +125,6 @@ public class BdWaresController extends BaseController {
|
||||||
if (waresVo.getIsMakerGift() != null) {
|
if (waresVo.getIsMakerGift() != null) {
|
||||||
waresVo.setIsMakerGiftVal(EWaresType.getEnumByValue(waresVo.getIsMakerGift()).getLabel());
|
waresVo.setIsMakerGiftVal(EWaresType.getEnumByValue(waresVo.getIsMakerGift()).getLabel());
|
||||||
}
|
}
|
||||||
if (null != waresVo.getMakerIncome()) {
|
|
||||||
// 处理发起人收益
|
|
||||||
waresVo.setMakerIncome(waresVo.getMakerIncome().multiply(currencyDto.getData().getInExchangeRate()));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return getDataTable(resultList);
|
return getDataTable(resultList);
|
||||||
|
|
@ -151,7 +141,6 @@ public class BdWaresController extends BaseController {
|
||||||
|
|
||||||
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
|
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
|
||||||
if (CollectionUtil.isNotEmpty(resultList)) {
|
if (CollectionUtil.isNotEmpty(resultList)) {
|
||||||
R<CurrencyDTO> currencyDto = iCurrencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
|
|
||||||
// 获取需要翻译的枚举翻译
|
// 获取需要翻译的枚举翻译
|
||||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(ESpecialArea.values(), EYesNo.values(), ESupplyWay.values(), EPresaleStatus.values());
|
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(ESpecialArea.values(), EYesNo.values(), ESupplyWay.values(), EPresaleStatus.values());
|
||||||
|
|
||||||
|
|
@ -188,10 +177,6 @@ public class BdWaresController extends BaseController {
|
||||||
waresVo.setIsMakerGiftVal(EWaresType.getEnumByValue(waresVo.getIsMakerGift()).getLabel());
|
waresVo.setIsMakerGiftVal(EWaresType.getEnumByValue(waresVo.getIsMakerGift()).getLabel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (null != waresVo.getMakerIncome()) {
|
|
||||||
// 处理发起人收益
|
|
||||||
waresVo.setMakerIncome(waresVo.getMakerIncome().multiply(currencyDto.getData().getInExchangeRate()));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ExcelUtil<WaresVo> util = new ExcelUtil<>(WaresVo.class);
|
ExcelUtil<WaresVo> util = new ExcelUtil<>(WaresVo.class);
|
||||||
|
|
@ -320,7 +305,6 @@ public class BdWaresController extends BaseController {
|
||||||
if (!isPutOn) {
|
if (!isPutOn) {
|
||||||
return AjaxResult.error("产品规格至少有一个上架");
|
return AjaxResult.error("产品规格至少有一个上架");
|
||||||
}
|
}
|
||||||
// wares.setSort(0);
|
|
||||||
iBdWaresService.saveWares(wares, userTokenService.getLoginUser());
|
iBdWaresService.saveWares(wares, userTokenService.getLoginUser());
|
||||||
return AjaxResult.success(wares.getWaresCode());
|
return AjaxResult.success(wares.getWaresCode());
|
||||||
}
|
}
|
||||||
|
|
@ -450,8 +434,6 @@ public class BdWaresController extends BaseController {
|
||||||
return AjaxResult.error("规格图片必传");
|
return AjaxResult.error("规格图片必传");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// waresParams.setSort(0);
|
|
||||||
iBdWaresService.updateWares(waresParams, userTokenService.getLoginUser());
|
iBdWaresService.updateWares(waresParams, userTokenService.getLoginUser());
|
||||||
return AjaxResult.success(waresParams.getWaresCode());
|
return AjaxResult.success(waresParams.getWaresCode());
|
||||||
}
|
}
|
||||||
|
|
@ -535,10 +517,7 @@ public class BdWaresController extends BaseController {
|
||||||
waresParams.setSortStatus(wares.getSortStatus());
|
waresParams.setSortStatus(wares.getSortStatus());
|
||||||
waresParams.setSystemType(waresExtend.getSystemType());
|
waresParams.setSystemType(waresExtend.getSystemType());
|
||||||
waresParams.setAreaIncome(wares.getAreaIncome());
|
waresParams.setAreaIncome(wares.getAreaIncome());
|
||||||
if (waresExtend.getMakerIncome() != null) {
|
waresParams.setBoxNum(wares.getBoxNum());
|
||||||
R<CurrencyDTO> currencyDto = iCurrencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
|
|
||||||
waresParams.setMakerIncome(waresExtend.getMakerIncome().multiply(currencyDto.getData().getInExchangeRate()));
|
|
||||||
}
|
|
||||||
|
|
||||||
BdAreaClassify parentAreaClassify = areaClassifyService.getAreaClassify(wares.getPkAreaClassify());
|
BdAreaClassify parentAreaClassify = areaClassifyService.getAreaClassify(wares.getPkAreaClassify());
|
||||||
if (parentAreaClassify != null) {
|
if (parentAreaClassify != null) {
|
||||||
|
|
|
||||||
|
|
@ -394,11 +394,6 @@ public class WaresParams implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer sortStatus;
|
private Integer sortStatus;
|
||||||
|
|
||||||
/**
|
|
||||||
* 发起人收益(目前复购使用)
|
|
||||||
*/
|
|
||||||
private BigDecimal makerIncome;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统类型(2=新零售,3=美业)
|
* 系统类型(2=新零售,3=美业)
|
||||||
*/
|
*/
|
||||||
|
|
@ -414,4 +409,9 @@ public class WaresParams implements Serializable {
|
||||||
*/
|
*/
|
||||||
private BigDecimal areaIncome;
|
private BigDecimal areaIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品上传盒数
|
||||||
|
*/
|
||||||
|
private Integer boxNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ public class BdWaresDetailServiceImpl extends ServiceImpl<BdWaresDetailMapper, B
|
||||||
.waresCode(orderItemsParam.getWaresCode())
|
.waresCode(orderItemsParam.getWaresCode())
|
||||||
.pkWaresSpecsSku(waresItemsParam.getPkWaresSpecsSku())
|
.pkWaresSpecsSku(waresItemsParam.getPkWaresSpecsSku())
|
||||||
.waresQuantity(orderItemsParam.getQuantity())
|
.waresQuantity(orderItemsParam.getQuantity())
|
||||||
.pkMakerSpace(orderItemsParam.getPkMakerSpace())
|
|
||||||
.price(BigDecimal.ZERO)
|
.price(BigDecimal.ZERO)
|
||||||
.achieve(BigDecimal.ZERO)
|
.achieve(BigDecimal.ZERO)
|
||||||
.build();
|
.build();
|
||||||
|
|
|
||||||
|
|
@ -111,9 +111,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
// 设置 wares 对象的值
|
// 设置 wares 对象的值
|
||||||
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
|
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
|
||||||
wares.setPkId(waresParams.getWaresId());
|
wares.setPkId(waresParams.getWaresId());
|
||||||
R<Integer> transaction = transactionServiceApi.createTransaction(user.getDataCountry(), ETransactionKey.SPEC, waresParams.getWaresName(), EYesNo.NO, EYesNo.NO);
|
|
||||||
wares.setWaresCode(waresParams.getWaresCode());
|
wares.setWaresCode(waresParams.getWaresCode());
|
||||||
wares.setPkTransaction(transaction.getData());
|
|
||||||
wares.setPkCreator(user.getUserId());
|
wares.setPkCreator(user.getUserId());
|
||||||
wares.setPkCountry(user.getDataCountry());
|
wares.setPkCountry(user.getDataCountry());
|
||||||
wares.setSystemType(user.getSystemType());
|
wares.setSystemType(user.getSystemType());
|
||||||
|
|
@ -127,14 +125,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
this.save(wares);
|
this.save(wares);
|
||||||
// 商品拓展表
|
// 商品拓展表
|
||||||
BdWaresExtend waresExtend = BeanUtil.copyProperties(waresParams, BdWaresExtend.class);
|
BdWaresExtend waresExtend = BeanUtil.copyProperties(waresParams, BdWaresExtend.class);
|
||||||
// 存入要转化美金
|
|
||||||
if (!waresParams.getSpecialArea().equals(ESpecialArea.REPURCHASE_AREA.getValue())) {
|
|
||||||
waresParams.setMakerIncome(BigDecimal.ZERO);
|
|
||||||
}
|
|
||||||
if (null != waresParams.getMakerIncome()) {
|
|
||||||
R<CurrencyDTO> currencyDto = currencyServiceApi.getCurrency(user.getDataCountry());
|
|
||||||
waresExtend.setMakerIncome(waresParams.getMakerIncome().divide(currencyDto.getData().getInExchangeRate(), 6, BigDecimal.ROUND_HALF_UP));
|
|
||||||
}
|
|
||||||
// 处理系统类型
|
// 处理系统类型
|
||||||
waresExtend.setSystemType(user.getSystemType());
|
waresExtend.setSystemType(user.getSystemType());
|
||||||
waresExtend.setPkWares(wares.getPkId());
|
waresExtend.setPkWares(wares.getPkId());
|
||||||
|
|
@ -539,8 +529,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
public void updateWares(WaresParams waresParams, LoginUser user) {
|
public void updateWares(WaresParams waresParams, LoginUser user) {
|
||||||
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
|
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
|
||||||
wares.setPkId(waresParams.getWaresId());
|
wares.setPkId(waresParams.getWaresId());
|
||||||
R<Integer> transaction = transactionServiceApi.createTransaction(user.getDataCountry(), ETransactionKey.SPEC, waresParams.getWaresName(), EYesNo.NO, EYesNo.NO);
|
|
||||||
wares.setPkTransaction(transaction.getData());
|
|
||||||
if (waresParams.getIsPutOn().equals(EYesNo.YES.getIntValue())) {
|
if (waresParams.getIsPutOn().equals(EYesNo.YES.getIntValue())) {
|
||||||
wares.setListingTime(DateUtils.currentDateTime());
|
wares.setListingTime(DateUtils.currentDateTime());
|
||||||
}
|
}
|
||||||
|
|
@ -554,14 +542,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
|
|
||||||
// 商品拓展表
|
// 商品拓展表
|
||||||
BdWaresExtend waresExtend = BeanUtil.copyProperties(waresParams, BdWaresExtend.class);
|
BdWaresExtend waresExtend = BeanUtil.copyProperties(waresParams, BdWaresExtend.class);
|
||||||
// 存入要转化美金
|
|
||||||
if (!waresParams.getSpecialArea().equals(ESpecialArea.REPURCHASE_AREA.getValue())) {
|
|
||||||
waresParams.setMakerIncome(BigDecimal.ZERO);
|
|
||||||
}
|
|
||||||
if (null != waresParams.getMakerIncome()) {
|
|
||||||
R<CurrencyDTO> currencyDto = currencyServiceApi.getCurrency(user.getDataCountry());
|
|
||||||
waresExtend.setMakerIncome(waresParams.getMakerIncome().divide(currencyDto.getData().getInExchangeRate(), 6, BigDecimal.ROUND_HALF_UP));
|
|
||||||
}
|
|
||||||
// 处理系统类型
|
// 处理系统类型
|
||||||
waresExtend.setSystemType(user.getSystemType());
|
waresExtend.setSystemType(user.getSystemType());
|
||||||
waresExtend.setPkWares(wares.getPkId());
|
waresExtend.setPkWares(wares.getPkId());
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,6 @@ import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description:
|
|
||||||
* @Author: yuhui
|
|
||||||
* @Time: 2022/11/9 11:02
|
|
||||||
* @Classname: WaresVo
|
|
||||||
* @PackageName: com.hzs.sale.wares.vo
|
|
||||||
*/
|
|
||||||
@Data
|
@Data
|
||||||
public class WaresVo {
|
public class WaresVo {
|
||||||
|
|
||||||
|
|
@ -56,23 +49,15 @@ public class WaresVo {
|
||||||
* 商品价格
|
* 商品价格
|
||||||
*/
|
*/
|
||||||
@Excel(name = "商品价格")
|
@Excel(name = "商品价格")
|
||||||
@BigDecimalFormat("#0.0000")
|
@BigDecimalFormat("#0.00")
|
||||||
private BigDecimal waresPrice;
|
private BigDecimal waresPrice;
|
||||||
/**
|
/**
|
||||||
* 商品业绩
|
* 商品业绩
|
||||||
*/
|
*/
|
||||||
@Excel(name = "商品业绩")
|
@Excel(name = "商品业绩")
|
||||||
@BigDecimalFormat("#0.0000")
|
@BigDecimalFormat("#0.00")
|
||||||
private BigDecimal waresAchieve;
|
private BigDecimal waresAchieve;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发起人收益(目前复购使用)
|
|
||||||
*/
|
|
||||||
@Excel(name = "发起人收益(¥)", scale = 2)
|
|
||||||
@BigDecimalFormat
|
|
||||||
private BigDecimal makerIncome;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付比例名称
|
* 支付比例名称
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@
|
||||||
cm.member_code,
|
cm.member_code,
|
||||||
cm.member_name,
|
cm.member_name,
|
||||||
case
|
case
|
||||||
when ap.pick_type = 0 then
|
when ap.pick_type in (0, 20) then
|
||||||
(select bp.product_name
|
(select bp.product_name
|
||||||
from bd_product bp
|
from bd_product bp
|
||||||
where bp.pk_id = PK_DATA_ID)
|
where bp.pk_id = PK_DATA_ID)
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,6 @@
|
||||||
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
|
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
|
||||||
<result column="EDIT_FLAG" property="editFlag"/>
|
<result column="EDIT_FLAG" property="editFlag"/>
|
||||||
<result column="WARES_CODE" property="waresCode"/>
|
<result column="WARES_CODE" property="waresCode"/>
|
||||||
<result column="MAKER_INCOME" property="makerIncome"/>
|
|
||||||
<result column="ITEM_PK_STOREHOUSE" property="pkStorehouse"/>
|
<result column="ITEM_PK_STOREHOUSE" property="pkStorehouse"/>
|
||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
@ -125,7 +124,6 @@
|
||||||
<result column="CREATOR_CODE" property="creatorCode"/>
|
<result column="CREATOR_CODE" property="creatorCode"/>
|
||||||
<result column="PK_SETTLE_COUNTRY" property="pkSettleCountry"/>
|
<result column="PK_SETTLE_COUNTRY" property="pkSettleCountry"/>
|
||||||
<result column="PK_CENTER_CODE" property="pkCenterCode"/>
|
<result column="PK_CENTER_CODE" property="pkCenterCode"/>
|
||||||
<result column="PK_STORE_LEVEL" property="pkStoreLevel"/>
|
|
||||||
<result column="IN_EXCHANGE_RATE" property="inExchangeRate"/>
|
<result column="IN_EXCHANGE_RATE" property="inExchangeRate"/>
|
||||||
<result column="PK_CORP" property="pkCorp"/>
|
<result column="PK_CORP" property="pkCorp"/>
|
||||||
<collection property="orderWaresExtList" ofType="com.hzs.common.domain.sale.ext.SaOrderWaresExt">
|
<collection property="orderWaresExtList" ofType="com.hzs.common.domain.sale.ext.SaOrderWaresExt">
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
<result column="PRE_SALE_STATUS" property="preSaleStatus"/>
|
<result column="PRE_SALE_STATUS" property="preSaleStatus"/>
|
||||||
<result column="PK_PRODUCT_BAS" property="pkProductBas"/>
|
<result column="PK_PRODUCT_BAS" property="pkProductBas"/>
|
||||||
<result column="PK_UNIT" property="pkUnit"/>
|
<result column="PK_UNIT" property="pkUnit"/>
|
||||||
|
<result column="BOX_NUM" property="boxNum"/>
|
||||||
<collection property="waresSpecsList" ofType="com.hzs.common.domain.sale.ext.WaresSpecsExt">
|
<collection property="waresSpecsList" ofType="com.hzs.common.domain.sale.ext.WaresSpecsExt">
|
||||||
<result column="PK_SPECS_TYPE" property="pkSpecsType"/>
|
<result column="PK_SPECS_TYPE" property="pkSpecsType"/>
|
||||||
<result column="PK_SPECS" property="pkSpecs"/>
|
<result column="PK_SPECS" property="pkSpecs"/>
|
||||||
|
|
@ -50,7 +51,7 @@
|
||||||
be.pk_special_currency,bw.wares_code, bw.wares_name,
|
be.pk_special_currency,bw.wares_code, bw.wares_name,
|
||||||
bd.is_gift is_gift,
|
bd.is_gift is_gift,
|
||||||
bd.pk_product,bs.price,bs.achieve,bp.pk_supplier,bp.shipping_channel,bp.product_code,
|
bd.pk_product,bs.price,bs.achieve,bp.pk_supplier,bp.shipping_channel,bp.product_code,
|
||||||
bs.ass_achieve,b.specs_name,b.specs_name_id
|
bs.ass_achieve,b.specs_name,b.specs_name_id, bw.box_num
|
||||||
from bd_wares bw
|
from bd_wares bw
|
||||||
inner join bd_wares_extend be
|
inner join bd_wares_extend be
|
||||||
on bw.pk_id = be.pk_wares
|
on bw.pk_id = be.pk_wares
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@
|
||||||
<result column="PK_SPECIAL_CURRENCY" property="pkSpecialCurrency"/>
|
<result column="PK_SPECIAL_CURRENCY" property="pkSpecialCurrency"/>
|
||||||
<result column="SYSTEM_TYPE" property="systemType"/>
|
<result column="SYSTEM_TYPE" property="systemType"/>
|
||||||
<result column="AREA_INCOME" property="areaIncome"/>
|
<result column="AREA_INCOME" property="areaIncome"/>
|
||||||
|
<result column="BOX_NUM" property="boxNum"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="resultMap" type="com.hzs.sale.wares.vo.WaresVo">
|
<resultMap id="resultMap" type="com.hzs.sale.wares.vo.WaresVo">
|
||||||
|
|
@ -81,7 +82,6 @@
|
||||||
<result column="SORT_STATUS" property="sortStatus"/>
|
<result column="SORT_STATUS" property="sortStatus"/>
|
||||||
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
|
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
|
||||||
<result column="TEMP_NAME" property="tempName"/>
|
<result column="TEMP_NAME" property="tempName"/>
|
||||||
<result column="MAKER_INCOME" property="makerIncome"/>
|
|
||||||
<result column="SYSTEM_TYPE" property="systemType"/>
|
<result column="SYSTEM_TYPE" property="systemType"/>
|
||||||
<result column="WARES_STATUS" property="waresStatus"/>
|
<result column="WARES_STATUS" property="waresStatus"/>
|
||||||
<result column="WARES_APPROVER" property="waresApprover"/>
|
<result column="WARES_APPROVER" property="waresApprover"/>
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@ import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BigDecimal自定义序列化处理
|
* BigDecimal自定义序列化处理
|
||||||
*
|
|
||||||
* @author
|
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.FIELD)
|
@Target(ElementType.FIELD)
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,41 @@
|
||||||
package com.hzs.common.core.constant.msg;
|
package com.hzs.common.core.constant.msg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 公用类提示
|
* 公用类提示
|
||||||
* @Author: jiang chao
|
|
||||||
* @Time: 2023/4/11 11:31
|
|
||||||
* @Classname: CommonMsgConstants
|
|
||||||
* @PackageName: com.hzs.common.core.constant.msg
|
|
||||||
*/
|
*/
|
||||||
public class CommonMsgConstants {
|
public class CommonMsgConstants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 前后台数据传入中少了部分数据参数 -- 缺少参数
|
* 前后台数据传入中少了部分数据参数 -- 缺少参数
|
||||||
*/
|
*/
|
||||||
public static final String MISSING_PARAM = "缺少参数";
|
public static final String MISSING_PARAM = "缺少参数";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口数据处理因代码原因未成功 -- 操作失败
|
* 接口数据处理因代码原因未成功 -- 操作失败
|
||||||
*/
|
*/
|
||||||
public static final String OPERATION_FAILED = "操作失败";
|
public static final String OPERATION_FAILED = "操作失败";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 一般用于三方对接,处理失败,用户刷新后可以重新进行操作提示 -- 操作失败,请刷新后重试
|
* 一般用于三方对接,处理失败,用户刷新后可以重新进行操作提示 -- 操作失败,请刷新后重试
|
||||||
*/
|
*/
|
||||||
public static final String OPERATION_FAILED_FLUSH = "操作失败,请刷新后重试";
|
public static final String OPERATION_FAILED_FLUSH = "操作失败,请刷新后重试";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户已转结算国,不能进行处理相关操作 -- 用户已转结算国,不能进行操作
|
* 用户已转结算国,不能进行处理相关操作 -- 用户已转结算国,不能进行操作
|
||||||
*/
|
*/
|
||||||
public static final String SETTLEMENT_COUNTRY_NOT_OPERATE = "用户已转结算国,不能进行操作";
|
public static final String SETTLEMENT_COUNTRY_NOT_OPERATE = "用户已转结算国,不能进行操作";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签呈处理失败 -- 签呈处理失败
|
* 签呈处理失败 -- 签呈处理失败
|
||||||
*/
|
*/
|
||||||
public static final String APPROVAL_ERROR = "签呈处理失败";
|
public static final String APPROVAL_ERROR = "签呈处理失败";
|
||||||
/**
|
/**
|
||||||
* 签呈审批时,签呈数据不存在或者被删除 -- 签呈处理失败:签呈不存在
|
* 签呈审批时,签呈数据不存在或者被删除 -- 签呈处理失败:签呈不存在
|
||||||
*/
|
*/
|
||||||
public static final String APPROVAL_NOT_EXIST = "签呈处理失败:签呈不存在";
|
public static final String APPROVAL_NOT_EXIST = "签呈处理失败:签呈不存在";
|
||||||
/**
|
/**
|
||||||
* 签呈审批时,签呈已经被审批 -- 签呈处理失败:签呈已处理
|
* 签呈审批时,签呈已经被审批 -- 签呈处理失败:签呈已处理
|
||||||
*/
|
*/
|
||||||
public static final String APPROVAL_PROCESSED = "签呈处理失败:签呈已处理";
|
public static final String APPROVAL_PROCESSED = "签呈处理失败:签呈已处理";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -138,4 +138,9 @@ public class BdWaresDetailExt extends BdWaresDetail {
|
||||||
*/
|
*/
|
||||||
private Integer pkUnit;
|
private Integer pkUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品上传盒数
|
||||||
|
*/
|
||||||
|
private Integer boxNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,4 +222,10 @@ public class BdWares extends BaseEntity {
|
||||||
@TableField("AREA_INCOME")
|
@TableField("AREA_INCOME")
|
||||||
private BigDecimal areaIncome;
|
private BigDecimal areaIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品上传盒数
|
||||||
|
*/
|
||||||
|
@TableField("BOX_NUM")
|
||||||
|
private Integer boxNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue