| | |
| | | package com.hxzk.controller; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.hxzk.pojo.TbLoginLog; |
| | | import com.hxzk.pojo.TbPerson; |
| | | import com.hxzk.pojo.TbSystemOperationLog; |
| | | import com.hxzk.service.SystemLogService; |
| | |
| | | PageInfo<TbSystemOperationLog> cz= systemLogService.findAll(page, limit); |
| | | return resultutil.returnSuccess(cz.getTotal(), cz.getList()); |
| | | } |
| | | |
| | | @GetMapping("findSystemLogSearch") |
| | | result<List<TbSystemOperationLog>> findSystemLogSearch(Integer page, Integer limit, TbSystemOperationLog systemOperationLog){ |
| | | PageInfo<TbSystemOperationLog> cz= systemLogService.findSystemLogSearch(page, limit,systemOperationLog); |
| | | return resultutil.returnSuccess(cz.getTotal(), cz.getList()); |
| | | } |
| | | public String gettime(){ |
| | | Date now = new Date(); |
| | | // 创建日期格式化对象,设置格式为 "yyyy-MM-dd HH:mm" |
| | |
| | | return formattedDate; |
| | | } |
| | | |
| | | public static void InsertSystemLog(String name,String time,String content){ |
| | | public static void InsertSystemLog(String name,String time,String content,String type,String ip){ |
| | | TbSystemOperationLog systemOperationLog = new TbSystemOperationLog(); |
| | | systemOperationLog.setTime(time); |
| | | systemOperationLog.setName(name); |
| | | systemOperationLog.setContent(content); |
| | | systemOperationLog.setType(type); |
| | | systemOperationLog.setIp(ip); |
| | | staticSystemLogService.insertSystem(systemOperationLog); |
| | | } |
| | | } |