## 邮费计算调整,所有商品都算在邮费里面;
This commit is contained in:
parent
15da9da473
commit
8f9c950d18
|
@ -4,11 +4,7 @@ import com.hzs.common.core.domain.R;
|
|||
import com.hzs.common.domain.system.config.BdAreaFreePostage;
|
||||
|
||||
/**
|
||||
* @Description: 专区免邮服务
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/12/1 11:23
|
||||
* @Classname: AreaFreePostageServiceApi
|
||||
* @PackageName: com.hzs.system.config
|
||||
* 专区免邮服务
|
||||
*/
|
||||
public interface IAreaFreePostageServiceApi {
|
||||
|
||||
|
|
|
@ -7,11 +7,7 @@ import lombok.EqualsAndHashCode;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 二次发货入参
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/5/5 15:34
|
||||
* @Classname: DeliverSecondParam
|
||||
* @PackageName: com.hzs.sale.deliver.param
|
||||
* 二次发货入参
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
@ -43,7 +39,7 @@ public class DeliverSecondParam extends BaseAuthorityEntity {
|
|||
private Integer orderType;
|
||||
|
||||
/**
|
||||
* 发货方式 (1=快递,2=公司自提,3=店铺自提,4=店铺配送)
|
||||
* 发货方式 (1=快递,2=公司自提)
|
||||
*/
|
||||
private Integer deliveryWay;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ import java.util.*;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 发货单业务服务
|
||||
* 发货单业务服务
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
|
@ -249,7 +249,7 @@ public class SaDeliverBusinessServiceImpl implements ISaDeliverBusinessService {
|
|||
if (iOrderBusinessService.updateSaOrderChargeLog(EApprovalBusiness.SELF_DELIVERY_MANAGE, approvalBusinessResultDTO.getBusinessCode(), pkCountry, userId, EAgentApprovalStatus.APPROVED, approvalBusinessResultDTO.getApproveRemark())) {
|
||||
// 更新订单修改记录
|
||||
|
||||
// 更新订单为 店铺自提
|
||||
// 更新订单为 公司自提
|
||||
LambdaUpdateWrapper<SaOrder> updateOrder = new LambdaUpdateWrapper<>();
|
||||
updateOrder.set(SaOrder::getDeliveryWay, EDelivery.COMPANY_PICKED_UP.getValue());
|
||||
// 更新仓库
|
||||
|
|
|
@ -59,6 +59,7 @@ public abstract class ParentOrderController extends BaseController {
|
|||
protected RedisService redisService;
|
||||
|
||||
private ISaOrderService iSaOrderService;
|
||||
|
||||
@Autowired
|
||||
public void setOrderService(ISaOrderService orderService) {
|
||||
this.iSaOrderService = orderService;
|
||||
|
@ -407,8 +408,8 @@ public abstract class ParentOrderController extends BaseController {
|
|||
* @return boolean
|
||||
*/
|
||||
protected Boolean checkRecMsgBoolean(OrderParam orderParam) {
|
||||
if (orderParam.getDeliveryWay() != null && (EDelivery.COMPANY_PICKED_UP.getValue() == orderParam.getDeliveryWay() ||
|
||||
EDelivery.SHOP_PICKED_UP.getValue() == orderParam.getDeliveryWay())) {
|
||||
if (orderParam.getDeliveryWay() != null
|
||||
&& EDelivery.COMPANY_PICKED_UP.getValue() == orderParam.getDeliveryWay()) {
|
||||
orderParam.setTransType(null);
|
||||
return orderParam.getSpecialArea() != null
|
||||
&& orderParam.getOrderItemsParams() != null
|
||||
|
|
|
@ -201,7 +201,6 @@ public class ApiRegSaOrderController extends ParentOrderController {
|
|||
*/
|
||||
@PostMapping("/query-order")
|
||||
public AjaxResult queryOrder(@RequestBody OrderParam orderParam) {
|
||||
log.info(orderParam.getOrderCode());
|
||||
initPkCountry(orderParam);
|
||||
// 直接支付,从redis中获取
|
||||
AjaxResult result = validateOrderParam(orderParam);
|
||||
|
@ -340,7 +339,6 @@ public class ApiRegSaOrderController extends ParentOrderController {
|
|||
*/
|
||||
@PostMapping("/query-spend-details")
|
||||
public AjaxResult queryOrderSpendDetails(@RequestBody OrderParam orderParam) {
|
||||
log.info(orderParam.getOrderCode());
|
||||
initPkCountry(orderParam);
|
||||
AjaxResult result = validateOrderParam(orderParam);
|
||||
if (result != null) {
|
||||
|
|
|
@ -1,28 +1,13 @@
|
|||
package com.hzs.sale.order.param;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/4/12 14:04
|
||||
* @Classname: SaOrderChargeLogParam
|
||||
* @PackageName: com.hzs.sale.order.param
|
||||
*/
|
||||
package com.hzs.sale.order.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.sale.order.param
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-04-12 14:04
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class SaOrderChargeLogParam {
|
||||
|
||||
|
||||
/**
|
||||
* 签呈单号
|
||||
*/
|
||||
|
@ -96,7 +81,7 @@ public class SaOrderChargeLogParam {
|
|||
private Integer orderType;
|
||||
|
||||
/**
|
||||
* 发货方式 (1=快递,2=公司自提,3=店铺自提,4=店铺配送)
|
||||
* 发货方式 (1=快递,2=公司自提)
|
||||
*/
|
||||
private Integer deliveryWay;
|
||||
|
||||
|
@ -195,7 +180,7 @@ public class SaOrderChargeLogParam {
|
|||
*/
|
||||
private Date endLastInstanceDate;
|
||||
/**
|
||||
*体系主键
|
||||
* 体系主键
|
||||
*/
|
||||
private Integer pkVertex;
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||
import com.hzs.activity.base.service.IActivityService;
|
||||
import com.hzs.common.core.constant.*;
|
||||
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
||||
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.service.RedisService;
|
||||
|
@ -55,8 +54,6 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 用于处理订单的处理逻辑
|
||||
|
@ -66,56 +63,34 @@ import java.util.stream.Collectors;
|
|||
public class SaOrderHandle {
|
||||
|
||||
@DubboReference
|
||||
IGradeServiceApi gradeServiceApi;
|
||||
IGradeServiceApi iGradeServiceApi;
|
||||
@DubboReference
|
||||
ICurrencyServiceApi currencyServiceApi;
|
||||
ICurrencyServiceApi iCurrencyServiceApi;
|
||||
@DubboReference
|
||||
IMemberTeamServiceApi memberTeamServiceApi;
|
||||
IMemberTeamServiceApi iMemberTeamServiceApi;
|
||||
@DubboReference
|
||||
ISystemConfigServiceApi systemConfigServiceApi;
|
||||
ISystemConfigServiceApi iSystemConfigServiceApi;
|
||||
@DubboReference
|
||||
IAreaFreePostageServiceApi iAreaFreePostageServiceApi;
|
||||
|
||||
@Autowired
|
||||
private IActivityService activityGiftService;
|
||||
|
||||
private IBdWaresDetailService bdWaresDetailService;
|
||||
|
||||
private IBdPostageService postageService;
|
||||
|
||||
private IBdPostageDetailService postageDetailService;
|
||||
|
||||
private IBdPostageAreaService postageAreaService;
|
||||
|
||||
private IBdPostageFailAreaService bdPostageFailAreaService;
|
||||
private IActivityService iActivityService;
|
||||
@Autowired
|
||||
private IBdPostageService iBdPostageService;
|
||||
@Autowired
|
||||
private IBdPostageDetailService iBdPostageDetailService;
|
||||
@Autowired
|
||||
private IBdPostageAreaService iBdPostageAreaService;
|
||||
@Autowired
|
||||
private IBdPostageFailAreaService iBdPostageFailAreaService;
|
||||
|
||||
private IBdProductService bdProductService;
|
||||
|
||||
private IBdWaresDetailService bdWaresDetailService;
|
||||
private IBdWaresRangeService bdWaresRangeService;
|
||||
|
||||
private RedisService redisService;
|
||||
|
||||
private IBdWaresSpecialPostageService bdWaresSpecialPostageService;
|
||||
|
||||
@Autowired
|
||||
public void setPostageAreaService(IBdPostageAreaService postageAreaService) {
|
||||
this.postageAreaService = postageAreaService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setBdPostageFailAreaService(IBdPostageFailAreaService bdPostageFailAreaService) {
|
||||
this.bdPostageFailAreaService = bdPostageFailAreaService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setPostageService(IBdPostageService postageService) {
|
||||
this.postageService = postageService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setRedisService(RedisService redisService) {
|
||||
this.redisService = redisService;
|
||||
}
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
public void setBdWaresRangeService(IBdWaresRangeService bdWaresRangeService) {
|
||||
|
@ -127,11 +102,6 @@ public class SaOrderHandle {
|
|||
this.bdProductService = bdProductService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setPostageDetailService(IBdPostageDetailService postageDetailService) {
|
||||
this.postageDetailService = postageDetailService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setBdWaresDetailService(IBdWaresDetailService bdWaresDetailService) {
|
||||
this.bdWaresDetailService = bdWaresDetailService;
|
||||
|
@ -191,7 +161,7 @@ public class SaOrderHandle {
|
|||
cuMember.setPkCreator(centerMember.getPkId());
|
||||
if (centerMember.getPkTeamCode() == null) {
|
||||
// 验证父级是不是团队
|
||||
CuMemberTeamExt memberTeamExt = memberTeamServiceApi.getCuMemberTeamById(centerMember.getPkId()).getData();
|
||||
CuMemberTeamExt memberTeamExt = iMemberTeamServiceApi.getCuMemberTeamById(centerMember.getPkId()).getData();
|
||||
if (memberTeamExt != null) {
|
||||
cuMember.setPkTeamCode(memberTeamExt.getPkId());
|
||||
}
|
||||
|
@ -240,7 +210,7 @@ public class SaOrderHandle {
|
|||
Integer pkCountry = orderParam.getPkSettleCountry();
|
||||
|
||||
// 获取汇率
|
||||
CurrencyDTO currency = currencyServiceApi.getCurrency(pkCountry).getData();
|
||||
CurrencyDTO currency = iCurrencyServiceApi.getCurrency(pkCountry).getData();
|
||||
// 商品编号 + sku主键 + 数量
|
||||
List<BdWaresDetailExt> bdWaresDetailExtList = getWaresDetailExtList(orderParam, cuMember);
|
||||
if (CollectionUtil.isEmpty(bdWaresDetailExtList)) {
|
||||
|
@ -257,14 +227,12 @@ public class SaOrderHandle {
|
|||
// 处理邮费 根据专区获得邮费模板 邮费 先进行分类,把邮费模板一样的放在一起
|
||||
Map<Integer, List<SaOrderItems>> postageMap = new HashMap<>(ComputeUtil.mapInitCapacity(bdWaresDetailExtList.size()));
|
||||
|
||||
// 等级
|
||||
R<List<GradeDTO>> gradeDTO = gradeServiceApi.queryGradeList(pkCountry);
|
||||
List<GradeDTO> gradeList = gradeDTO.getData();
|
||||
Map<Integer, GradeDTO> gradeMap = gradeList.stream().collect(Collectors.toMap(GradeDTO::getGradeValue, Function.identity()));
|
||||
|
||||
for (BdWaresDetailExt waresDetailExt : bdWaresDetailExtList) {
|
||||
SaOrderItems saOrderItems = getSaOrderItems(cuMember, saOrder, currency, saOrderItemsList, waresDetailExt);
|
||||
|
||||
// 累积产品价格(计算包邮使用)
|
||||
resultPostage = resultPostage.add(saOrderItems.getPrice().multiply(new BigDecimal(saOrderItems.getQuantity())));
|
||||
|
||||
// 免邮的话不需要计算邮费
|
||||
if (EYesNo.YES.getIntValue() == waresDetailExt.getIsFreeMail()) {
|
||||
continue;
|
||||
|
@ -272,13 +240,11 @@ public class SaOrderHandle {
|
|||
if (EDelivery.FAST_MAIL.getValue() == orderParam.getDeliveryWay()) {
|
||||
setPostageTmpMap(orderParam, postageMap, waresDetailExt, saOrderItems);
|
||||
}
|
||||
// 累积产品价格(计算包邮使用)
|
||||
resultPostage = resultPostage.add(saOrderItems.getPrice().multiply(new BigDecimal(saOrderItems.getQuantity())));
|
||||
}
|
||||
|
||||
if (EDelivery.FAST_MAIL.getValue() == orderParam.getDeliveryWay()) {
|
||||
// 获取邮费配置
|
||||
String postageConfig = systemConfigServiceApi.getBonusSystemConfig(pkCountry, ESystemConfig.POSTAGE_CONFIG.getKey()).getData();
|
||||
String postageConfig = iSystemConfigServiceApi.getBonusSystemConfig(pkCountry, ESystemConfig.POSTAGE_CONFIG.getKey()).getData();
|
||||
if (null == postageConfig) {
|
||||
log.error("邮费模板缓存为空,按取最大值处理");
|
||||
// 缓存值为空,按取最大值进行处理
|
||||
|
@ -332,7 +298,7 @@ public class SaOrderHandle {
|
|||
List<SaOrderItems> postageOrderItemsList, Integer pkCountry,
|
||||
List<Integer> specialPostageList) {
|
||||
// 获取专区设置的不能发货区域
|
||||
List<BdPostageFailAreaExt> failAreaList = bdPostageFailAreaService.queryPostageFailAreaList(pkPostage);
|
||||
List<BdPostageFailAreaExt> failAreaList = iBdPostageFailAreaService.queryPostageFailAreaList(pkPostage);
|
||||
if (CollectionUtil.isNotEmpty(failAreaList)) {
|
||||
for (BdPostageFailAreaExt postageFailArea : failAreaList) {
|
||||
if (orderParam.getRecProvince().equals(postageFailArea.getProvince()) && orderParam.getRecCity().equals(postageFailArea.getCity())) {
|
||||
|
@ -346,8 +312,8 @@ public class SaOrderHandle {
|
|||
}
|
||||
|
||||
// 获取邮费模板主表
|
||||
BdPostage postage = postageService.getPostage(pkPostage);
|
||||
List<BdPostageDetail> postageDetailList = postageDetailService.getPostageDetail(orderParam.getTransType(), pkPostage);
|
||||
BdPostage postage = iBdPostageService.getPostage(pkPostage);
|
||||
List<BdPostageDetail> postageDetailList = iBdPostageDetailService.getPostageDetail(orderParam.getTransType(), pkPostage);
|
||||
BdPostageDetail postageDetail = null;
|
||||
// 验证省、市
|
||||
for (BdPostageDetail bdPostageDetail : postageDetailList) {
|
||||
|
@ -368,7 +334,7 @@ public class SaOrderHandle {
|
|||
boolean specialFlag = specialPostageList.contains(pkPostage);
|
||||
|
||||
// 获取专区设置的免邮金额
|
||||
List<BdPostageArea> postageAreaList = postageAreaService.getPostageArea(orderParam.getTransType(), pkPostage, orderParam.getSpecialArea(), pkCountry);
|
||||
List<BdPostageArea> postageAreaList = iBdPostageAreaService.getPostageArea(orderParam.getTransType(), pkPostage, orderParam.getSpecialArea(), pkCountry);
|
||||
BigDecimal freeAmount = null;
|
||||
if (CollectionUtil.isNotEmpty(postageAreaList)) {
|
||||
BdPostageArea allPostageAres = null;
|
||||
|
@ -376,11 +342,6 @@ public class SaOrderHandle {
|
|||
for (BdPostageArea postageArea : postageAreaList) {
|
||||
// 验证省
|
||||
if (orderParam.getRecProvince().equals(postageArea.getProvince())) {
|
||||
// 2023.11.29 临时需求,运费模板特殊地区不免邮
|
||||
if (postage.getTempName().startsWith("御玖饮竹盐模板")) {
|
||||
specialFlag = true;
|
||||
break;
|
||||
}
|
||||
if (orderParam.getRecCity().equals(postageArea.getCity()) ||
|
||||
postageArea.getCity() == null) {
|
||||
freeAmount = postageArea.getFreeAmount();
|
||||
|
@ -470,7 +431,7 @@ public class SaOrderHandle {
|
|||
}
|
||||
}
|
||||
// 活动赠品 赠送封装
|
||||
List<BdWaresDetailExt> newWaresDetailExtList = activityGiftService.generateActivityGiftWaresAchieve(orderParam.getSpecialArea(), orderParam.getPkSettleCountry(), bdWaresDetailExtList,
|
||||
List<BdWaresDetailExt> newWaresDetailExtList = iActivityService.generateActivityGiftWaresAchieve(orderParam.getSpecialArea(), orderParam.getPkSettleCountry(), bdWaresDetailExtList,
|
||||
orderParam.getParent(), cuMember);
|
||||
if (newWaresDetailExtList.size() > 0) {
|
||||
bdWaresDetailExtList.addAll(newWaresDetailExtList);
|
||||
|
@ -735,7 +696,7 @@ public class SaOrderHandle {
|
|||
if (CountryConstants.CHINA_COUNTRY.equals(cuMember.getPkSettleCountry()) || orderParam.getPkStorehouse() == null) {
|
||||
if (orderParam.getRecProvince() != null) {
|
||||
// 根据收货省获取仓库
|
||||
BdStorehouse bdStorehouse = currencyServiceApi.queryBdStorehouseByProvince(orderParam.getRecProvince()).getData();
|
||||
BdStorehouse bdStorehouse = iCurrencyServiceApi.queryBdStorehouseByProvince(orderParam.getRecProvince()).getData();
|
||||
if (bdStorehouse != null) {
|
||||
saOrderExt.setPkStorehouse(bdStorehouse.getPkId());
|
||||
}
|
||||
|
@ -777,7 +738,7 @@ public class SaOrderHandle {
|
|||
* orderType 1 = 注册,注册不用找累计 2 升级需要
|
||||
*/
|
||||
GradeDTO getMemberGradeAndAwardByCountry(BigDecimal settleOrderAmount, BigDecimal settleOrderPv, Integer pkCountry, String upgradeWay) {
|
||||
List<GradeDTO> gradeList = gradeServiceApi.queryGradeConfigByCondition(pkCountry).getData();
|
||||
List<GradeDTO> gradeList = iGradeServiceApi.queryGradeConfigByCondition(pkCountry).getData();
|
||||
|
||||
if (gradeList != null && gradeList.size() > 0) {
|
||||
// // TODO new V1、V2是购买直接给等级,V3以上不是
|
||||
|
@ -880,7 +841,7 @@ public class SaOrderHandle {
|
|||
*/
|
||||
void transformSaOrderToVO(SaOrderVO saOrderVO) {
|
||||
// 处理会员编号,汇率,顶点
|
||||
CurrencyDTO currencyDTO = currencyServiceApi.getCurrencyByPkId(saOrderVO.getPkRate()).getData();
|
||||
CurrencyDTO currencyDTO = iCurrencyServiceApi.getCurrencyByPkId(saOrderVO.getPkRate()).getData();
|
||||
saOrderVO.setRate(currencyDTO.getOutExchangeRate());
|
||||
}
|
||||
|
||||
|
@ -905,7 +866,7 @@ public class SaOrderHandle {
|
|||
* @param pkGrade 等级
|
||||
*/
|
||||
GradeDTO queryGradeConfigByCondition(Integer pkCountry, Integer pkGrade) {
|
||||
return gradeServiceApi.queryGradeConfigByCondition(pkCountry, pkGrade).getData();
|
||||
return iGradeServiceApi.queryGradeConfigByCondition(pkCountry, pkGrade).getData();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1036,7 +1036,7 @@ public class SaOrderServiceImpl extends ServiceImpl<SaOrderMapper, SaOrder> impl
|
|||
}
|
||||
// 封装订单信息
|
||||
SaOrderExt saOrderExt = saOrderHandle.packageSaveSaOrder(orderParam, cuMember, orderCode);
|
||||
// 封装订单明细(2024.02.02添加处理订单扩展类型)
|
||||
// 封装订单明细 -- 处理邮费
|
||||
saOrderHandle.packSaOrderItems(cuMember, saOrderExt, orderParam);
|
||||
// 第二次封装订单,根据明细表计算订单主表金额、业绩,处理明细仓库
|
||||
// key为产品id
|
||||
|
|
|
@ -15,11 +15,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 我的订单返回VO
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/1/13 16:13
|
||||
* @Classname: MyOrderVO
|
||||
* @PackageName: com.hzs.sale.order.vo
|
||||
* 我的订单返回VO
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
@ -155,7 +151,7 @@ public class CanApplyOrderVO {
|
|||
*/
|
||||
private BigDecimal postage;
|
||||
/**
|
||||
* 发货方式 (1=快递,2=公司自提,3=店铺自提,4=店铺配送)
|
||||
* 发货方式 (1=快递,2=公司自提)
|
||||
*/
|
||||
private Integer deliveryWay;
|
||||
/**
|
||||
|
|
|
@ -1,30 +1,14 @@
|
|||
package com.hzs.sale.order.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/4/11 10:33
|
||||
* @Classname: OrderChargeLogVo
|
||||
* @PackageName: com.hzs.sale.order.vo
|
||||
*/
|
||||
package com.hzs.sale.order.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
|
||||
import com.hzs.common.domain.sale.order.SaOrderItems;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.sale.order.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-04-11 10:33
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class OrderChargeLogVo {
|
||||
|
||||
|
@ -160,7 +144,6 @@ public class OrderChargeLogVo {
|
|||
private String pkCenterName;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 订单金额(本地币)
|
||||
*/
|
||||
|
@ -340,7 +323,7 @@ public class OrderChargeLogVo {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
|
@ -348,19 +331,17 @@ public class OrderChargeLogVo {
|
|||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
@Excel(name = "支付时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "支付时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date payTime;
|
||||
/**
|
||||
* 发货日期
|
||||
*
|
||||
*/
|
||||
@Excel(name = "发货日期",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "发货日期", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deliveryTime;
|
||||
/**
|
||||
* 发货方式 (1=快递,2=公司自提,3=店铺自提,4=店铺配送)
|
||||
*
|
||||
* 发货方式 (1=快递,2=公司自提)
|
||||
*/
|
||||
@Excel(name = "发货方式")
|
||||
private String deliveryWayStr;
|
||||
|
@ -382,7 +363,6 @@ public class OrderChargeLogVo {
|
|||
private String preSaleStatusStr;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
|
@ -391,7 +371,7 @@ public class OrderChargeLogVo {
|
|||
/**
|
||||
* 撤单时间
|
||||
*/
|
||||
@Excel(name = "撤单时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "撤单时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date cancelOrderTime;
|
||||
/**
|
||||
|
@ -402,13 +382,13 @@ public class OrderChargeLogVo {
|
|||
/**
|
||||
* 审核状态(1=未审核,2=审核通过,3=审核驳回)
|
||||
*/
|
||||
@Excel(name = "审核状态",readConverterExp = "1=未审核,2=审核通过,3=审核驳回")
|
||||
@Excel(name = "审核状态", readConverterExp = "1=未审核,2=审核通过,3=审核驳回")
|
||||
private Integer approvalStatus;
|
||||
|
||||
/**
|
||||
* 终审时间
|
||||
*/
|
||||
@Excel(name = "终审时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "终审时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastInstanceDate;
|
||||
|
||||
|
@ -439,5 +419,4 @@ public class OrderChargeLogVo {
|
|||
private String orderChargeLogSourceStr;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -11,11 +11,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 用于管理端返回到前台的实体vo
|
||||
* @Author: sui q
|
||||
* @Time: 2022/10/19 17:37
|
||||
* @Classname: SaOrderVO
|
||||
* @PackageName: com.hzs.sale.order.vo
|
||||
* 用于管理端返回到前台的实体vo
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
@ -164,7 +160,7 @@ public class SaOrderVO extends BaseEntity {
|
|||
private String tranTypeVal;
|
||||
|
||||
/**
|
||||
* 发货方式 (1=快递,2=公司自提,3=店铺自提,4=店铺配送)
|
||||
* 发货方式 (1=快递,2=公司自提)
|
||||
*/
|
||||
@JsonIgnore
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.DELIVERY)
|
||||
|
|
|
@ -5,18 +5,15 @@ import com.hzs.common.domain.sale.wares.BdWaresSpecialPostage;
|
|||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 商品特殊邮费配置 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-10-27
|
||||
*/
|
||||
public interface BdWaresSpecialPostageMapper extends BaseMapper<BdWaresSpecialPostage> {
|
||||
|
||||
/**
|
||||
* 根据邮费主键删除邮费配置信息
|
||||
*
|
||||
* @param pkPostage
|
||||
*/
|
||||
void deleteByPkPostage(@Param("pkPostage") Integer pkPostage);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package com.hzs.sale.wares.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import com.hzs.common.core.constant.SystemFieldConstants;
|
||||
import com.hzs.common.core.enums.ERangeType;
|
||||
import com.hzs.common.domain.member.base.CuMember;
|
||||
import com.hzs.common.domain.sale.wares.BdWaresRange;
|
||||
import com.hzs.sale.wares.mapper.BdWaresRangeMapper;
|
||||
import com.hzs.sale.wares.service.IBdWaresRangeService;
|
||||
import com.hzs.system.config.IAwardsServiceApi;
|
||||
import com.hzs.system.config.IRangeServiceApi;
|
||||
import com.hzs.system.config.dto.RangeDTO;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
|
@ -26,18 +24,11 @@ public class BdWaresRangeServiceImpl extends ServiceImpl<BdWaresRangeMapper, BdW
|
|||
|
||||
@DubboReference
|
||||
IRangeServiceApi iRangeServiceApi;
|
||||
@DubboReference
|
||||
IAwardsServiceApi iAwardsServiceApi;
|
||||
|
||||
@Override
|
||||
public List<BdWaresRange> queryWaresRangeByCondition(CuMember cuMember, List<Integer> pkWareList) {
|
||||
int level = cuMember.getPkSettleGrade();
|
||||
int rangeType = ERangeType.GRADE.getValue();
|
||||
// BdAwards bdAwards = iAwardsServiceApi.getAwardsOne(cuMember.getPkAwards()).getData();
|
||||
// if (bdAwards.getAwardsValue() > EAwards.MEMBER.getValue()) {
|
||||
// level = cuMember.getPkAwards();
|
||||
// rangeType = ERangeType.AWARDS.getValue();
|
||||
// }
|
||||
RangeDTO rangeDTO = iRangeServiceApi.queryRangeDtoByCondition(cuMember.getPkSettleCountry(), rangeType, level).getData();
|
||||
if (rangeDTO == null) {
|
||||
return new ArrayList<>();
|
||||
|
@ -48,9 +39,9 @@ public class BdWaresRangeServiceImpl extends ServiceImpl<BdWaresRangeMapper, BdW
|
|||
@Override
|
||||
public List<BdWaresRange> querySkuWaresRangeByCondition(Integer pkCountry, Integer rangeType, Integer level, List<Integer> specsSkuList) {
|
||||
RangeDTO rangeDTO = iRangeServiceApi.queryRangeDtoByCondition(pkCountry, rangeType, level).getData();
|
||||
QueryWrapper<BdWaresRange> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(SystemFieldConstants.PK_RANGE, rangeDTO.getPkRange());
|
||||
queryWrapper.in(SystemFieldConstants.PK_WARES_SPECS_SKU, specsSkuList);
|
||||
LambdaQueryWrapper<BdWaresRange> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdWaresRange::getPkRange, rangeDTO.getPkRange());
|
||||
queryWrapper.in(BdWaresRange::getPkWaresSpecsSku, specsSkuList);
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package com.hzs.sale.wares.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.constant.SystemFieldConstants;
|
||||
import com.hzs.common.domain.sale.wares.BdWaresSpecialPostage;
|
||||
import com.hzs.sale.wares.mapper.BdWaresSpecialPostageMapper;
|
||||
import com.hzs.sale.wares.service.IBdWaresSpecialPostageService;
|
||||
|
@ -12,26 +11,22 @@ import java.util.List;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 商品特殊邮费配置 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-10-27
|
||||
*/
|
||||
@Service
|
||||
public class BdWaresSpecialPostageServiceImpl extends ServiceImpl<BdWaresSpecialPostageMapper, BdWaresSpecialPostage> implements IBdWaresSpecialPostageService {
|
||||
|
||||
@Override
|
||||
public List<Integer> querySpecialPostagePkWares(Integer pkCountry) {
|
||||
QueryWrapper<BdWaresSpecialPostage> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(SystemFieldConstants.PK_COUNTRY, pkCountry);
|
||||
LambdaQueryWrapper<BdWaresSpecialPostage> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdWaresSpecialPostage::getPkCountry, pkCountry);
|
||||
List<BdWaresSpecialPostage> pkWaresList = this.list(queryWrapper);
|
||||
return pkWaresList.stream().map(BdWaresSpecialPostage::getPkPostage).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据邮费主键删除邮费配置信息
|
||||
*
|
||||
* @param pkPostage
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -2,20 +2,10 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzs.sale.wares.mapper.BdWaresSpecialPostageMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.sale.wares.BdWaresSpecialPostage">
|
||||
<id column="PK_ID" property="pkId"/>
|
||||
<result column="PK_COUNTRY" property="pkCountry"/>
|
||||
<result column="DEL_FLAG" property="delFlag"/>
|
||||
<result column="PK_CREATOR" property="pkCreator"/>
|
||||
<result column="PK_MODIFIED" property="pkModified"/>
|
||||
<result column="CREATION_TIME" property="creationTime"/>
|
||||
<result column="MODIFIED_TIME" property="modifiedTime"/>
|
||||
<result column="PK_POSTAGE" property="pkPostage"/>
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteByPkPostage">
|
||||
delete from BD_WARES_SPECIAL_POSTAGE where PK_POSTAGE = #{pkPostage}
|
||||
delete
|
||||
from BD_WARES_SPECIAL_POSTAGE
|
||||
where PK_POSTAGE = #{pkPostage}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -5,9 +5,6 @@ import com.hzs.common.domain.system.config.BdAreaFreePostage;
|
|||
|
||||
/**
|
||||
* 专区包邮配置 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-11-30
|
||||
*/
|
||||
public interface BdAreaFreePostageMapper extends BaseMapper<BdAreaFreePostage> {
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package com.hzs.system.config.provider;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.hzs.common.core.constant.SystemFieldConstants;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.EYesNo;
|
||||
import com.hzs.common.domain.system.config.BdAreaFreePostage;
|
||||
|
@ -14,11 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 专区免邮服务
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/12/1 11:22
|
||||
* @Classname: AreaFreePostageProvider
|
||||
* @PackageName: com.hzs.system.config.provider
|
||||
* 专区免邮服务
|
||||
*/
|
||||
@DubboService
|
||||
public class AreaFreePostageProvider implements IAreaFreePostageServiceApi {
|
||||
|
@ -30,11 +25,11 @@ public class AreaFreePostageProvider implements IAreaFreePostageServiceApi {
|
|||
public R<BdAreaFreePostage> queryAreaFreePostage(Integer specialArea, Integer pkCountry) {
|
||||
BdAreaFreePostage areaFreePostage = null;
|
||||
|
||||
QueryWrapper<BdAreaFreePostage> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(SystemFieldConstants.PK_COUNTRY, pkCountry);
|
||||
queryWrapper.eq("SPECIAL_AREA", specialArea);
|
||||
queryWrapper.eq("ENABLE_STATE", EYesNo.YES.getIntValue());
|
||||
queryWrapper.orderByDesc(SystemFieldConstants.CREATION_TIME);
|
||||
LambdaQueryWrapper<BdAreaFreePostage> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdAreaFreePostage::getPkCountry, pkCountry);
|
||||
queryWrapper.eq(BdAreaFreePostage::getSpecialArea, specialArea);
|
||||
queryWrapper.eq(BdAreaFreePostage::getEnableState, EYesNo.YES.getIntValue());
|
||||
queryWrapper.orderByDesc(BdAreaFreePostage::getCreationTime);
|
||||
List<BdAreaFreePostage> list = iBdAreaFreePostageService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
areaFreePostage = list.get(0);
|
||||
|
|
|
@ -5,12 +5,8 @@ import com.hzs.common.domain.system.config.BdAreaFreePostage;
|
|||
|
||||
/**
|
||||
* 专区包邮配置 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-11-30
|
||||
*/
|
||||
public interface IBdAreaFreePostageService extends IService<BdAreaFreePostage> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -8,9 +8,6 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
/**
|
||||
* 专区包邮配置 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-11-30
|
||||
*/
|
||||
@Service
|
||||
public class BdAreaFreePostageServiceImpl extends ServiceImpl<BdAreaFreePostageMapper, BdAreaFreePostage> implements IBdAreaFreePostageService {
|
||||
|
|
|
@ -2,18 +2,4 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzs.system.config.mapper.BdAreaFreePostageMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.system.config.BdAreaFreePostage">
|
||||
<id column="PK_ID" property="pkId"/>
|
||||
<result column="DEL_FLAG" property="delFlag"/>
|
||||
<result column="CREATION_TIME" property="creationTime"/>
|
||||
<result column="MODIFIED_TIME" property="modifiedTime"/>
|
||||
<result column="PK_CREATOR" property="pkCreator"/>
|
||||
<result column="PK_MODIFIED" property="pkModified"/>
|
||||
<result column="PK_COUNTRY" property="pkCountry"/>
|
||||
<result column="SPECIAL_AREA" property="specialArea"/>
|
||||
<result column="FREE_AMOUNT" property="freeAmount"/>
|
||||
<result column="ENABLE_STATE" property="enableState"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -52,11 +52,6 @@ public class SystemFieldConstants {
|
|||
*/
|
||||
public static final String MODIFIED_TIME = "MODIFIED_TIME";
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
public static final String PK_COUNTRY_VALUE = "pkCountry";
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
|
@ -67,48 +62,4 @@ public class SystemFieldConstants {
|
|||
*/
|
||||
public static final String PK_CORP = "pk_corp";
|
||||
|
||||
/**
|
||||
* 等级值
|
||||
*/
|
||||
public static final String GRADE_VALUE = "grade_value";
|
||||
|
||||
/**
|
||||
* 等级结算值
|
||||
*/
|
||||
public static final String START_VALUE = "start_value";
|
||||
|
||||
/**
|
||||
* 极差类型
|
||||
*/
|
||||
public static final String RANGE_TYPE = "range_type";
|
||||
|
||||
/**
|
||||
* 级别
|
||||
*/
|
||||
public static final String PK_LEVEL = "pk_level";
|
||||
|
||||
/**
|
||||
* 极差
|
||||
*/
|
||||
public static final String PK_RANGE = "pk_range";
|
||||
|
||||
/**
|
||||
* 规格sku主键
|
||||
*/
|
||||
public static final String PK_WARES_SPECS_SKU = "pk_wares_specs_sku";
|
||||
|
||||
/**
|
||||
* 商品明细主键
|
||||
*/
|
||||
public static final String PK_WARES_DETAIL = "PK_WARES_DETAIL";
|
||||
|
||||
/**
|
||||
* 商品主键
|
||||
*/
|
||||
public static final String PK_WARES = "PK_WARES";
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
public static final String APPROVE_STATUS = "APPROVE_STATUS";
|
||||
}
|
||||
|
|
|
@ -21,16 +21,6 @@ public enum EDelivery {
|
|||
*/
|
||||
COMPANY_PICKED_UP(2, "公司自提", 0, EnumsPrefixConstants.DELIVERY + "2"),
|
||||
|
||||
/**
|
||||
* 店铺自提
|
||||
*/
|
||||
SHOP_PICKED_UP(3, "店铺自提", 0, EnumsPrefixConstants.DELIVERY + "3"),
|
||||
|
||||
/**
|
||||
* 店铺配送
|
||||
*/
|
||||
SHOP_DELIVERY(4, "店铺配送", 0, EnumsPrefixConstants.DELIVERY + "4"),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,13 +7,6 @@ import lombok.*;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: sui q
|
||||
* @Time: 2022/9/16 16:41
|
||||
* @Classname: BdWaresDetailsExt
|
||||
* @PackageName: com.hzs.common.domain.sale.ext
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Builder
|
||||
|
@ -70,7 +63,7 @@ public class BdWaresDetailExt extends BdWaresDetail {
|
|||
*/
|
||||
private BigDecimal assAchieve;
|
||||
|
||||
// /**
|
||||
// /**
|
||||
// * 规格分类
|
||||
// */
|
||||
// private Integer pkSpecsType;
|
||||
|
|
|
@ -10,11 +10,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 订单修改记录扩展类
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/2/3 10:58
|
||||
* @Classname: SaOrderChargeLogExt
|
||||
* @PackageName: com.hzs.common.domain.sale.ext
|
||||
* 订单修改记录扩展类
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
@ -30,11 +26,9 @@ public class SaOrderChargeLogExt extends SaOrderChargeLog {
|
|||
*/
|
||||
private String orderCode;
|
||||
|
||||
|
||||
/**
|
||||
* 修改类型(231=修改地址,232=调换货物,233=退单,234=撤销订单,235=撤销产品)
|
||||
*/
|
||||
|
||||
@Excel(name = "撤单类型")
|
||||
private String chargeTypeStr;
|
||||
|
||||
|
@ -169,7 +163,7 @@ public class SaOrderChargeLogExt extends SaOrderChargeLog {
|
|||
private Date payTime;
|
||||
|
||||
/**
|
||||
* 发货方式 (1=快递,2=公司自提,3=店铺自提,4=店铺配送)
|
||||
* 发货方式 (1=快递,2=公司自提)
|
||||
*/
|
||||
private Integer deliveryWay;
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ public class SaOrder extends BaseEntity {
|
|||
private Integer tranType;
|
||||
|
||||
/**
|
||||
* 发货方式 (1=快递,2=公司自提,3=店铺自提,4=店铺配送)
|
||||
* 发货方式 (1=快递,2=公司自提)
|
||||
*/
|
||||
@TableField("DELIVERY_WAY")
|
||||
private Integer deliveryWay;
|
||||
|
|
|
@ -15,9 +15,6 @@ import lombok.experimental.Accessors;
|
|||
|
||||
/**
|
||||
* 专区包邮配置
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-11-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
Loading…
Reference in New Issue