From 513961ecebcfd0619ede7a7edb7ac5e27de28d26 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 01 一月 2025 17:11:23 +0800 Subject: [PATCH] 增加第三方支付 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java index 6e85163..b5793fe 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java @@ -230,9 +230,6 @@ if (!check){ throw new ServiceException("订单不存在"); } - order.setOrderStatus(OrderStatus.COMPLETED.getCode()); - orderMapper.updateById(order); - Integer orderType = order.getOrderType(); // 售后设置 R<BaseSetting> baseSettingR = baseSettingClient.getBaseSetting(5); @@ -246,9 +243,11 @@ String content = baseSetting.getContent(); JSONObject jsonObject = JSONObject.parseObject(content); Long days = jsonObject.getLong("days"); - if (days != null && days > 0){ - commissionService.addToCommissionDelayQueue(order.getId(), LocalDateTime.now().plusDays(days)); - } + order.setOrderStatus(OrderStatus.COMPLETED.getCode()); + order.setIsCommission(0); + order.setAfterSaleTime(LocalDateTime.now().plusDays(days)); + order.setEndTime(LocalDateTime.now()); + orderMapper.updateById(order); } @@ -420,7 +419,7 @@ PointSetting pointSetting = pointSettingClient.getPointSetting(vipDemotion ? appUser.getVipId() - 1 : appUser.getVipId()).getData(); int earnPoint1 = getPoint; if(null != pointSetting && 1 == pointSetting.getBuyPointOpen()){ - earnPoint1 = getPoint / (100 - pointSetting.getBuyPoint()); + earnPoint1 = new BigDecimal(getPoint).divide(pointSetting.getBuyPoint().divide(new BigDecimal(100))).intValue(); } appUser.setLavePoint(lavePoint - getPoint); appUser.setShopPoint(appUser.getShopPoint() - earnPoint1); -- Gitblit v1.7.1