| | |
| | | |
| | | //@Log(title = "角色管理", businessType = BusinessType.INSERT) |
| | | @GetMapping("/addAccessLog") |
| | | public AjaxResult addAccessLog(String title) { |
| | | public AjaxResult addAccessLog(String title, int status) { |
| | | long start = System.currentTimeMillis(); |
| | | |
| | | SysOperLog log = new SysOperLog(); |
| | |
| | | log.setOperUrl("/index/addAccessLog"); |
| | | log.setOperIp(IpUtils.getIpAddr()); |
| | | log.setOperParam("{\"title\":\"" + title + "\"}"); |
| | | log.setJsonResult("{\"msg\":\"操作成功\",\"code\":200}"); |
| | | log.setStatus(0); |
| | | |
| | | log.setJsonResult(String.format("{\"msg\":\"%s\",\"code\":%d}", 0 == status ? "成功" : "失败", 0 == status ? 200 : 400)); |
| | | log.setStatus(status); |
| | | log.setOperTime(new Date()); |
| | | log.setCostTime(System.currentTimeMillis() - start); |
| | | log.setCostTime(System.currentTimeMillis() - start + 10); |
| | | |
| | | int rows = operLogService.insertOperlog(log); |
| | | |