Commit 918c6b9c authored by zhangyingbin's avatar zhangyingbin

修改管材资源列表查询接口

parent 557b2681
...@@ -23,6 +23,7 @@ import java.util.HashMap; ...@@ -23,6 +23,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -151,10 +152,15 @@ public class MaterialController extends BaseController { ...@@ -151,10 +152,15 @@ public class MaterialController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping( value = "/pageOutList") @GetMapping( value = "/pageOutList")
@ApiOperation(httpMethod = "GET",value = "材料信息表分页查询", notes = "材料信息表分页查询") @ApiOperation(httpMethod = "GET",value = "材料信息表分页查询", notes = "材料信息表分页查询")
public ResponseModel<IPage<MaterialDto>> queryPage( int current, int size, MaterialDto material) { public ResponseModel<IPage<MaterialDto>> queryPage(@RequestParam(required=false) Integer current,@RequestParam(required=false) Integer size, MaterialDto material) {
IPage<Material> page = new Page<>(); IPage<Material> page = new Page<>();
page.setCurrent(current); if(ValidationUtil.isEmpty(current) && ValidationUtil.isEmpty(size)){
page.setSize(size); page.setCurrent(1);
page.setSize(Long.MAX_VALUE);
} else{
page.setCurrent(current);
page.setSize(size);
}
return ResponseHelper.buildResponse(materialServiceImpl.queryOutPage(page,material)); return ResponseHelper.buildResponse(materialServiceImpl.queryOutPage(page,material));
} }
......
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