增加过滤字段

parent eff7a397
...@@ -57,7 +57,9 @@ public class DqPersonelController { ...@@ -57,7 +57,9 @@ public class DqPersonelController {
@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 = 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 = "idcard", value = "身份证号", paramType = "query", dataType="String"),
@ApiImplicitParam(name = "dqRegionId", value = "社区id", paramType = "query", dataType="int")
}) })
@RequiresPermissions("dq:dqpersonel:page") @RequiresPermissions("dq:dqpersonel:page")
@DataFilter() @DataFilter()
......
...@@ -41,9 +41,11 @@ public class DqPersonelServiceImpl extends CrudServiceImpl<DqPersonelDao, DqPers ...@@ -41,9 +41,11 @@ public class DqPersonelServiceImpl extends CrudServiceImpl<DqPersonelDao, DqPers
@Override @Override
public QueryWrapper<DqPersonelEntity> getWrapper(Map<String, Object> params){ public QueryWrapper<DqPersonelEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id"); String id = (String)params.get("id");
String idcard = (String)params.get("idcard");
Integer dqRegionId = (Integer) params.get("dqRegionId");
QueryWrapper<DqPersonelEntity> wrapper = new QueryWrapper<>(); QueryWrapper<DqPersonelEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id).orderByDesc("dq_region_id"); wrapper.eq(StringUtils.isNotBlank(id), "id", id).like("idcard",idcard).eq("dq_region_id",dqRegionId).orderByDesc("dq_region_id");
if(params.get(Constant.SQL_FILTER)!=null){ if(params.get(Constant.SQL_FILTER)!=null){
wrapper.apply(params.get(Constant.SQL_FILTER) != null, params.get(Constant.SQL_FILTER).toString()); wrapper.apply(params.get(Constant.SQL_FILTER) != null, params.get(Constant.SQL_FILTER).toString());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment