puzhibing
3 天以前 a95d0c4bdd96b09342c7ccf9aa1aef4b26b31302
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,9 @@
        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);
            }
            return shop;
        }).collect(Collectors.toList());
        return R.ok(collect);