|
|
@@ -63,6 +63,7 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
|
|
|
@Override
|
|
|
@Async
|
|
|
public void updateGroupAddMemberLead(String name, String chatId, String corpId, String unionid) {
|
|
|
+ log.info("用户加群线索信息:{} {} {} {}", name, chatId, corpId, unionid);
|
|
|
LambdaQueryWrapper<Lead> last = new LambdaQueryWrapper<Lead>();
|
|
|
if (StrUtil.isNotEmpty(unionid)) {
|
|
|
last.eq(Lead::getUnionid, unionid);
|
|
|
@@ -111,6 +112,7 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
|
|
|
}
|
|
|
|
|
|
private void updateAddMemberLead(QwExternalContact qwExternalContact) {
|
|
|
+ log.info("用户加微线索信息:{}", qwExternalContact);
|
|
|
LambdaQueryWrapper<Lead> last = new LambdaQueryWrapper<Lead>();
|
|
|
if (StrUtil.isNotEmpty(qwExternalContact.getUnionid())) {
|
|
|
last.eq(Lead::getUnionid, qwExternalContact.getUnionid());
|
|
|
@@ -142,26 +144,36 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
|
|
|
@Override
|
|
|
@Async
|
|
|
public void weChatAuthorizationLead(String traceId, String unionId, String maOpenId, String phone) {
|
|
|
- try {
|
|
|
- log.info("用户微信授权线索信息:{}", traceId);
|
|
|
- Lead byTraceId = this.getByTraceId(traceId);
|
|
|
- if (byTraceId == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
- this.update(new LambdaUpdateWrapper<Lead>()
|
|
|
- .eq(Lead::getTraceId, traceId)
|
|
|
- .set(ObjectUtil.isNotEmpty(unionId), Lead::getUnionid, unionId)
|
|
|
- .set(ObjectUtil.isNotEmpty(phone), Lead::getPhone, phone)
|
|
|
- .set(ObjectUtil.isNotEmpty(maOpenId), Lead::getOpenid, maOpenId)
|
|
|
- .set(Lead::getMiniAuth, 1));
|
|
|
- if (ObjectUtil.isNotEmpty(byTraceId.getLandingPageTs()) && byTraceId.getLandingPageTs().toLocalDate().isEqual(LocalDate.now())) {
|
|
|
- // 微信授权且当日创建事件
|
|
|
- log.info("用户微信授权线索事件回传:{}", traceId);
|
|
|
- conversionEventPublisher.publishConversionEvent(traceId, SystemEventTypeEnum.AUTH_TODAY_CREATE);
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.info("用户微信授权线索信息:{} {} {} {}", traceId, unionId, phone, maOpenId);
|
|
|
+ Lead byTraceId = this.getByTraceId(traceId);
|
|
|
+ if (byTraceId == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.update(new LambdaUpdateWrapper<Lead>()
|
|
|
+ .eq(Lead::getTraceId, traceId)
|
|
|
+ .set(ObjectUtil.isNotEmpty(unionId), Lead::getUnionid, unionId)
|
|
|
+ .set(ObjectUtil.isNotEmpty(phone), Lead::getPhone, phone)
|
|
|
+ .set(ObjectUtil.isNotEmpty(maOpenId), Lead::getOpenid, maOpenId)
|
|
|
+ .set(Lead::getMiniAuth, 1));
|
|
|
+ if (ObjectUtil.isNotEmpty(byTraceId.getLandingPageTs()) && byTraceId.getLandingPageTs().toLocalDate().isEqual(LocalDate.now())) {
|
|
|
+ // 微信授权且当日创建事件
|
|
|
+ log.info("用户微信授权线索事件回传:{}", traceId);
|
|
|
+ conversionEventPublisher.publishConversionEvent(traceId, SystemEventTypeEnum.AUTH_TODAY_CREATE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Async
|
|
|
+ public void weChatNameLead(String traceId, String weiChatName) {
|
|
|
+ log.info("用户微信昵称线索信息:{} {}", traceId, weiChatName);
|
|
|
+ Lead byTraceId = this.getByTraceId(traceId);
|
|
|
+ if (byTraceId == null) {
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.update(new LambdaUpdateWrapper<Lead>()
|
|
|
+ .eq(Lead::getTraceId, traceId)
|
|
|
+ .set(ObjectUtil.isNotEmpty(weiChatName), Lead::getWeiChatName, weiChatName)
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
@Override
|