bug
jiangqs
2023-08-24 30bc5274884e0f6d11580f9d3af9e71d7a320888
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java
@@ -151,10 +151,10 @@
    @PostMapping("/getShopByBelongUserId")
    public R<ShopRelUserVo> getShopByBelongUserId(@RequestBody Long userId)
    {
        Shop shop = shopService.getShopByBelongUserId(userId);
        Optional.ofNullable(shop).orElseThrow(() -> new ServiceException("未查询到商户信息"));
        List<Shop> shopList = shopService.getShopByBelongUserId(userId);
        Optional.ofNullable(shopList.get(0)).orElseThrow(() -> new ServiceException("未查询到商户信息"));
        ShopRelUserVo shopRelUserVo = new ShopRelUserVo();
        shopRelUserVo.setShopId(shop.getShopId());
        shopRelUserVo.setShopId(shopList.get(0).getShopId());
        return R.ok(shopRelUserVo);
    }