From 24b15949766297f37868e0d9eec9bb63dc376b85 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 7 Aug 2024 17:09:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91MALL-TRADE=EF=BC=9A=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E4=BF=A1=E6=81=AF=E8=BF=94=E5=9B=9E=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E7=9B=B8=E5=85=B3=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/order/vo/AppTradeOrderSettlementRespVO.java | 4 ++-- .../trade/service/price/bo/TradePriceCalculateRespBO.java | 6 +++++- .../price/calculator/TradePointUsePriceCalculator.java | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderSettlementRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderSettlementRespVO.java index 95f9fc8fa..9aab1b68b 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderSettlementRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderSettlementRespVO.java @@ -2,11 +2,11 @@ package cn.iocoder.yudao.module.trade.controller.app.order.vo; import cn.iocoder.yudao.module.trade.controller.app.base.property.AppProductPropertyValueDetailRespVO; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import jakarta.validation.constraints.NotNull; import java.util.List; @Schema(description = "用户 App - 交易订单结算信息 Response VO") @@ -26,7 +26,7 @@ public class AppTradeOrderSettlementRespVO { private Address address; @Schema(description = "已使用的积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") - private Integer usedPoint; + private Integer usePoint; @Schema(description = "总积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") private Integer totalPoint; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/bo/TradePriceCalculateRespBO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/bo/TradePriceCalculateRespBO.java index 93867f1e4..b7482407c 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/bo/TradePriceCalculateRespBO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/bo/TradePriceCalculateRespBO.java @@ -48,13 +48,17 @@ public class TradePriceCalculateRespBO { */ private Long couponId; + /** + * 会员剩余积分 + */ + private Integer totalPoint; /** * 使用的积分 */ private Integer usePoint; /** - * 使用的积分 + * 赠送的积分 */ private Integer givePoint; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePointUsePriceCalculator.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePointUsePriceCalculator.java index 40b7450fd..bbb92b3ad 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePointUsePriceCalculator.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePointUsePriceCalculator.java @@ -9,11 +9,11 @@ import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.promotion.enums.common.PromotionTypeEnum; import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateReqBO; import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateRespBO; +import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; -import jakarta.annotation.Resource; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -39,6 +39,9 @@ public class TradePointUsePriceCalculator implements TradePriceCalculator { public void calculate(TradePriceCalculateReqBO param, TradePriceCalculateRespBO result) { // 默认使用积分为 0 result.setUsePoint(0); + MemberUserRespDTO user = memberUserApi.getUser(param.getUserId()); + result.setTotalPoint(user.getPoint()); // 设置会员总积分 + // 1.1 校验是否使用积分 if (!BooleanUtil.isTrue(param.getPointStatus())) { result.setUsePoint(0); @@ -50,7 +53,6 @@ public class TradePointUsePriceCalculator implements TradePriceCalculator { return; } // 1.3 校验用户积分余额 - MemberUserRespDTO user = memberUserApi.getUser(param.getUserId()); if (user.getPoint() == null || user.getPoint() <= 0) { return; } From 4322e2f8e148ff2d428f4ea68761ef4bb39ae355 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 7 Aug 2024 17:31:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91=E8=85=BE=E8=AE=AF=E4=BA=91=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=BF=98=E9=9C=80=E8=A6=81=20tencentcloud-sd?= =?UTF-8?q?k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-module-system/yudao-module-system-biz/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yudao-module-system/yudao-module-system-biz/pom.xml b/yudao-module-system/yudao-module-system-biz/pom.xml index f12ca6271..0da7c1175 100644 --- a/yudao-module-system/yudao-module-system-biz/pom.xml +++ b/yudao-module-system/yudao-module-system-biz/pom.xml @@ -110,6 +110,11 @@ wx-java-miniapp-spring-boot-starter + + com.tencentcloudapi + tencentcloud-sdk-java-sms + + com.xingyuv spring-boot-starter-captcha-plus