| | |
| | | wrapper.orderBy("create_time",false); |
| | | return R.ok(basArmMastService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | @RequestMapping(value = "/basArmMast/listArm/auth") |
| | | @ManagerAuth |
| | | public R listArm(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<BasArmMast> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasArmMast.class, param.keySet(), wrapper, condition); |
| | | |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | wrapper.orderBy("create_time", false); |
| | | |
| | | // 如果不需要分页,使用 selectList() 获取所有数据 |
| | | List<BasArmMast> allData = basArmMastService.selectList(wrapper); |
| | | |
| | | return R.ok(allData); // 直接返回所有数据 |
| | | } |
| | | |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |