package com.red.circle.console.adapter.admin;

import com.red.circle.console.app.dto.clienobject.admin.OperationLogCO;
import com.red.circle.console.app.dto.cmd.admin.PageOperationLogQryCmd;
import com.red.circle.console.app.service.admin.OperationReqLogService;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.web.controller.BaseController;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 系统操作日志.
 *
 * @author pengliang on 2019/5/26 16:02
 */
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/operation/log", produces = MediaType.APPLICATION_JSON_VALUE)
public class OperationLogRestController extends BaseController {

  private final OperationReqLogService operationReqLogService;

  /**
   * 获取系统操作日志分页列表.
   */
  @GetMapping(value = "/page")
  public PageResult<OperationLogCO> pageLog(PageOperationLogQryCmd cmd) {
    return operationReqLogService.pageLog(cmd);
  }

}
