|
@@ -77,10 +77,10 @@ public class UnionServiceImpl implements IUnionService { |
|
@@ -77,10 +77,10 @@ public class UnionServiceImpl implements IUnionService { |
77
|
log.warn("clickUnion error because appid is empty with param is {}", request);
|
77
|
log.warn("clickUnion error because appid is empty with param is {}", request);
|
78
|
return new UnionResponse(201, "appid is empty");
|
78
|
return new UnionResponse(201, "appid is empty");
|
79
|
}
|
79
|
}
|
80
|
- if (StringUtils.isEmpty(request.getTd())) {
|
|
|
81
|
- log.warn("clickUnion error because td is empty with param is {}", request);
|
|
|
82
|
- return new UnionResponse(201, "td is empty");
|
|
|
83
|
- }
|
80
|
+// if (StringUtils.isEmpty(request.getTd())) {
|
|
|
81
|
+// log.warn("clickUnion error because td is empty with param is {}", request);
|
|
|
82
|
+// return new UnionResponse(201, "td is empty");
|
|
|
83
|
+// }
|
84
|
if (StringUtils.isEmpty(request.getUnion_type())) {
|
84
|
if (StringUtils.isEmpty(request.getUnion_type())) {
|
85
|
log.warn("clickUnion error because union_type is empty with param is {}", request);
|
85
|
log.warn("clickUnion error because union_type is empty with param is {}", request);
|
86
|
return new UnionResponse(201, "union_type is empty");
|
86
|
return new UnionResponse(201, "union_type is empty");
|
|
@@ -100,8 +100,10 @@ public class UnionServiceImpl implements IUnionService { |
|
@@ -100,8 +100,10 @@ public class UnionServiceImpl implements IUnionService { |
100
|
// }
|
100
|
// }
|
101
|
|
101
|
|
102
|
//组装redis保存的key
|
102
|
//组装redis保存的key
|
103
|
- String key = UNION_KEY + "_" + request.getClientIp() + "_" + request.getTd();
|
|
|
104
|
-
|
103
|
+ String key = UNION_KEY + "_" + request.getClientIp();
|
|
|
104
|
+ if (StringUtils.isNotEmpty(request.getTd())) {
|
|
|
105
|
+ key += "_" + request.getTd();
|
|
|
106
|
+ }
|
105
|
// String value = yhValueOperations.get(key);
|
107
|
// String value = yhValueOperations.get(key);
|
106
|
// log.info("clickUnion get key={}, value={}", key, value);
|
108
|
// log.info("clickUnion get key={}, value={}", key, value);
|
107
|
// //如果redis中已经存在该用户点击信息,则不再重复保存
|
109
|
// //如果redis中已经存在该用户点击信息,则不再重复保存
|
|
@@ -185,9 +187,9 @@ public class UnionServiceImpl implements IUnionService { |
|
@@ -185,9 +187,9 @@ public class UnionServiceImpl implements IUnionService { |
185
|
String key = UNION_KEY + "_" + request.getClientIp() + "_" + request.getTd();
|
187
|
String key = UNION_KEY + "_" + request.getClientIp() + "_" + request.getTd();
|
186
|
String value = yhValueOperations.get(key);
|
188
|
String value = yhValueOperations.get(key);
|
187
|
if (StringUtils.isEmpty(value) && ClientTypeEnum.IOS.getName().equals(request.getClient_type())) {
|
189
|
if (StringUtils.isEmpty(value) && ClientTypeEnum.IOS.getName().equals(request.getClient_type())) {
|
188
|
- String[] arr = request.getTd().split("_");
|
|
|
189
|
- request.setTd(arr[2] + "_" + arr[3]);
|
|
|
190
|
- key = UNION_KEY + "_" + request.getClientIp() + "_" + request.getTd();
|
190
|
+// String[] arr = request.getTd().split("_");
|
|
|
191
|
+// request.setTd(arr[2] + "_" + arr[3]);
|
|
|
192
|
+ key = UNION_KEY + "_" + request.getClientIp();
|
191
|
value = yhValueOperations.get(key);
|
193
|
value = yhValueOperations.get(key);
|
192
|
}
|
194
|
}
|
193
|
|
195
|
|