puzhibing
2024-01-24 8da101629c47cec91d68f785b0f5e829d4a9bab1
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
@@ -552,25 +552,13 @@
     * @return
     */
    @Override
    public List<MgtShopPageVo> pageMgtShop(Page page, MgtShopPageDto mgtShopPageDto){
    public List<MgtShopPageVo> pageMgtShop(Page page, MgtShopPageDto mgtShopPageDto,List<Long> scope){
        if (StringUtils.isNotBlank(mgtShopPageDto.getShopTags())) {
            mgtShopPageDto.setShopTags(mgtShopPageDto.getShopTags().replace(",", "|"));
        }
        List<Long> belongUserIds = null;
        if(null != mgtShopPageDto.getDeptId()){
            if(null != mgtShopPageDto.getBelongUserId()){
                belongUserIds = new ArrayList<>();
                belongUserIds.add(mgtShopPageDto.getBelongUserId());
            }else{
                R<List<SysUser>> r = sysUserService.getUsersByDeptId(mgtShopPageDto.getDeptId());
                if(r.getCode() != 200){
                    throw new RuntimeException(r.getMsg());
                }
                belongUserIds = r.getData().stream().map(SysUser::getUserId).collect(Collectors.toList());
            }
        }
        // 分页查询商铺信息
        List<MgtShopPageVo> mgtShopPageVoList = shopMapper.pageMgtShop(page, mgtShopPageDto, belongUserIds);
        List<MgtShopPageVo> mgtShopPageVoList = shopMapper.pageMgtShop(page, mgtShopPageDto,scope);
        // 如果查询结果不为空
        if (!mgtShopPageVoList.isEmpty()) {
            // 创建签约用户ID集合和所属用户ID集合
@@ -1056,8 +1044,8 @@
     * @return  List<MgtShopListSimpleVo>
     */
    @Override
    public List<MgtShopListSimpleVo> listMgtShopSimpleVo(MgtShopListDto mgtShopListDto){
        return shopMapper.listMgtShopSimpleVo(mgtShopListDto);
    public List<MgtShopListSimpleVo> listMgtShopSimpleVo(MgtShopListDto mgtShopListDto,List<Long> scope){
        return shopMapper.listMgtShopSimpleVo(mgtShopListDto,scope);
    }
    /**
@@ -1094,8 +1082,8 @@
     * @date 2023/6/14 23:01
     */
    @Override
    public List<MgtShopAuthPageVo> pageMgtShopAuth(Page page,  MgtShopAuthPageDto mgtShopAuthPageDto){
        return shopMapper.pageMgtShopAuth(page, mgtShopAuthPageDto);
    public List<MgtShopAuthPageVo> pageMgtShopAuth(Page page,  MgtShopAuthPageDto mgtShopAuthPageDto,List<Long> scope){
        return shopMapper.pageMgtShopAuth(page, mgtShopAuthPageDto,scope);
    }
    /**
@@ -1105,8 +1093,9 @@
     * @return
     */
    @Override
    public List<MgtShopHFTXAuthPageVo> pageMgtShopHFTXAuth(Page page, MgtShopHFTXAuthPageDto mgtShopAuthPageDto) {
        return shopMapper.pageMgtShopHFTXAuth(page, mgtShopAuthPageDto);
    public List<MgtShopHFTXAuthPageVo> pageMgtShopHFTXAuth(Page page, MgtShopHFTXAuthPageDto mgtShopAuthPageDto,
                                                           List<Long> scope) {
        return shopMapper.pageMgtShopHFTXAuth(page, mgtShopAuthPageDto,scope);
    }
    /**