From 990c09c842d87d1f179e3a0070541da0457b8393 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Tue, 21 Nov 2023 14:07:19 +0800
Subject: [PATCH] 匹配
---
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
index e3656fe..d23ad06 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -749,20 +749,6 @@
if(prizeScore.compareTo(score) < 0){
throw new FebsException("积分不足");
}
- if(hasTc){
- //系统设置的个人贡献点最大值
- DataDictionaryCustom starGetDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
- DataDictionaryEnum.STAR_GET.getType(),
- DataDictionaryEnum.STAR_GET.getCode());
- if(ObjectUtil.isNotEmpty(starGetDic)){
- String starGetStr = StrUtil.isEmpty(starGetDic.getValue()) ? "0" : starGetDic.getValue();
- BigDecimal starGet = new BigDecimal(starGetStr);
- BigDecimal star = new BigDecimal(mallMemberWallet.getStar());
- if(starGet.compareTo(BigDecimal.ZERO) != 0 && starGet.compareTo(star) <= 0){
- throw new FebsException("无法购买套餐");
- }
- }
- }
/**
* 使用积分折扣现金
*/
@@ -781,6 +767,23 @@
if(scorePercentMaxAmount.compareTo(score) < 0){
throw new FebsException("最多可使用"+scorePercentMaxAmount+"积分");
}
+
+ if(hasTc){
+ //系统设置的个人贡献点最大值
+ DataDictionaryCustom starGetDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+ DataDictionaryEnum.STAR_GET.getType(),
+ DataDictionaryEnum.STAR_GET.getCode());
+ if(ObjectUtil.isNotEmpty(starGetDic)){
+ String starGetStr = StrUtil.isEmpty(starGetDic.getValue()) ? "0" : starGetDic.getValue();
+ BigDecimal starGet = new BigDecimal(starGetStr);
+ BigDecimal star = new BigDecimal(mallMemberWallet.getStar());
+ if(starGet.compareTo(BigDecimal.ZERO) != 0 && starGet.compareTo(star) <= 0){
+
+ return new FebsResponse().success().message("购买套餐不会获得贡献点");
+// throw new FebsException("无法购买套餐");
+ }
+ }
+ }
return new FebsResponse().success();
}
--
Gitblit v1.9.1