Pu Zhibing
3 天以前 6f5e0af7b4e3c4e6d2bcd33bafb6649727e98b37
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
@@ -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);
    }
}