package com.dgtly.system.mapper;

import com.dgtly.system.domain.AssRelcustomerinfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 多经销商关联Mapper接口
 * 
 * @author dgtly
 * @date 2021-04-08
 */
public interface AssRelcustomerinfoMapper 
{
    /**
     * 查询多经销商关联
     * 
     * @param id 多经销商关联ID
     * @return 多经销商关联
     */
    public AssRelcustomerinfo selectAssRelcustomerinfoById(Long id);

    /**
     * 查询多经销商关联列表
     * 
     * @param assRelcustomerinfo 多经销商关联
     * @return 多经销商关联集合
     */
    public List<AssRelcustomerinfo> selectAssRelcustomerinfoList(AssRelcustomerinfo assRelcustomerinfo);

    /**
     * 新增多经销商关联
     * 
     * @param assRelcustomerinfo 多经销商关联
     * @return 结果
     */
    public int insertAssRelcustomerinfo(AssRelcustomerinfo assRelcustomerinfo);

    /**
     * 修改多经销商关联
     * 
     * @param assRelcustomerinfo 多经销商关联
     * @return 结果
     */
    public int updateAssRelcustomerinfo(AssRelcustomerinfo assRelcustomerinfo);

    /**
     * 删除多经销商关联
     * 
     * @param id 多经销商关联ID
     * @return 结果
     */
    public int deleteAssRelcustomerinfoById(Long id);

    /**
     * 批量删除多经销商关联
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteAssRelcustomerinfoByIds(String[] ids);

    public int deleteAssRelcustomerinfoByGlfs(String glfs);

    public int deleteAssRelcustomerinfoByUserId(@Param("userId") String userId,@Param("customerCode") String customerCode);

    List<AssRelcustomerinfo> selectRelcustomerinfoListByorgCode(@Param("orgCode") String orgCode ,@Param("userId")String userId);

    void relationCustomerOnlineSync(AssRelcustomerinfo ass);

    String selectCustomerName(@Param("customerId") String customerId);

    List<AssRelcustomerinfo> selectRelcustomerinfoByKunnr(@Param("kunnr") String kunnr,@Param("userId") String userId);
    List<AssRelcustomerinfo> selectCustomerNameAndCode();

    List<AssRelcustomerinfo> selectAssRelCustomer();

    List<String> selectCustomerStart(@Param("customerCode") String customerCode,@Param("customerType") int customerType,@Param("type") int type);

    List<String> selectCustomerByCustomerCode(@Param("customerCode") String customerCode);

    public void deleteCustomerStartByCustomerCode(@Param("customerCode") String customerCode);

}
