Pu Zhibing
1 天以前 f10cb578f9828a21d8ab200b1c3320d29e8e0801
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
@@ -13,8 +13,8 @@
import com.ruoyi.system.api.domain.dto.MerEditUserDto;
import com.ruoyi.system.api.domain.dto.MerPageDto;
import com.ruoyi.system.api.domain.poji.shop.Shop;
import com.ruoyi.system.api.domain.poji.shop.ShopAppointableTime;
import com.ruoyi.system.api.domain.poji.shop.ShopNonAppointableTime;
import com.ruoyi.system.api.domain.poji.shop.TShopAppointableTime;
import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo;
import com.ruoyi.system.api.domain.vo.MerStaffInfoVo;
import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo;
@@ -258,7 +258,7 @@
    @RequestMapping(value = "/confirmReservation/{id}", method = RequestMethod.POST)
    @ApiOperation(value = "商户确认预约【2.0】")
    public R confirmReservation(@PathVariable("id") String id) {
        ShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(id);
        TShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(id);
        if (null == shopAppointableTime) {
            return R.fail("预约不存在");
        }
@@ -274,7 +274,7 @@
    @RequestMapping(value = "/cancelReservation", method = RequestMethod.POST)
    @ApiOperation(value = "商户取消预约【2.0】")
    public R cancelReservation(@RequestBody CancelReservationDto dto) {
        ShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(dto.getId());
        TShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(dto.getId());
        if (null == shopAppointableTime) {
            return R.fail("预约不存在");
        }
@@ -286,4 +286,18 @@
        shopAppointableTimeService.updateById(shopAppointableTime);
        return R.ok();
    }
    @RequestMapping(value = "/getMyShopList", method = RequestMethod.POST)
    @ApiOperation(value = "获取当前账户可切换的门店列表【2.0】")
    public R<List<Shop>> getMyShopList() {
        Long userId = SecurityUtils.getUserId();
        List<ShopRelUser> shopRelUser = shopRelUserService.getByUserId(userId);
        List<Shop> collect = shopRelUser.stream().map(e -> {
            Shop shop = shopService.getById(e.getShopId());
            return shop;
        }).collect(Collectors.toList());
        return R.ok(collect);
    }
}