| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasCrnErrorLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy("create_time", false); |
| | | } else { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basCrnErrorLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | /** |
| | | * 根据精确的 createTime 查询 |
| | | */ |
| | | @RequestMapping(value = "/basCrnErrorLog/listByUuid/auth") |
| | | @ManagerAuth |
| | | public R listByUuid(@RequestParam String uuid, |
| | | @RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit) { |
| | | |
| | | EntityWrapper<BasCrnErrorLog> wrapper = new EntityWrapper<>(); |
| | | // 精确匹配当天的数据,或者某个具体时间 |
| | | wrapper.eq("id", uuid); // 如果希望精确到秒 |
| | | |
| | | Page<BasCrnErrorLog> page = basCrnErrorLogService.selectPage(new Page<>(curr, limit), wrapper); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |