package cn.com.ty.lift.business.maintenance.dao.mapper;

import cn.com.ty.lift.business.maintenance.dao.entity.ScanRecord;
import cn.com.ty.lift.business.maintenance.dao.entity.model.response.ScanLiftInfoResponse;
import cn.com.ty.lift.business.maintenance.dao.entity.model.response.ScanMaintenanceRecordResponse;
import cn.com.ty.lift.common.constants.SqlConstants;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 电梯二维码扫码记录表 Mapper 接口
 * </p>
 *
 * @author wang-hai-cheng
 * @since 2020-04-28
 */
public interface ScanRecordMapper extends BaseMapper<ScanRecord> {

    @Select(SqlConstants.QUERY_LIFT_INFO_BY_LIFT_ID)
    List<ScanLiftInfoResponse> queryLiftInfoByLiftId(Long liftId);

    @Select(SqlConstants.QUERY_MAINTENANCE_RECORD_BY_LIFT_ID)
    IPage<ScanMaintenanceRecordResponse> queryMaintenanceRecordByLiftId(IPage<ScanMaintenanceRecordResponse> page, Long liftId);

}
