liyong
4 天以前 be5783c8a7e13bbc76d33c95643d75779cce21db
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package cn.iocoder.yudao.module.crm.api.customer;
 
import cn.iocoder.yudao.module.crm.api.customer.dto.CrmCustomerRespDTO;
 
import java.util.Collection;
import java.util.List;
import java.util.Map;
 
/**
 * CRM 客户 API 接口
 *
 * 提供给其它模块(如 ERP)调用
 *
 * @author 芋道源码
 */
public interface CrmCustomerApi {
 
    /**
     * 获得客户信息
     *
     * @param id 客户编号
     * @return 客户信息
     */
    CrmCustomerRespDTO getCustomer(Long id);
 
    /**
     * 获得客户信息列表
     *
     * @param ids 客户编号列表
     * @return 客户信息列表
     */
    List<CrmCustomerRespDTO> getCustomerList(Collection<Long> ids);
 
    /**
     * 获得客户信息 Map
     *
     * @param ids 客户编号列表
     * @return 客户信息 Map
     */
    Map<Long, CrmCustomerRespDTO> getCustomerMap(Collection<Long> ids);
 
    /**
     * 校验客户是否存在
     *
     * @param id 客户编号
     * @return 客户信息(校验通过)
     */
    CrmCustomerRespDTO validateCustomer(Long id);
 
    /**
     * 获取当前用户有权限的客户 ID 列表
     *
     * 包括:用户自己在团队中、用户的下级在团队中、公海数据
     *
     * @return 有权限的客户 ID 列表
     */
    List<Long> getPermittedCustomerIds();
 
}