/resource/page 接口支持传部门id过滤
This commit is contained in:
parent
0aede1e910
commit
0f4d2c0bd0
|
@ -121,7 +121,8 @@ public class ResourceController {
|
|||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "creator", value = "创建者用户id", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "delFlag", value = "创建者用户id", paramType = "query", dataType = "String")
|
||||
@ApiImplicitParam(name = "delFlag", value = "创建者用户id", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "deptId", value = "资源所属部门id", paramType = "query", dataType = "String")
|
||||
})
|
||||
public Result<PageData<ResourceDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
PageData<ResourceDTO> page = resourceService.page(params);
|
||||
|
|
|
@ -295,6 +295,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
case "creator":
|
||||
wrapper.eq(StringUtils.isNotBlank(params.get("creator").toString()), "creator", params.get("creator").toString());
|
||||
break;
|
||||
case "deptId":
|
||||
wrapper.eq(StringUtils.isNotBlank(params.get("deptId").toString()), "dept_id", Long.parseLong(params.get("deptId").toString()));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue