From 6c3f781630bc0c559ceca1a69d4c9e7e33e5daf1 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期二, 23 九月 2025 17:47:32 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
index b997c44..3dedf93 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
@@ -283,7 +283,7 @@
     @RequestMapping(value = "/cancelReservation", method = RequestMethod.POST)
     @ApiOperation(value = "商户取消预约【2.0】")
     public R cancelReservation(@RequestBody CancelReservationDto dto) {
-        TShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(dto.getId());
+        TShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(dto.getAppointmentId());
         if (null == shopAppointableTime) {
             return R.fail("预约不存在");
         }
@@ -291,7 +291,7 @@
             return R.fail("不能重复操作");
         }
         shopAppointableTime.setStatus(0);
-        shopAppointableTime.setReason(dto.getReason());
+        shopAppointableTime.setReason(dto.getCancelReason());
         shopAppointableTimeService.updateById(shopAppointableTime);
         return R.ok();
     }
@@ -303,6 +303,12 @@
         List<ShopRelUser> shopRelUser = shopRelUserService.getByUserId(userId);
         List<Shop> collect = shopRelUser.stream().map(e -> {
             Shop shop = shopService.getById(e.getShopId());
+            if (e.getIsDefault()==1){
+                shop.setIsDefault(true);
+            }
+            if(null != shop && 1 == shop.getShopType()){
+                shop.setModifyPricePermission(1);
+            }
             return shop;
         }).collect(Collectors.toList());
         return R.ok(collect);

--
Gitblit v1.7.1