fix: 修复查询工作空间下项目列表的问题

This commit is contained in:
Captain.B 2021-06-18 16:55:02 +08:00 committed by 刘瑞斌
parent 94efd8d80e
commit 46eed47c00
2 changed files with 7 additions and 1 deletions

View File

@ -62,6 +62,12 @@
#{value}
</foreach>
</when>
<when test="key == 'workspace_id'">
AND p.workspace_id IN
<foreach collection="values" item="value" separator="," open="(" close=")">
#{value}
</foreach>
</when>
</choose>
</if>
</foreach>

View File

@ -90,7 +90,7 @@ public class ProjectController {
if (StringUtils.isBlank(request.getProjectId())) {
List<String> sourceIds = SessionUtils.getUser().getUserGroups().stream().map(UserGroup::getSourceId).collect(Collectors.toList());
request.setFilters(new HashMap<String, List<String>>() {{
put("project_id", sourceIds);
put("workspace_id", sourceIds);
}});
}
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);