package com.kiisoo.ic.generalize.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kiisoo.ic.generalize.entity.CompanyStoreDO;
import com.kiisoo.ic.generalize.entity.PrivilageOrganizational;
import com.kiisoo.ic.region.entity.RegionDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface RetailCompanyMapper extends BaseMapper<PrivilageOrganizational> {

    List<CompanyStoreDO> selectShopIdByRetail(@Param("orgId") Long orgId, @Param("shopId") Long shopId);

    List<Long> selectSellerIdsByShop(@Param("orgId") Long orgId,@Param("shopId") Long shopId,@Param("sellerId") Long sellerId);

    /**
     * 找到子公司
     */
    Set<Long> selectChildList(@Param("companys")  Set<Long> companys);

    void insertDomainOrgRelation(@Param("domainId")Long domainId, @Param("companyId")Long companyId);
}
