Commit 55cac2c3 by lzxry

bugfix

parent 40d455ad
...@@ -7,6 +7,7 @@ import common.repository.*; ...@@ -7,6 +7,7 @@ import common.repository.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import tkio.model.Account; import tkio.model.Account;
import tkio.repository.AccountRepository; import tkio.repository.AccountRepository;
import tkio.repository.AppRepository; import tkio.repository.AppRepository;
...@@ -208,7 +209,8 @@ public class TrackingFlowTask { ...@@ -208,7 +209,8 @@ public class TrackingFlowTask {
//查询用户下所有appkey //查询用户下所有appkey
Account account = accountRepository.findByEmail(email); Account account = accountRepository.findByEmail(email);
if(account==null||account.getRootParent()==null){ if(account==null||account.getRootParent()==null){
logger.info("【单日流量同步】用户不存在:{}",email); logger.warn("【单日流量同步】用户不存在:{}",email);
continue;
} }
List<Account> accountList = accountRepository.findByRootParent(account.getRootParent()); List<Account> accountList = accountRepository.findByRootParent(account.getRootParent());
List<Long> idList = new ArrayList<>(); List<Long> idList = new ArrayList<>();
...@@ -218,7 +220,10 @@ public class TrackingFlowTask { ...@@ -218,7 +220,10 @@ public class TrackingFlowTask {
List<String> appkeys = appRepository.findAppkeysNotDebug(idList); List<String> appkeys = appRepository.findAppkeysNotDebug(idList);
String appkeyStr = String.join("','", appkeys); String appkeyStr = String.join("','", appkeys);
appkeyStr = "'" + appkeyStr + "'"; appkeyStr = "'" + appkeyStr + "'";
if(CollectionUtils.isEmpty(appkeys)){
logger.warn("【单日流量同步】该用户没有appkey:{}",email);
continue;
}
//BigInteger clickNum = accountFlowRestrictService.getTotalNum(yesterday, yesterday, appkeyStr, "account_track_flow_restrict", "click_sum"); //BigInteger clickNum = accountFlowRestrictService.getTotalNum(yesterday, yesterday, appkeyStr, "account_track_flow_restrict", "click_sum");
BigInteger clickNum = flowService.getFlowByAccount(yesterday,yesterday,appkeys); BigInteger clickNum = flowService.getFlowByAccount(yesterday,yesterday,appkeys);
if (clickNum != null && clickNum.longValue() > 0) { if (clickNum != null && clickNum.longValue() > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment