|
@@ -132,10 +132,30 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
132
|
132
|
person.setAvatarurl(userInfo.getAvatarUrl());
|
133
|
133
|
person.setNickname(userInfo.getNickName());
|
134
|
134
|
|
|
135
|
+ //获取推荐客户表中此人的信息并更新头像和姓名
|
|
136
|
+ updateTaRecommendCustomer(person);
|
|
137
|
+
|
135
|
138
|
return person;
|
136
|
139
|
}
|
137
|
140
|
}
|
138
|
141
|
|
|
142
|
+ //获取推荐客户表中此人的信息并更新头像和姓名
|
|
143
|
+ private void updateTaRecommendCustomer(TaPerson person) {
|
|
144
|
+ //获取客户列表
|
|
145
|
+ QueryWrapper<TaRecommendCustomer> taRecommendCustomerQueryWrapper = new QueryWrapper<>();
|
|
146
|
+ taRecommendCustomerQueryWrapper.eq("person_id",person.getPersonId());
|
|
147
|
+ taRecommendCustomerQueryWrapper.eq("org_id",person.getOrgId());
|
|
148
|
+ List<TaRecommendCustomer> taRecommendCustomerList = taRecommendCustomerMapper.selectList(taRecommendCustomerQueryWrapper);
|
|
149
|
+ taRecommendCustomerList.forEach(e -> {
|
|
150
|
+ //没有姓名和头像的情况下更新
|
|
151
|
+ if (StringUtils.isEmpty(e.getName())){
|
|
152
|
+ e.setName(person.getNickname());
|
|
153
|
+ e.setPicture(person.getAvatarurl());
|
|
154
|
+ taRecommendCustomerMapper.updateById(e);
|
|
155
|
+ }
|
|
156
|
+ });
|
|
157
|
+ }
|
|
158
|
+
|
139
|
159
|
@Override
|
140
|
160
|
public TaPerson updatePersonPhone(String miniOpenid, String phone,Integer orgId) {
|
141
|
161
|
// 先查询是否存在用户
|