|
|
@@ -119,20 +119,24 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
|
|
|
@Override
|
|
|
@Async("asyncExecutor")
|
|
|
public void weChatAuthorizationLead(String traceId, String unionId, String mpOpenId, String phone) {
|
|
|
- Lead byTraceId = this.getByTraceId(traceId);
|
|
|
- if (byTraceId == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
- this.update(new LambdaUpdateWrapper<Lead>()
|
|
|
- .eq(Lead::getTraceId, traceId)
|
|
|
- .set(Lead::getUnionid, unionId)
|
|
|
- .set(Lead::getPhone, phone)
|
|
|
- .set(Lead::getOpenid, mpOpenId)
|
|
|
- .set(Lead::getMiniAuth, 1));
|
|
|
- if (ObjectUtil.isNotEmpty(byTraceId.getLandingPageTs()) && byTraceId.getLandingPageTs().toLocalDate().isEqual(LocalDate.now())) {
|
|
|
- // 微信授权且当日创建事件
|
|
|
- conversionEventPublisher.publishConversionEvent(traceId, SystemEventTypeEnum.AUTH_TODAY_CREATE);
|
|
|
- }
|
|
|
+ try{
|
|
|
+ Lead byTraceId = this.getByTraceId(traceId);
|
|
|
+ if (byTraceId == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.update(new LambdaUpdateWrapper<Lead>()
|
|
|
+ .eq(Lead::getTraceId, traceId)
|
|
|
+ .set(Lead::getUnionid, unionId)
|
|
|
+ .set(Lead::getPhone, phone)
|
|
|
+ .set(Lead::getOpenid, mpOpenId)
|
|
|
+ .set(Lead::getMiniAuth, 1));
|
|
|
+ if (ObjectUtil.isNotEmpty(byTraceId.getLandingPageTs()) && byTraceId.getLandingPageTs().toLocalDate().isEqual(LocalDate.now())) {
|
|
|
+ // 微信授权且当日创建事件
|
|
|
+ conversionEventPublisher.publishConversionEvent(traceId, SystemEventTypeEnum.AUTH_TODAY_CREATE);
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|