提交 ae9589c9 authored 作者: 吕本才's avatar 吕本才

1、增加默认分页参数,查询已授权的人员信息

上级 d936bb8a
......@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 积木报表授权查询接口
*
......@@ -31,9 +33,9 @@ public class JimuReportAuthQueryController extends BaseController {
*/
@GetMapping("/list/user")
@RequiresPermissions(value = {"report:auth:userlist"})
public R<PageInfo<SysUser>> selectUserList(String reportId) {
public R<List<SysUser>> selectUserList(String reportId) {
PageInfo<SysUser> userPageInfo = authQueryService.selectUserList(reportId);
return R.ok(userPageInfo);
return R.ok(userPageInfo.getRows());
}
}
......@@ -6,6 +6,8 @@ import com.link.report.pojo.response.JimuReportAuthListDto;
import com.link.report.service.query.JimuReportAuthQueryService;
import com.sfa.common.core.constant.SecurityConstants;
import com.sfa.common.core.domain.R;
import com.sfa.common.core.text.Convert;
import com.sfa.common.core.utils.ServletUtils;
import com.sfa.common.core.web.domain.PageInfo;
import com.sfa.common.core.web.page.TableSupport;
import com.sfa.system.api.RemoteUserService;
......@@ -41,7 +43,10 @@ public class JimuReportAuthQueryServiceImpl implements JimuReportAuthQueryServic
if (jimuReportListDtos != null && !jimuReportListDtos.isEmpty()) {
// 远程调用查询用户列表分页信息
List<Long> userIds = jimuReportListDtos.stream().map(JimuReportAuthListDto::getUserId).collect(Collectors.toList());
R<PageInfo<SysUser>> userInfoByIds = remoteUserService.getUserInfoByIds(userIds,SecurityConstants.INNER);
Integer pageNum = Convert.toInt(ServletUtils.getParameter(TableSupport.PAGE_NUM), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter(TableSupport.PAGE_SIZE), 10000);
// 远程方法是分页方法,此处传默认分页数据
R<PageInfo<SysUser>> userInfoByIds = remoteUserService.getUserInfoByIds(pageSize,pageNum, userIds,SecurityConstants.INNER);
return userInfoByIds.getData();
}else{
return TableSupport.pageInfo();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论