xiaoyong931011
2021-05-14 c5ac51a5525b261127845a38a1fec5a86c860441
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("购买成功");
    }