liu
2 天以前 dd69dd49c98e2d8fdd9b1c77e97923bde0d57b57
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
60
61
62
63
64
65
66
67
68
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 列表(null 表示不限制,即超管)
     */
    List<Long> getPermittedCustomerIds();
 
    /**
     * 获得客户简单列表(编号 + 名称)
     *
     * 用于其它模块(如 ERP 销售订单导入)按客户名称匹配客户编号
     *
     * @return 客户简单列表
     */
    List<CrmCustomerRespDTO> getCustomerSimpleList();
 
}