sfd
2025-05-23 edca6e6425e38e2ec87b08f164fb3c68dd195da6
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package com.aps.core.mapper;
 
import java.util.List;
import java.util.Set;
 
import com.aps.core.domain.ApsShop;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.jetbrains.annotations.NotNull;
 
/**
 * 车间Mapper接口
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
@Mapper
public interface ApsShopMapper extends BaseMapper<ApsShop>
{
    /**
     * 查询车间
     * 
     * @param id 车间主键
     * @return 车间
     */
    public ApsShop selectApsShopById(String id);
 
    /**
     * 查询车间列表
     * 
     * @param apsShop 车间
     * @return 车间集合
     */
    public List<ApsShop> selectApsShopList(ApsShop apsShop);
 
    /**
     * 新增车间
     * 
     * @param apsShop 车间
     * @return 结果
     */
    public int insertApsShop(ApsShop apsShop);
 
    /**
     * 修改车间
     * 
     * @param apsShop 车间
     * @return 结果
     */
    public int updateApsShop(ApsShop apsShop);
 
    /**
     * 删除车间
     * 
     * @param id 车间主键
     * @return 结果
     */
    public int deleteApsShopById(String id);
 
    /**
     * 批量删除车间
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteApsShopByIds(String[] ids);
 
 
    @Select("""
        <script>
            select * from aps_shop where 1 = 0
            <if test="!codes.isEmpty()"> or shop_name in
                <foreach collection="names" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>                                 
            </if> 
        </script>
    """)
    List<ApsShop> selectApsByName(@NotNull Set<String> names);
 
    @Select("select * from aps_shop where plant_code = #{orgCode}")
    List<ApsShop> selectApsByFactory(String orgCode);
 
    @Select("""
        <script>
            select * from aps_shop where 1 = 0
            <if test="!codes.isEmpty()"> or shop_code in
                <foreach collection="codes" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>                                 
            </if> 
        </script>
    """)
    List<ApsShop> selectByCodes(Set<String> codes);
}