package org.jk.system.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jk.common.mybatis.core.mapper.BaseMapperPlus;
import org.jk.system.domain.SysLogininfor;
import org.jk.system.domain.vo.SysLogininforVo;

import java.util.Date;

/**
 * 系统访问日志情况信息 数据层
 *
 * @author jk
 */
public interface SysLogininforMapper extends BaseMapperPlus<SysLogininfor, SysLogininforVo> {

    @InterceptorIgnore(tenantLine = "true", dataPermission = "false")
    @Select("<script>" +
        "select count(DISTINCT user_name) from sys_logininfor where login_time between #{startTime} and #{endTime} " +
        "</script>")
    Integer queryCountByTime(@Param("startTime")Date startTime,@Param("endTime")Date endTime);
}
