| | |
| | | */ |
| | | @GetMapping("/getDeptAdvice") |
| | | @ApiOperation(value = "根据项目id获取建议") |
| | | public AjaxResult getDeptAdvice(@ApiParam(value = "父项目项目id") @RequestParam(required = false) String proId) { |
| | | public AjaxResult getDeptAdvice(@ApiParam(value = "父项目项目id") @RequestParam(required = false) String proId, |
| | | @ApiParam(value = "内容") @RequestParam(required = false) String nr, |
| | | @ApiParam(value = "拼音码") @RequestParam(required = false) String pym, |
| | | @ApiParam(value = "页码") @RequestParam(defaultValue ="1") int page, |
| | | @ApiParam(value = "每页展示条数") @RequestParam(defaultValue ="10") int pageSize) { |
| | | LambdaQueryWrapper<TjAdvice> wq1 = new LambdaQueryWrapper<>(); |
| | | if(null !=proId){ |
| | | wq1.eq(TjAdvice::getProId, proId); |
| | | } |
| | | wq1.last("limit 20"); |
| | | List<TjAdvice> list = tjAdviceService.list(wq1); |
| | | return AjaxResult.success(list); |
| | | if(null !=nr && !nr.isEmpty()){ |
| | | wq1.like(TjAdvice::getTitle,nr); |
| | | }else if (null !=pym && !pym.isEmpty()){ |
| | | wq1.like(TjAdvice::getTitle,pym); |
| | | } |
| | | // else { |
| | | // wq1.last("limit 20"); |
| | | // } |
| | | Page<TjAdvice> pages=new Page<>(page,pageSize); |
| | | Page<TjAdvice> advicePage = tjAdviceService.page(pages, wq1); |
| | | Map<String,Object> map=new HashMap<>(); |
| | | map.put("list",advicePage.getRecords()); |
| | | map.put("total",advicePage.getTotal()); |
| | | // List<TjAdvice> list = tjAdviceService.list(wq1); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | /** |