EntmicroCustomerFollowMapper.java
3.79 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package cn.com.glsx.entmicro.mapper;
import cn.com.glsx.entmicro.entity.Customer;
import cn.com.glsx.entmicro.entity.EntmicroCustomerFollow;
import cn.com.glsx.entmicro.model.customer.CustomerRelationDataPushModel;
import cn.com.glsx.entmicro.model.customer.SyncCustomerTypeTagModel;
import cn.com.glsx.entmicro.model.response.CustomerFollowStaffResponse;
import cn.com.glsx.entmicro.model.response.CustomerInfo;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
@Mapper
public interface EntmicroCustomerFollowMapper extends CommonBaseMapper<EntmicroCustomerFollow> {
void deleteRelation(@Param("id") Integer id);
void deleteCustomer(Integer id);
void updatelist(@Param("list") List<EntmicroCustomerFollow> buildFollowParam);
List<EntmicroCustomerFollow> findFollowByExternalUserId(@Param("externalUserId") String externalUserId,
@Param("merchantId") Integer merchantId);
List<EntmicroCustomerFollow> findAllFollowByExternalUserId(@Param("externalUserId") String externalUserId);
/**
* 校验重复数据
*
* @param customerId
* @param staffId
* @return
*/
List<EntmicroCustomerFollow> findRelationByStaffId(@Param("customerId") Integer customerId, @Param("staffId") Set<Integer> staffId);
/**
* id获取关联数据
*
* @param id
* @return
*/
CustomerFollowStaffResponse findRelationById(@Param("id") Integer id);
/**
* id获取关联数据
*
* @param id
* @return
*/
List<CustomerFollowStaffResponse> findRelationByUserId(@Param("id") String id);
/**
* 修改手机号
*
* @param
*/
void updatePhone(EntmicroCustomerFollow entmicroCustomerFollow);
/**
* 修改合并表手机号
*/
CustomerInfo findByRelationId(@Param("id") Integer id);
/**
* 员工id查客户关系
*
* @param staffId
* @return
*/
List<EntmicroCustomerFollow> findByStaffId(@Param("staffId") Integer staffId);
/**
* 批量补充备注手机号
*
* @param customer
*/
int updateBatchInfo(@Param("customer") List<Customer> customer);
/**
* 批量查客户跟进关系
*
* @param userIdList
* @return
*/
List<EntmicroCustomerFollow> findBatchRelationInfo(@Param("userIdList") List<String> userIdList);
/**
* 根据渠道统计客户
*
* @param stateList
* @return
*/
List<EntmicroCustomerFollow> mapByState(@Param("stateList") List<String> stateList, @Param("date") String date,
@Param("startTime") Date startTime, @Param("endTime") Date endTime);
/**
* 根据userId或手机号查询客户关联关系
*
* @param param 参数
* @return
*/
List<CustomerRelationDataPushModel> findCustomerRelationByUserIdOrPhone(@Param("param") SyncCustomerTypeTagModel param,
@Param("merchantIds") List<Integer> merchantIds);
/**
* 查找客户员工跟进关系
*
* @param merchantIdList
* @param customerPhone
* @param staffUserIdList
* @return
*/
List<EntmicroCustomerFollow> findCustomerStaffFollow(@Param("merchantIdList") List<Integer> merchantIdList, @Param("customerPhone") String customerPhone,
@Param("staffUserIdList") List<String> staffUserIdList);
List<Map<String, Object>> selectCustomerFollowRemark(@Param("updateTime") Date updateTime, @Param("merchantIdList") List<Integer> merchantIdList);
}