Search in sources :

Example 1 with LogWarpper

use of com.ikoori.vip.server.modular.system.warpper.LogWarpper 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);
}
Also used : LogWarpper(com.ikoori.vip.server.modular.system.warpper.LogWarpper) OperationLog(com.ikoori.vip.common.persistence.model.OperationLog) Map(java.util.Map) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 2 with LogWarpper

use of com.ikoori.vip.server.modular.system.warpper.LogWarpper 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);
}
Also used : LogWarpper(com.ikoori.vip.server.modular.system.warpper.LogWarpper) OperationLog(com.ikoori.vip.common.persistence.model.OperationLog) Map(java.util.Map) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 3 with LogWarpper

use of com.ikoori.vip.server.modular.system.warpper.LogWarpper 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));
}
Also used : LogWarpper(com.ikoori.vip.server.modular.system.warpper.LogWarpper) OperationLog(com.ikoori.vip.common.persistence.model.OperationLog) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

Permission (com.ikoori.vip.common.annotion.Permission)3 OperationLog (com.ikoori.vip.common.persistence.model.OperationLog)3 LogWarpper (com.ikoori.vip.server.modular.system.warpper.LogWarpper)3 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)3 Map (java.util.Map)2