package com.yeejoin.amos.api.openapi.face.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.api.openapi.face.model.EquipmentModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipmentMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.Equipment;
import com.yeejoin.amos.api.openapi.face.orm.entity.PageParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class EquipmentService extends AppBaseService<EquipmentModel, Equipment, EquipmentMapper> {

	@Autowired
	EquipmentMapper equipmentMapper;

	public IPage<EquipmentModel> page(PageParam pageParam, Date startTime,Date endTime) {
		Page<EquipmentModel> page = new Page<>(pageParam.getCurrent(), pageParam.getSize());
		return equipmentMapper.page(page,startTime, endTime);
	}
}
