| | |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | // EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | // excludeTrash(param); |
| | | // convert(param, wrapper); |
| | | // if (!Cools.isEmpty(orderByField)){ |
| | | // wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | // } |
| | | // Page<Mat> page = matService.selectPage(new Page<>(curr, limit), wrapper); |
| | | // |
| | | // return R.ok().add(page); |
| | | Object tagId = param.get("tag_id"); |
| | | if (Cools.isEmpty(tagId)) { |
| | | tagId = getOriginTag().getId(); |
| | | } |
| | | Page<Mat> page = matService.selectPage(new Page<>(curr, limit), wrapper); |
| | | return R.ok(matService.getPage(new Page<>(curr, limit), String.valueOf(tagId))); |
| | | |
| | | return R.ok().add(page); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |