From 1c8094cf26b17a2f872691f8c52e3dd238ad4e26 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 15 一月 2025 09:11:32 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java         |    4 ++--
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java      |    3 ++-
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java |    2 +-
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java      |    8 ++++----
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
index 992a1c5..47148b8 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -132,8 +132,8 @@
             @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "String"),
     })
     @GetMapping("/writeOff")
-    public R<Void> writeOff(String id, Integer shopId, String technicianId){
-        orderService.writeOff(id, shopId, technicianId);
+    public R<Void> writeOff(String code, Integer shopId, String technicianId){
+        orderService.writeOff(code, shopId, technicianId);
         return R.ok();
     }
 
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 9c40947..579cf54 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
@@ -251,7 +251,7 @@
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void writeOff(String id,Integer shopId, String technicianId) {
+    public void writeOff(String id, Integer shopId, String technicianId) {
         LoginUser loginUserApplet = tokenService.getLoginUserApplet();
         Order order = orderMapper.selectById(id);
         boolean check = check(order, shopId, loginUserApplet.getUserid());
@@ -598,6 +598,7 @@
             userPoint.setAppUserId(order.getAppUserId());
             userPoint.setObjectId(order.getId());
             userPointClient.saveUserPoint(userPoint);
+            appUserClient.editAppUserById(appUser);
         }
 
         order.setRefundStatus(2);
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
index a3cf3d9..a5b2e91 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
@@ -110,8 +110,8 @@
 		refundPass.setPhone(jsonObject.getString("phone"));
 		refundPass.setAddress(jsonObject.getString("address"));
 		this.save(refundPass);
+		order.setOldOrderStatus(order.getOrderStatus());
 		order.setOrderStatus(7);
-		order.setOldOrderStatus(7);
 		orderService.updateById(order);
 		return R.ok();
 	}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
index 45d27ed..68927ec 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -585,14 +585,14 @@
             if(null == bargainPriceDetail){
                 //没有门店特价,判断地区价格配置
                 LambdaQueryWrapper<GoodsArea> queryWrapper = new LambdaQueryWrapper<GoodsArea>().eq(GoodsArea::getGoodsId, goodsId).eq(GoodsArea::getVip, vip);
-                if(StringUtils.isNotEmpty(districtCode)){
-                    queryWrapper.eq(GoodsArea::getDistrictsCode, districtCode);
+                if(StringUtils.isNotEmpty(provinceCode)){
+                    queryWrapper.eq(GoodsArea::getProvinceCode, provinceCode);
                 }
                 if(StringUtils.isNotEmpty(cityCode)){
                     queryWrapper.and(i -> i.eq(GoodsArea::getCityCode, cityCode).or().isNull(GoodsArea::getCityCode));
                 }
-                if(StringUtils.isNotEmpty(provinceCode)){
-                    queryWrapper.and(i -> i.eq(GoodsArea::getProvinceCode, provinceCode).or().isNull(GoodsArea::getProvinceCode));
+                if(StringUtils.isNotEmpty(districtCode)){
+                    queryWrapper.and(i -> i.eq(GoodsArea::getDistrictsCode, districtCode).or().isNull(GoodsArea::getDistrictsCode));
                 }
                 GoodsArea goodsArea = goodsAreaService.getOne(queryWrapper);
                 if(null == goodsArea){

--
Gitblit v1.7.1