package org.springblade.face.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.face.entity.LoginRecord;
import org.springblade.face.mapper.LoginRecordMapper;
import org.springblade.face.query.UserLoginRecordQuery;
import org.springblade.face.service.ILoginRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.face.vo.LoginRecordExportVO;
import org.springblade.face.vo.LoginRecordTotalExportVO;
import org.springblade.face.vo.UserLoginRecordVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 登录记录表 服务实现类
 * </p>
 *
 * @author zbc
 * @since 2021-07-05
 */
@Service
public class LoginRecordServiceImpl extends ServiceImpl<LoginRecordMapper, LoginRecord> implements ILoginRecordService {

	@Autowired
	private LoginRecordMapper loginRecordMapper;

	@Override
	public IPage<UserLoginRecordVO> getLoginRecordPage(IPage<UserLoginRecordVO> page, UserLoginRecordQuery recordQuery) {
		return loginRecordMapper.getLoginRecordPage(page,recordQuery);
	}

	@Override
	public List<UserLoginRecordVO> getLoginRecordNum(UserLoginRecordQuery recordQuery) {
		return loginRecordMapper.getLoginRecordNum(recordQuery);
	}

	@Override
	public List<LoginRecordExportVO> getLoginRecordDetailByMonth(String month) {
		return loginRecordMapper.getLoginRecordDetailByMonth(month);
	}

	@Override
	public List<LoginRecordTotalExportVO> getLoginRecordTotalByMonth(String month) {
		return loginRecordMapper.getLoginRecordTotalByMonth(month);
	}
}
