package com.dgtly.system.mapper;

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

import java.util.List;

/**
 * 经销商扩展Mapper接口
 * 
 * @author dgtly
 * @date 2020-10-12
 */
public interface CustomersExtMapper 
{
    /**
     * 查询经销商扩展
     * 
     * @param chainsCode 经销商扩展ID
     * @return 经销商扩展
     */
    public CustomersExt selectCustomersExtById(String chainsCode);

    /**
     * 根据子经销商查询主经销商扩展列表
     *
     * @param chainsCode 经销商扩展ID
     * @return 经销商扩展集合
     */
    CustomersExt selectCustomersExt(String chainsCode);

    /**
     * 查询经销商扩展列表
     * 
     * @param customersExt 经销商扩展
     * @return 经销商扩展集合
     */
    public List<CustomersExt> selectCustomersExtList(CustomersExt customersExt);

    /**
     * 新增经销商扩展
     * 
     * @param customersExt 经销商扩展
     * @return 结果
     */
    public int insertCustomersExt(CustomersExt customersExt);

    /**
     * 修改经销商扩展
     * 
     * @param customersExt 经销商扩展
     * @return 结果
     */
    public int updateCustomersExt(CustomersExt customersExt);

    public int updateCustomersIsAuthentication(@Param("isAuthentication") String isAuthentication,@Param("accountId") String accountId);

  /**
     * 删除经销商扩展
     * 
     * @param chainsCode 经销商扩展ID
     * @return 结果
     */
    public int deleteCustomersExtById(String chainsCode);

    /**
     * 批量删除经销商扩展
     * 
     * @param chainsCodes 需要删除的数据ID
     * @return 结果
     */
    public int deleteCustomersExtByIds(String[] chainsCodes);

    String selectOrgIdByOrderId(String orderId);

    String selectChainsCodeByOrderId(@Param("customerCode") String customerCode);
}
