use of com.ikoori.vip.common.persistence.model.OperationLog in project vip by guangdada.
the class LogController method list.
/**
* 查询操作日志列表
*/
@RequestMapping("/list")
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Object list(@RequestParam(required = false) String beginTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String logName, @RequestParam(required = false) Integer logType) {
Page<OperationLog> page = new PageFactory<OperationLog>().defaultPage();
List<Map<String, Object>> result = logDao.getOperationLogs(page, beginTime, endTime, logName, BizLogType.valueOf(logType), page.getOrderByField(), page.isAsc());
page.setRecords((List<OperationLog>) new LogWarpper(result).warp());
return super.packForBT(page);
}
use of com.ikoori.vip.common.persistence.model.OperationLog in project vip by guangdada.
the class LoginLogController method list.
/**
* 查询登录日志列表
*/
@RequestMapping("/list")
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Object list(@RequestParam(required = false) String beginTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String logName) {
Page<OperationLog> page = new PageFactory<OperationLog>().defaultPage();
List<Map<String, Object>> result = logDao.getLoginLogs(page, beginTime, endTime, logName, page.getOrderByField(), page.isAsc());
page.setRecords((List<OperationLog>) new LogWarpper(result).warp());
return super.packForBT(page);
}
use of com.ikoori.vip.common.persistence.model.OperationLog in project vip by guangdada.
the class LogTaskFactory method exceptionLog.
public static TimerTask exceptionLog(final Integer userId, final Exception exception) {
return new TimerTask() {
@Override
public void run() {
String msg = ToolUtil.getExceptionMsg(exception);
OperationLog operationLog = LogFactory.createOperationLog(LogType.EXCEPTION, userId, "", null, null, msg, LogSucceed.FAIL);
try {
operationLogMapper.insert(operationLog);
} catch (Exception e) {
logger.error("创建异常日志异常!", e);
}
}
};
}
use of com.ikoori.vip.common.persistence.model.OperationLog in project vip by guangdada.
the class LogFactory method createOperationLog.
/**
* 创建操作日志
*
* @author fengshuonan
* @Date 2017/3/30 18:45
*/
public static OperationLog createOperationLog(LogType logType, Integer userId, String bussinessName, String clazzName, String methodName, String msg, LogSucceed succeed) {
OperationLog operationLog = new OperationLog();
operationLog.setLogtype(logType.getMessage());
operationLog.setLogname(bussinessName);
operationLog.setUserid(userId);
operationLog.setClassname(clazzName);
operationLog.setMethod(methodName);
operationLog.setCreatetime(new Date());
operationLog.setSucceed(succeed.getMessage());
operationLog.setMessage(msg);
return operationLog;
}
use of com.ikoori.vip.common.persistence.model.OperationLog in project vip by guangdada.
the class LogController method detail.
/**
* 查询操作日志详情
*/
@RequestMapping("/detail/{id}")
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Object detail(@PathVariable Integer id) {
OperationLog operationLog = operationLogMapper.selectById(id);
Map<String, Object> stringObjectMap = BeanKit.beanToMap(operationLog);
return super.warpObject(new LogWarpper(stringObjectMap));
}
Aggregations