...
|
...
|
@@ -77,10 +77,10 @@ public class UnionServiceImpl implements IUnionService { |
|
|
log.warn("clickUnion error because appid is empty with param is {}", request);
|
|
|
return new UnionResponse(201, "appid is empty");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(request.getTd())) {
|
|
|
log.warn("clickUnion error because td is empty with param is {}", request);
|
|
|
return new UnionResponse(201, "td is empty");
|
|
|
}
|
|
|
// if (StringUtils.isEmpty(request.getTd())) {
|
|
|
// log.warn("clickUnion error because td is empty with param is {}", request);
|
|
|
// return new UnionResponse(201, "td is empty");
|
|
|
// }
|
|
|
if (StringUtils.isEmpty(request.getUnion_type())) {
|
|
|
log.warn("clickUnion error because union_type is empty with param is {}", request);
|
|
|
return new UnionResponse(201, "union_type is empty");
|
...
|
...
|
@@ -100,8 +100,10 @@ public class UnionServiceImpl implements IUnionService { |
|
|
// }
|
|
|
|
|
|
//组装redis保存的key
|
|
|
String key = UNION_KEY + "_" + request.getClientIp() + "_" + request.getTd();
|
|
|
|
|
|
String key = UNION_KEY + "_" + request.getClientIp();
|
|
|
if (StringUtils.isNotEmpty(request.getTd())) {
|
|
|
key += "_" + request.getTd();
|
|
|
}
|
|
|
// String value = yhValueOperations.get(key);
|
|
|
// log.info("clickUnion get key={}, value={}", key, value);
|
|
|
// //如果redis中已经存在该用户点击信息,则不再重复保存
|
...
|
...
|
@@ -185,9 +187,9 @@ public class UnionServiceImpl implements IUnionService { |
|
|
String key = UNION_KEY + "_" + request.getClientIp() + "_" + request.getTd();
|
|
|
String value = yhValueOperations.get(key);
|
|
|
if (StringUtils.isEmpty(value) && ClientTypeEnum.IOS.getName().equals(request.getClient_type())) {
|
|
|
String[] arr = request.getTd().split("_");
|
|
|
request.setTd(arr[2] + "_" + arr[3]);
|
|
|
key = UNION_KEY + "_" + request.getClientIp() + "_" + request.getTd();
|
|
|
// String[] arr = request.getTd().split("_");
|
|
|
// request.setTd(arr[2] + "_" + arr[3]);
|
|
|
key = UNION_KEY + "_" + request.getClientIp();
|
|
|
value = yhValueOperations.get(key);
|
|
|
}
|
|
|
|
...
|
...
|
|