package com.uas.platform.b2b.dao;

import com.uas.platform.b2b.model.Distribute;
import com.uas.platform.core.data.repository.GenericRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DistributeDao extends JpaSpecificationExecutor<Distribute>, GenericRepository<Distribute, Long> {
	
	/**
	 * 根据用户UU查询客户分配表 
	 * @param userUU
	 * @return
	 */
	public List<Distribute> findByUserUU(Long userUU);
	
	/**
	 * 根据用户UU和vendor ID
	 * @param userUU
	 * @param vendorId
	 * @return
	 */
	public List<Distribute> findByUserUUAndVendorId(Long userUU,Long vendorId);
	
	public List<Distribute> findByVendorId(List<Long> vendorIds);

	List<Distribute> findByVendorId(Long vendorId);

}
