From 5816c172b2558f46974d971726170570e6c26f9a Mon Sep 17 00:00:00 2001
From: rentaiming <806181062@qq.com>
Date: 星期三, 31 七月 2024 22:29:12 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
index 6ef2d4c..caeef82 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -733,8 +733,9 @@
             CustomConfig memberPointsMoney = sysUserClient.getconfig("MEMBER_POINTS_MONEY").getData();
             CustomConfig memberPointsPoints = sysUserClient.getconfig("MEMBER_POINTS_POINTS").getData();
 
-            if (pice.intValue()>0){
-                BigDecimal divide = pice.divide(new BigDecimal(memberPointsMoney.getConfigValue()));
+            if (pice.doubleValue()>0){
+                BigDecimal pic=pice.multiply(new BigDecimal(memberOrderDTO.getGoodsQuantity()));
+                BigDecimal divide = pic.divide(new BigDecimal(memberPointsMoney.getConfigValue()));
                 BigDecimal roundedDown = divide.setScale(0, RoundingMode.DOWN);
                 BigDecimal aDouble= roundedDown.multiply(new BigDecimal(memberPointsPoints.getConfigValue()));
                 order.setPoints(aDouble.intValue());
@@ -1153,6 +1154,11 @@
             order.setReceiveTime(LocalDateTime.now());
             baseMapper.updateById(order);
 
+            if (order.getAuctionOrderType().getCode()==1){
+
+            }else{
+
+            }
             LambdaQueryWrapper<OrderAuctionBond> wrapper= Wrappers.lambdaQuery();
             wrapper.eq(OrderAuctionBond::getOrderId,order.getId());
             OrderAuctionBond orderAuctionBond = orderAuctionBondMapper.selectOne(wrapper);
@@ -1327,8 +1333,6 @@
             goodsGroupPurchaseeVO1.setIsGoodsGroupPurchase(2);
             if (byId1.getGroupNo()!=null){
                 GoodsGroupPurchaseInfo one1 = goodsSkuClient.getGoodsSeckiGoodsGroupPurchaseInfo2(byId1.getGroupNo(), SecurityConstants.INNER).getData();
-
-                if (one1.getGroupStatus()==3){
                     if (one1!=null) {
                         goodsGroupPurchaseeVO1.setCurrentNumber(one1.getCurrentNumber());
                         if (one1.getGroupStatus() == 0) {
@@ -1345,11 +1349,15 @@
                             goodsGroupPurchaseeVO1.setGroupStatus(GroupStatusEnum.GROUP_FAILURE);
                         }
                     }else{
-                        goodsGroupPurchaseeVO1.setGroupStatus(data.getGroupStatus());
-                    }
-                }else{
-                    goodsGroupPurchaseeVO1.setCurrentNumber(one1.getCurrentNumber());
-                    goodsGroupPurchaseeVO1.setGroupStatus(GroupStatusEnum.GROUP_FAILURE);
+                        if (data.getGroupStatus().getCode()==1){
+                            goodsGroupPurchaseeVO1.setGroupStatus(GroupStatusEnum.TO_FORM_A_GROUP);
+                        }
+                        if (data.getGroupStatus().getCode()==2){
+                            goodsGroupPurchaseeVO1.setGroupStatus(GroupStatusEnum.FORMED_INTO_A_GROUP);
+                        }
+                        if (data.getGroupStatus().getCode()==3){
+                            goodsGroupPurchaseeVO1.setGroupStatus(GroupStatusEnum.GROUP_FAILURE);
+                        }
                 }
 
             }

--
Gitblit v1.7.1