package com.mes.device.mapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.mes.device.entity.GlassInfo;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
|
/**
|
* 设备玻璃信息Mapper接口
|
*
|
* @author mes
|
* @since 2024-11-20
|
*/
|
@Mapper
|
public interface DeviceGlassInfoMapper extends BaseMapper<GlassInfo> {
|
|
/**
|
* 根据玻璃ID查询玻璃信息
|
*
|
* @param glassId 玻璃ID
|
* @return 玻璃信息
|
*/
|
@Select("SELECT * FROM glass_info WHERE glass_id = #{glassId} AND is_deleted = 0 LIMIT 1")
|
GlassInfo selectByGlassId(@Param("glassId") String glassId);
|
|
/**
|
* 根据玻璃ID列表批量查询玻璃信息
|
*
|
* @param glassIds 玻璃ID列表
|
* @return 玻璃信息列表
|
*/
|
List<GlassInfo> selectByGlassIds(@Param("glassIds") List<String> glassIds);
|
|
/**
|
* 根据状态查询玻璃信息列表
|
*
|
* @param status 状态
|
* @return 玻璃信息列表
|
*/
|
@Select("SELECT * FROM glass_info WHERE status = #{status} AND is_deleted = 0 ORDER BY created_time DESC")
|
List<GlassInfo> selectByStatus(@Param("status") String status);
|
}
|