package com.younike.admin.controller.system.monitor;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.younike.common.core.controller.BaseController;
import com.younike.common.core.page.PageDomain;
import com.younike.common.core.page.PageParam;
import com.younike.common.core.page.TableSupport;
import com.younike.service.pojo.SysLogininfor;
import com.younike.service.service.ISysLogininforService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenpengfei
 */
@RestController
@RequestMapping("/monitor/logininfor")
public class SysLogininforController extends BaseController {

    @Autowired
    private ISysLogininforService sysLogininforService;

    /**
     * 登录信息列表
     *
     * @param sysLogininfor
     * @return
     */
    @GetMapping("/list")
    public Page list(SysLogininfor sysLogininfor) {

        PageDomain pageDomain = TableSupport.buildPageRequest();
        Integer pageNum = pageDomain.getPageNum();
        Integer pageSize = pageDomain.getPageSize();
        PageParam pageParam = new PageParam(pageNum,pageSize);

        Page<SysLogininfor> sysOperLogs = (Page<SysLogininfor>) sysLogininforService.selectLogininforList(pageParam,sysLogininfor);
        return sysOperLogs;
    }
}
