package org.dromara.zhishu.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import org.dromara.zhishu.domain.ShopWarehouse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 店铺与仓库自动发布关联Mapper接口
 *
 * @author yxy
 * @date 2025-12-28
 */
@Mapper
public interface ShopWarehouseMapper {

    /**
     * 根据店铺ID删除关联
     */
    @InterceptorIgnore(tenantLine = "true")
    int deleteByShopId(Long shopId);

    /**
     * 根据店铺ID查询关联列表
     */
    @InterceptorIgnore(tenantLine = "true")
    List<ShopWarehouse> selectByShopId(Long shopId);

    /**
     * 新增店铺与仓库关联
     */
    @InterceptorIgnore(tenantLine = "true")
    int insert(ShopWarehouse shopWarehouse);


    /**
     * 根据ID查询关联
     */
    @InterceptorIgnore(tenantLine = "true")
    ShopWarehouse selectById(Long id);

    /**
     * 根据ID删除关联
     */
    @InterceptorIgnore(tenantLine = "true")
    int deleteById(Long id);

    /**
     * 更新关联信息
     */
    @InterceptorIgnore(tenantLine = "true")
    int update(ShopWarehouse shopWarehouse);
}