|
@@ -9,13 +9,19 @@ import org.springframework.stereotype.Repository;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * 客户分配信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author hejq
|
|
|
|
|
+ * @date 2018-12-12 9:26
|
|
|
|
|
+ */
|
|
|
@Repository
|
|
@Repository
|
|
|
public interface DistributeDao extends JpaSpecificationExecutor<Distribute>, GenericRepository<Distribute, Long> {
|
|
public interface DistributeDao extends JpaSpecificationExecutor<Distribute>, GenericRepository<Distribute, Long> {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 根据用户UU查询客户分配表
|
|
* 根据用户UU查询客户分配表
|
|
|
* @param userUU
|
|
* @param userUU
|
|
|
- * @return
|
|
|
|
|
|
|
+ * @return 分配记录
|
|
|
*/
|
|
*/
|
|
|
List<Distribute> findByUserUU(Long userUU);
|
|
List<Distribute> findByUserUU(Long userUU);
|
|
|
|
|
|
|
@@ -36,20 +42,36 @@ public interface DistributeDao extends JpaSpecificationExecutor<Distribute>, Gen
|
|
|
@Query("select d from Distribute d where d.vendorId in (:vendorIds)")
|
|
@Query("select d from Distribute d where d.vendorId in (:vendorIds)")
|
|
|
List<Distribute> findByVendorId(@Param("vendorIds") List<Long> vendorIds);
|
|
List<Distribute> findByVendorId(@Param("vendorIds") List<Long> vendorIds);
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 通过供应商客户关系表ID查询客户分配信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param vendorId 供应商客户关系表ID
|
|
|
|
|
+ * @return 客户分配
|
|
|
|
|
+ */
|
|
|
List<Distribute> findByVendorId(Long vendorId);
|
|
List<Distribute> findByVendorId(Long vendorId);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查找被当前用户绑定当前客户权限的记录
|
|
* 查找被当前用户绑定当前客户权限的记录
|
|
|
- * @param id
|
|
|
|
|
- * @param userUU
|
|
|
|
|
- * @return
|
|
|
|
|
|
|
+ * @param id 供应商关系表id
|
|
|
|
|
+ * @param userUU 转移人UU
|
|
|
|
|
+ * @return 客户分配
|
|
|
*/
|
|
*/
|
|
|
List<Distribute> findByVendorIdAndLeaderUU(Long id, Long userUU);
|
|
List<Distribute> findByVendorIdAndLeaderUU(Long id, Long userUU);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 根据leaderUU 查询客户绑定记录
|
|
* 根据leaderUU 查询客户绑定记录
|
|
|
* @param userUU 用户UU
|
|
* @param userUU 用户UU
|
|
|
- * @return
|
|
|
|
|
|
|
+ * @return 分配记录
|
|
|
*/
|
|
*/
|
|
|
List<Distribute> findByLeaderUU(Long userUU);
|
|
List<Distribute> findByLeaderUU(Long userUU);
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 通过用户UU和供应商UU查询分配的客户信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param UserUU 用户UU
|
|
|
|
|
+ * @param vendorUU 供应商UU
|
|
|
|
|
+ * @return 分配记录
|
|
|
|
|
+ */
|
|
|
|
|
+ @Query("select d from Distribute d where d.userUU = :userUU and d.vendor.vendEnUU = :vendorUU")
|
|
|
|
|
+ List<Distribute> findByUserUUAndVendorUU(@Param("userUU") Long UserUU, @Param("vendorUU") Long vendorUU);
|
|
|
}
|
|
}
|