|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/operateLog/list/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R list(@RequestParam(defaultValue = "1")Integer curr, | 
|---|
|  |  |  | @RequestParam(defaultValue = "10")Integer limit, | 
|---|
|  |  |  | @RequestParam(required = false)String orderByField, | 
|---|
|  |  |  | @RequestParam(required = false)String orderByType, | 
|---|
|  |  |  | @RequestParam Map<String, Object> param){ | 
|---|
|  |  |  | public R list(@RequestParam(defaultValue = "1") Integer curr, | 
|---|
|  |  |  | @RequestParam(defaultValue = "10") Integer limit, | 
|---|
|  |  |  | @RequestParam(required = false) String orderByField, | 
|---|
|  |  |  | @RequestParam(required = false) String orderByType, | 
|---|
|  |  |  | @RequestParam Map<String, Object> param) { | 
|---|
|  |  |  | excludeTrash(param); | 
|---|
|  |  |  | EntityWrapper<OperateLog> wrapper = new EntityWrapper<>(); | 
|---|
|  |  |  | convert(param, wrapper); | 
|---|
|  |  |  | 
|---|
|  |  |  | return R.ok(operateLogService.selectPage(new Page<>(curr, limit), wrapper)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private void convert(Map<String, Object> map, EntityWrapper wrapper){ | 
|---|
|  |  |  | for (Map.Entry<String, Object> entry : map.entrySet()){ | 
|---|
|  |  |  | private void convert(Map<String, Object> map, EntityWrapper wrapper) { | 
|---|
|  |  |  | for (Map.Entry<String, Object> entry : map.entrySet()) { | 
|---|
|  |  |  | if (entry.getKey().endsWith(">")) { | 
|---|
|  |  |  | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); | 
|---|
|  |  |  | } else if (entry.getKey().endsWith("<")) { | 
|---|
|  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/operateLog/edit/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R edit(OperateLog operateLog) { | 
|---|
|  |  |  | if (Cools.isEmpty(operateLog)){ | 
|---|
|  |  |  | if (Cools.isEmpty(operateLog)) { | 
|---|
|  |  |  | return R.error(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (null == operateLog.getId()){ | 
|---|
|  |  |  | if (null == operateLog.getId()) { | 
|---|
|  |  |  | operateLogService.insert(operateLog); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | operateLogService.updateById(operateLog); | 
|---|
|  |  |  | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/operateLog/update/auth") | 
|---|
|  |  |  | @RequestMapping(value = "/operateLog/update/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R update(OperateLog operateLog){ | 
|---|
|  |  |  | if (Cools.isEmpty(operateLog) || null==operateLog.getId()){ | 
|---|
|  |  |  | public R update(OperateLog operateLog) { | 
|---|
|  |  |  | if (Cools.isEmpty(operateLog) || null == operateLog.getId()) { | 
|---|
|  |  |  | return R.error(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | operateLogService.updateById(operateLog); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/operateLog/delete/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R delete(Integer[] ids){ | 
|---|
|  |  |  | if (Cools.isEmpty(ids)){ | 
|---|
|  |  |  | public R delete(Integer[] ids) { | 
|---|
|  |  |  | if (Cools.isEmpty(ids)) { | 
|---|
|  |  |  | return R.error(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | operateLogService.deleteBatchIds(Arrays.asList(ids)); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/operateLog/export/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R export(@RequestBody JSONObject param){ | 
|---|
|  |  |  | public R export(@RequestBody JSONObject param) { | 
|---|
|  |  |  | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); | 
|---|
|  |  |  | EntityWrapper<OperateLog> wrapper = new EntityWrapper<>(); | 
|---|
|  |  |  | Map<String, Object> map = excludeTrash(param.getJSONObject("operateLog")); | 
|---|
|  |  |  | 
|---|
|  |  |  | wrapper.like("id", condition); | 
|---|
|  |  |  | Page<OperateLog> page = operateLogService.selectPage(new Page<>(0, 10), wrapper); | 
|---|
|  |  |  | List<Map<String, Object>> result = new ArrayList<>(); | 
|---|
|  |  |  | for (OperateLog operateLog : page.getRecords()){ | 
|---|
|  |  |  | for (OperateLog operateLog : page.getRecords()) { | 
|---|
|  |  |  | Map<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | map.put("id", operateLog.getId()); | 
|---|
|  |  |  | map.put("value", operateLog.getId()); | 
|---|