防止覆盖前端参数

This commit is contained in:
wangliwen 2022-05-11 11:28:19 +08:00
parent 87e93469e8
commit c5377cb7f3
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,9 @@ public class ResourceController {
@ApiImplicitParam(name = "creator", value = "创建者用户id", paramType = "query", dataType = "String")
})
public Result<PageData<ResourceDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
if (!params.containsKey("del_flag")) {
params.put("del_flag", 0);
}
PageData<ResourceDTO> page = resourceService.page(params);
page.getList().forEach(item -> {
item.setInfoList(resourceService.selectAttrsByResourceId(item.getId()));