puzhibing
2024-01-30 03f1f3372a10a08f96f3308bfa099e86a55046d0
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
@@ -1249,7 +1249,7 @@
                userIdList.add(mgtBasePlatformDto.getUserId());
            } else {
                MgtUserIdByDept mgtUserIdByDept = new MgtUserIdByDept();
                mgtUserIdByDept.setDeptId(mgtBasePlatformDto.getUserId());
                mgtUserIdByDept.setDeptId(mgtBasePlatformDto.getDeptId());
                mgtUserIdByDept = configService.getUserIdByDept(mgtUserIdByDept).getData();
                userIdList = mgtUserIdByDept.getUserIdList();
            }
@@ -1259,13 +1259,15 @@
        }
        //数据权限
        List<Long> userIds = remoteUserService.getScopeOfAuthorityUserId();
        List<Long> userIdList = mgtBasePlatformDto.getUserIdList();
        if(null != userIdList){
            userIdList.addAll(userIds);
        }else{
            userIdList = userIds;
        if(null != userIds){
            List<Long> userIdList = mgtBasePlatformDto.getUserIdList();
            if(null != userIdList){
                userIdList.addAll(userIds);
            }else{
                userIdList = userIds;
            }
            mgtBasePlatformDto.setUserIdList(userIdList);
        }
        mgtBasePlatformDto.setUserIdList(userIdList);
        //获取基础统计
        MgtPlTotalShopTotalVo plTotalShopTotalVo = shopMapper.getPlTotalShopTotal(userIds);
@@ -1936,10 +1938,14 @@
     */
    @Override
    public List<Shop> getShopBySysUserIds(List<Long> userIds) {
        if(userIds.size() == 0){
            userIds.add(0L);
        if(null == userIds || userIds.size() == 0){
            return new ArrayList<>();
        }
        List<Shop> list = this.list(new QueryWrapper<Shop>().eq("del_flag", 0).ne("shop_status", -1).in("belong_user_id", userIds));
        QueryWrapper<Shop> queryWrapper = new QueryWrapper<Shop>().eq("del_flag", 0).ne("shop_status", -1);
        if(null != userIds && userIds.size() > 0){
            queryWrapper.in("belong_user_id", userIds);
        }
        List<Shop> list = this.list(queryWrapper);
        return list;
    }
}