From e72fa0716169831068f8fe781640129e4ed49d6d Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 18 May 2021 18:43:21 +0800
Subject: [PATCH] modify
---
src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java b/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java
index fd185ed..12d3ea6 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java
@@ -109,7 +109,7 @@
for(YdProductVo ydProductVo : records){
ydProductVo.setProfitT(prifitT);
- if(ydProductVo.getTotalT().compareTo(BigDecimal.ZERO) < 1) {
+ if(ydProductVo.getSurplusT().compareTo(BigDecimal.ZERO) < 1) {
ydProductVo.setStatus(2);
}
}
@@ -148,10 +148,8 @@
Date endTime = DateUtil.offsetDay(workTime, proCycle);
ydProductVo.setEndTime(endTime);
- if (ydProductVo.getTotalT().compareTo(BigDecimal.ZERO) < 1) {
+ if (ydProductVo.getSurplusT().compareTo(BigDecimal.ZERO) < 1) {
ydProductVo.setStatus(2);
- } else {
- ydProductVo.setStatus(1);
}
return Result.ok(ydProductVo);
}
@@ -231,12 +229,14 @@
quantityOwn = quantityOwn + ydOrderEntity.getQuantity();
}
}
- if(quantityOwn >= limitedNum){
+ int quantityInt = quantity.intValue();
+ if(quantityOwn + quantityInt > limitedNum){
return Result.fail("产品限购"+limitedNum);
}
- if (quantity.compareTo(BigDecimal.valueOf(ydProductEntity.getLimitedNum())) < 1) {
- return Result.fail("产品限购" + ydProductEntity.getLimitedNum());
- }
+
+// if (quantity.compareTo(BigDecimal.valueOf(ydProductEntity.getLimitedNum())) < 1) {
+// return Result.fail("产品限购" + ydProductEntity.getLimitedNum());
+// }
BigDecimal salePrice = ydProductEntity.getSalePrice();
//剩余产品数量
BigDecimal surplusT = ydProductEntity.getSurplusT();
@@ -280,7 +280,6 @@
"USDT", 1, 3, ydOrderEntity.getId());
yunDingProducter.sendYunDingUsdtProfit(ydOrderEntity.getId());
- yunDingProducter.sendYunDingAutoAgent(ydOrderEntity.getMemberId());
return Result.ok("支付成功");
}
@@ -585,7 +584,6 @@
memberEntity.setAgentLevel(id.intValue());
LoginUserUtils.resetAppLoginUser(memberEntity);
- yunDingProducter.sendYunDingAutoAgent(memberId);
yunDingProducter.sendYunDingUsdtProfit(orderEntity.getId());
return Result.ok("购买成功");
}
--
Gitblit v1.9.1