huang
2025-11-20 366ba040d2447bacd3455299425e3166f1f992bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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);
}