import { request } from '../../boot/axios';
import { Pagination } from '../class';
import { LoginInfoSearchEntity } from './model/Log';
import { PortLogSearchEntity } from './model/portLog';
const pathName = 'portlog';

class LogApi {
  getPageByLoginfor = (val: Pagination<LoginInfoSearchEntity>) => {
    return request.postForPage('loginInfo/page', val);
  };

  getPageByOperLog = (val?: Pagination<any>) => {
    return request.postForPage('operlog/page', val);
  };
  // SAP 接口日志
  getPortPage = (val: Pagination<PortLogSearchEntity>) => {
    return request.postForPage(`${pathName}/page`, val);
  };
  // SAP 接口请求
  retry = (val: any) => {
    return request.get(`${pathName}/retry/${val}`);
  };
}

const logApi = new LogApi();
export { logApi };
