|
|
@@ -92,6 +92,7 @@ public class QwAcquisitionLinkInfoServiceImpl implements IQwAcquisitionLinkInfoS
|
|
|
}
|
|
|
//拼接电话号码的链接后缀(这个后面拼接加密后的手机字符串)
|
|
|
private static final String LINK_SUFFIX = "?customer_channel=up:";
|
|
|
+ private static final String LINK_SUFFIX_NOL = "?customer_channel=link:";
|
|
|
|
|
|
// 企微加好友链接-url的key
|
|
|
private static final String QW_FRIEND_LINK_URL_KEY = "qw_friend_link_url:";
|
|
|
@@ -590,6 +591,31 @@ public class QwAcquisitionLinkInfoServiceImpl implements IQwAcquisitionLinkInfoS
|
|
|
return LINK_DOMAIN+randomStr;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String extractLinkNol(Long qwAcquisitionAssistantId, String originalLink, Long createBy) {
|
|
|
+ String randomStr = generateUniqueRandomStr();
|
|
|
+ QwAcquisitionLinkInfo qwAcquisitionLinkInfo=new QwAcquisitionLinkInfo();
|
|
|
+ qwAcquisitionLinkInfo.setQwAcquisitionAssistantId(qwAcquisitionAssistantId);
|
|
|
+ qwAcquisitionLinkInfo.setCreateBy(createBy);
|
|
|
+ qwAcquisitionLinkInfo.setCreateTime(DateUtils.getTime());
|
|
|
+ String linkPlus=originalLink+LINK_SUFFIX_NOL+ qwAcquisitionAssistantId;
|
|
|
+ qwAcquisitionLinkInfo.setLink(linkPlus);
|
|
|
+ qwAcquisitionLinkInfo.setRandomStr(randomStr);
|
|
|
+ int addResult=qwAcquisitionLinkInfoMapper.insertQwAcquisitionLinkInfo(qwAcquisitionLinkInfo);
|
|
|
+ // ========== 缓存URL,便于后续通过randomStr访问 ==========
|
|
|
+ try {
|
|
|
+ String cacheKey = QW_FRIEND_LINK_URL_KEY + randomStr;
|
|
|
+ Integer cacheExpire = 2; // 默认缓存2天
|
|
|
+ redisCache.setCacheObject(cacheKey, linkPlus, cacheExpire, TimeUnit.DAYS);
|
|
|
+ log.info("获客链接URL缓存成功, pageParam: {}, url: {}", randomStr, linkPlus);
|
|
|
+ } catch (Exception e) {
|
|
|
+ // 缓存失败不影响主流程,但需要记录日志
|
|
|
+ log.error("获客链接URL缓存失败, pageParam: {}", randomStr, e);
|
|
|
+ }
|
|
|
+ // 返回域名+随机字符串
|
|
|
+ return LINK_DOMAIN+randomStr;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void ipadBlindAdd(IpadBlindAddDto dto,SendMsgLogBo sendMsgLogBo) {
|
|
|
//获取QwUser信息
|
|
|
@@ -790,4 +816,4 @@ public class QwAcquisitionLinkInfoServiceImpl implements IQwAcquisitionLinkInfoS
|
|
|
private String phone;
|
|
|
private String failReason;
|
|
|
}
|
|
|
-}
|
|
|
+}
|