package com.yeejoin.amos.api.openapi.face.orm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorStatus;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
  * 电梯运行状态表 Mapper 接口
 * </p>
 *
 * @author 子杨
 * @since 2021-09-27
 */
public interface ElevatorStatusMapper extends BaseMapper<ElevatorStatus> {

	
	 @Select("SELECT " +
	            " * " +
	            " FROM " +
	            " tz_elevator_status c " +
	            " WHERE " +
	            " c.register_code = '${registerCode}' ORDER BY upload_date DESC LIMIT 1")
	 ElevatorStatus getLatelyStatus(@Param("registerCode") String registerCode);
}