package com.ruoyi.jarvis.mapper;

import java.util.List;
import com.ruoyi.jarvis.domain.ErpProductRelation;

/**
 * ERP商品关联Mapper接口
 * 
 * @author ruoyi
 * @date 2024-01-01
 */
public interface ErpProductRelationMapper 
{
    /**
     * 查询ERP商品关联
     * 
     * @param id ERP商品关联主键
     * @return ERP商品关联
     */
    public ErpProductRelation selectErpProductRelationById(Long id);

    /**
     * 查询ERP商品关联列表
     * 
     * @param erpProductRelation ERP商品关联
     * @return ERP商品关联集合
     */
    public List<ErpProductRelation> selectErpProductRelationList(ErpProductRelation erpProductRelation);

    /**
     * 新增ERP商品关联
     * 
     * @param erpProductRelation ERP商品关联
     * @return 结果
     */
    public int insertErpProductRelation(ErpProductRelation erpProductRelation);

    /**
     * 修改ERP商品关联
     * 
     * @param erpProductRelation ERP商品关联
     * @return 结果
     */
    public int updateErpProductRelation(ErpProductRelation erpProductRelation);

    /**
     * 删除ERP商品关联
     * 
     * @param id ERP商品关联主键
     * @return 结果
     */
    public int deleteErpProductRelationById(Long id);

    /**
     * 批量删除ERP商品关联
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteErpProductRelationByIds(Long[] ids);

    /**
     * 根据常用商品ID查询ERP商品关联列表
     * 
     * @param favoriteProductId 常用商品ID
     * @return ERP商品关联集合
     */
    public List<ErpProductRelation> selectErpProductRelationByFavoriteId(Long favoriteProductId);

    /**
     * 根据应用ID查询ERP商品关联列表
     * 
     * @param appid 应用ID
     * @return ERP商品关联集合
     */
    public List<ErpProductRelation> selectErpProductRelationByAppid(String appid);

    /**
     * 根据常用商品ID删除ERP商品关联
     * 
     * @param favoriteProductId 常用商品ID
     * @return 结果
     */
    public int deleteErpProductRelationByFavoriteId(Long favoriteProductId);

    /**
     * 统计常用商品的ERP关联数量
     * 
     * @param favoriteProductId 常用商品ID
     * @return 关联数量
     */
    public int countErpProductRelationByFavoriteId(Long favoriteProductId);
}
