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);
|
}
|