【代码评审】门店自提:相关代码的优化、以及 todo 评审

This commit is contained in:
YunaiV 2024-08-07 22:09:31 +08:00
parent 5b59ce5261
commit 8775472af7
3 changed files with 3 additions and 9 deletions

View File

@ -55,6 +55,7 @@ public class TradeDeliveryPriceCalculator implements TradePriceCalculator {
if (param.getDeliveryType() == null) {
return;
}
// TODO @puhui999需要校验是不是存在商品不能门店自提或者不能快递发货的情况就是说配送方式不匹配哈
if (DeliveryTypeEnum.PICK_UP.getType().equals(param.getDeliveryType())) {
calculateByPickUp(param);
} else if (DeliveryTypeEnum.EXPRESS.getType().equals(param.getDeliveryType())) {

View File

@ -37,14 +37,12 @@ public class TradePointUsePriceCalculator implements TradePriceCalculator {
@Override
public void calculate(TradePriceCalculateReqBO param, TradePriceCalculateRespBO result) {
// 默认使用积分为 0
result.setUsePoint(0);
// 0. 初始化积分
MemberUserRespDTO user = memberUserApi.getUser(param.getUserId());
result.setTotalPoint(user.getPoint()); // 设置会员总积分
result.setTotalPoint(user.getPoint()).setUsePoint(0);
// 1.1 校验是否使用积分
if (!BooleanUtil.isTrue(param.getPointStatus())) {
result.setUsePoint(0);
return;
}
// 1.2 校验积分抵扣是否开启

View File

@ -110,11 +110,6 @@
<artifactId>wx-java-miniapp-spring-boot-starter</artifactId> <!-- 微信登录(小程序) -->
</dependency>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java-sms</artifactId> <!-- 短信(腾讯云) -->
</dependency>
<dependency>
<groupId>com.xingyuv</groupId>
<artifactId>spring-boot-starter-captcha-plus</artifactId> <!-- 验证码,一般用于登录使用 -->