...
|
...
|
@@ -210,7 +210,7 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher |
|
|
clickUnion.info("clickUnion set redis with key={}, value={}", key, JSON.toJSONString(request));
|
|
|
yhValueOperations.set(key, JSON.toJSONString(request));
|
|
|
String invalidTime = "activeTime"+"_"+request.getUnion_type();
|
|
|
DynamicIntProperty activeTime = DynamicPropertyFactory.getInstance().getIntProperty(invalidTime, 3);
|
|
|
DynamicIntProperty activeTime = DynamicPropertyFactory.getInstance().getIntProperty(invalidTime, 48);
|
|
|
yHRedisTemplate.longExpire(key, activeTime.get(), TimeUnit.HOURS);
|
|
|
|
|
|
|
...
|
...
|
@@ -419,12 +419,39 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher |
|
|
app_key = "yohomars_ios";
|
|
|
}
|
|
|
List<AppActivateIdfaList> _90DayIdfaList = appActivateIdfaListDAO.selectByUdidAndDate(new AppActivateIdfaList(Long.valueOf(yesterday), request.getUdid(), app_key));
|
|
|
activeUnion.info("check ios active info in 90 days. udid is {} and app_key is {},yesterday is {} and result is {}", request.getUdid(), app_key, yesterday, _90DayIdfaList);
|
|
|
// List<AppActivateIdfaList> _15DayIdfaList = appActivateIdfaListDAO.select15DaysByIdfaAndDate(new AppActivateIdfaList(Long.valueOf(yesterday), request.getUdid(), app_key));
|
|
|
activeUnion.info("check ios active info in 90 days. udid is {} and app_key is {},yesterday is {} and result is {}", request.getUdid(), app_key, yesterday, (_90DayIdfaList.isEmpty())? "null": _90DayIdfaList.get(0));
|
|
|
|
|
|
List<AppActivateIdfaList> _15DayIdfaList = appActivateIdfaListDAO.select15DaysByIdfaAndDate(new AppActivateIdfaList(Long.valueOf(yesterday), request.getIdfa(), app_key, null));
|
|
|
activeUnion.info("check ios active info in 15 days. udid is {} and app_key is {},yesterday is {} and result is {}", request.getUdid(), app_key, yesterday, (_90DayIdfaList.isEmpty())? "null": _15DayIdfaList.get(0));
|
|
|
|
|
|
//判断90天内是否在大数据有记录
|
|
|
if (CollectionUtils.isNotEmpty(_90DayIdfaList)) {
|
|
|
log.warn("ios activateUnion error because 90 days has activate in bigdata database info with param is {}", request);
|
|
|
//判断15天内是否在大数据有记录
|
|
|
if (CollectionUtils.isNotEmpty(_15DayIdfaList)) {
|
|
|
//15天内有记录,退出
|
|
|
log.warn("activateUnion error because 15 days has activate in bigdata database info with param is {}", request);
|
|
|
} else {
|
|
|
//根据mkt_markering
|
|
|
//15天内没有记录,则记录大数据日志,退出
|
|
|
JSONObject j = new JSONObject();
|
|
|
j.put("apptype", request.getClient_type());
|
|
|
j.put("appid", click.getAppid());
|
|
|
j.put("idfa", request.getIdfa());
|
|
|
j.put("imei", request.getImei());
|
|
|
j.put("udid", request.getUdid());
|
|
|
j.put("dateid", DateUtil.getcurrentDateTime());
|
|
|
j.put("source", u == null ? "" : u.getName());
|
|
|
j.put("source_id",click.getUnion_type());
|
|
|
j.put("ip", request.getClientIp());
|
|
|
j.put("collect_ip", "");
|
|
|
j.put("app_key", request.getAppkey());
|
|
|
j.put("active_type", "15");
|
|
|
j.put("tdid", request.getTdid());
|
|
|
activeDingdang.info(j.toString());
|
|
|
}
|
|
|
return new UnionResponse(200, "have activite in 90 days",result);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -497,6 +524,10 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher |
|
|
j.put("interfaceType",click.getInterfaceType());
|
|
|
//打印90天的大数据日志
|
|
|
activeDingdang.info(j.toString());
|
|
|
//打印15天的日志
|
|
|
j.put("active_type", "15");
|
|
|
activeDingdang.info(j.toString());
|
|
|
|
|
|
|
|
|
String source = u == null ? "" : u.getName();
|
|
|
String source_id = click.getUnion_type();
|
...
|
...
|
|