查询我的发布
This commit is contained in:
parent
f4090ec01c
commit
828d6baae4
|
@ -44,7 +44,7 @@ public class ResourceController {
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = "type", value = "类型", paramType = "query", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "type", value = "类型", paramType = "query", required = true, dataType = "String"),
|
||||||
//@ApiImplicitParam(name = "name", value = "资源名称", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = "name", value = "资源名称", paramType = "query", dataType="String") ,
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", 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 = "creator", value = "创建者用户id", paramType = "query", dataType = "String")
|
||||||
|
|
|
@ -59,13 +59,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
|
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
|
||||||
QueryWrapper<ResourceEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<ResourceEntity> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("type", params.get("type").toString())
|
wrapper.eq("type", params.get("type").toString())
|
||||||
//.like(StringUtils.isNotBlank(params.get("name").toString()),"name", params.get("name").toString())
|
.like(StringUtils.isNotBlank(params.get("name").toString()),"name", params.get("name").toString())
|
||||||
.orderByDesc("create_date");
|
.orderByDesc("create_date")
|
||||||
if (params.containsKey("creator")) { //查该用户创建的资源
|
.eq("creator", params.get("creator").toString())
|
||||||
wrapper.eq("creator", params.get("creator").toString());
|
.eq("del_flag", 0);
|
||||||
} else { // 公共页(只出正常的)
|
|
||||||
wrapper.eq("del_flag", 0);
|
|
||||||
}
|
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue