From 0abd80878ee9045d5317a2dbeff6c20d2dfdabc0 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 14 May 2021 15:07:32 +0800
Subject: [PATCH] Merge branch 'yunding' of http://120.27.238.55:7000/r/exchange into yunding
---
src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 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..5fbb658 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);
}
}
@@ -231,12 +231,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();
--
Gitblit v1.9.1