package com.gonghang.h5clientapp.dao;

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

/**
 * Created by shiwn on 2022/8/3 14:23
 */
@Component
public interface EnvDataMapper extends BaseMapper<EnvDataDTO> {
    /**
     * @Description: 获取最新的一条数据记录 by 机器人id
     * @Date: 2022/7/5 9:31
     * @Author: shiwn
     * @Param: [robotId]
     * @Return:
     */
    @Select("select * from env_data where robot_id =#{robotId} order by id desc LIMIT 0,1")
    EnvDataDTO selectByRobotId(@Param("robotId") Integer robotId);
}
