Commit 8775472af7156b7abef2b9d0ffad1939e5a2ad49
1 parent
5b59ce52
【代码评审】门店自提:相关代码的优化、以及 todo 评审
Showing
3 changed files
with
3 additions
and
9 deletions
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradeDeliveryPriceCalculator.java
| @@ -55,6 +55,7 @@ public class TradeDeliveryPriceCalculator implements TradePriceCalculator { | @@ -55,6 +55,7 @@ public class TradeDeliveryPriceCalculator implements TradePriceCalculator { | ||
| 55 | if (param.getDeliveryType() == null) { | 55 | if (param.getDeliveryType() == null) { |
| 56 | return; | 56 | return; |
| 57 | } | 57 | } |
| 58 | + // TODO @puhui999:需要校验,是不是存在商品不能门店自提,或者不能快递发货的情况。就是说,配送方式不匹配哈 | ||
| 58 | if (DeliveryTypeEnum.PICK_UP.getType().equals(param.getDeliveryType())) { | 59 | if (DeliveryTypeEnum.PICK_UP.getType().equals(param.getDeliveryType())) { |
| 59 | calculateByPickUp(param); | 60 | calculateByPickUp(param); |
| 60 | } else if (DeliveryTypeEnum.EXPRESS.getType().equals(param.getDeliveryType())) { | 61 | } else if (DeliveryTypeEnum.EXPRESS.getType().equals(param.getDeliveryType())) { |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePointUsePriceCalculator.java
| @@ -37,14 +37,12 @@ public class TradePointUsePriceCalculator implements TradePriceCalculator { | @@ -37,14 +37,12 @@ public class TradePointUsePriceCalculator implements TradePriceCalculator { | ||
| 37 | 37 | ||
| 38 | @Override | 38 | @Override |
| 39 | public void calculate(TradePriceCalculateReqBO param, TradePriceCalculateRespBO result) { | 39 | public void calculate(TradePriceCalculateReqBO param, TradePriceCalculateRespBO result) { |
| 40 | - // 默认使用积分为 0 | ||
| 41 | - result.setUsePoint(0); | 40 | + // 0. 初始化积分 |
| 42 | MemberUserRespDTO user = memberUserApi.getUser(param.getUserId()); | 41 | MemberUserRespDTO user = memberUserApi.getUser(param.getUserId()); |
| 43 | - result.setTotalPoint(user.getPoint()); // 设置会员总积分 | 42 | + result.setTotalPoint(user.getPoint()).setUsePoint(0); |
| 44 | 43 | ||
| 45 | // 1.1 校验是否使用积分 | 44 | // 1.1 校验是否使用积分 |
| 46 | if (!BooleanUtil.isTrue(param.getPointStatus())) { | 45 | if (!BooleanUtil.isTrue(param.getPointStatus())) { |
| 47 | - result.setUsePoint(0); | ||
| 48 | return; | 46 | return; |
| 49 | } | 47 | } |
| 50 | // 1.2 校验积分抵扣是否开启 | 48 | // 1.2 校验积分抵扣是否开启 |
yudao-module-system/yudao-module-system-biz/pom.xml
| @@ -111,11 +111,6 @@ | @@ -111,11 +111,6 @@ | ||
| 111 | </dependency> | 111 | </dependency> |
| 112 | 112 | ||
| 113 | <dependency> | 113 | <dependency> |
| 114 | - <groupId>com.tencentcloudapi</groupId> | ||
| 115 | - <artifactId>tencentcloud-sdk-java-sms</artifactId> <!-- 短信(腾讯云) --> | ||
| 116 | - </dependency> | ||
| 117 | - | ||
| 118 | - <dependency> | ||
| 119 | <groupId>com.xingyuv</groupId> | 114 | <groupId>com.xingyuv</groupId> |
| 120 | <artifactId>spring-boot-starter-captcha-plus</artifactId> <!-- 验证码,一般用于登录使用 --> | 115 | <artifactId>spring-boot-starter-captcha-plus</artifactId> <!-- 验证码,一般用于登录使用 --> |
| 121 | </dependency> | 116 | </dependency> |