package com.gonghang.h5clientapp.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gonghang.h5clientapp.beans.dto.RobotWarningDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * Created by shiwn on 2022/8/3 15:45
 */
@Component
public interface RobotWarningMapper extends BaseMapper<RobotWarningDTO> {
    /**
     * @Description: 获取最新的一条机器人故障告警
     * @Author: shiwn
     * @Date: 2021/1/28 18:03
     */
    @Select("select * from robot_warning where robot_ip=#{robotIp} order by create_time desc limit 0,1")
    RobotWarningDTO selectNewOne(@Param("robotIp") String robotIp);
}
