소스 검색

查询获客链接修改

chenbiao 2 년 전
부모
커밋
08f3d66701
1개의 변경된 파일11개의 추가작업 그리고 6개의 파일을 삭제
  1. 11 6
      netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpEventActionServiceImpl.java

+ 11 - 6
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpEventActionServiceImpl.java

@@ -578,13 +578,18 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
 
 		//获客链接id
 		String linkId = message.getLinkId();
-		//记录发起对话事件
-		CorpCustomerAcquisitionLinkPopularize corpCustomerAcquisitionLinkPopularize = corpCustomerAcquisitionLinkPopularizeMapper.selectOne(Wrappers.lambdaQuery(CorpCustomerAcquisitionLinkPopularize.class)
-				.eq(CorpCustomerAcquisitionLinkPopularize::getIsChat, 1)
-				.eq(CorpCustomerAcquisitionLinkPopularize::getCustomerAcquistionLinkId, linkId).last("limit 1"));
-		if (corpCustomerAcquisitionLinkPopularize != null) {
-			redisService.sSet(RedisService.key.CORP_CUSTOMER_ACQUISTION_START_CHAT_SET.getEnvName(), externalUserId);
+		CorpCustomerAcquisitionLink corpCustomerAcquisitionLink = corpCustomerAcquisitionLinkMapper.selectOne(Wrappers.lambdaQuery(CorpCustomerAcquisitionLink.class).eq(CorpCustomerAcquisitionLink::getLinkId, linkId));
+
+		if(corpCustomerAcquisitionLink != null){
+			//记录发起对话事件
+			CorpCustomerAcquisitionLinkPopularize corpCustomerAcquisitionLinkPopularize = corpCustomerAcquisitionLinkPopularizeMapper.selectOne(Wrappers.lambdaQuery(CorpCustomerAcquisitionLinkPopularize.class)
+					.eq(CorpCustomerAcquisitionLinkPopularize::getIsChat, 1)
+					.eq(CorpCustomerAcquisitionLinkPopularize::getCustomerAcquistionLinkId, corpCustomerAcquisitionLink.getId()).last("limit 1"));
+			if (corpCustomerAcquisitionLinkPopularize != null) {
+				redisService.sSet(RedisService.key.CORP_CUSTOMER_ACQUISTION_START_CHAT_SET.getEnvName(), externalUserId);
+			}
 		}
+
 		return null;
 	}