Commit eeee45e8 authored by 宋新宇's avatar 宋新宇

短剧APP归因

parent 7b733013
......@@ -87,10 +87,18 @@ public class DyVideoUniversalProcess extends UniversalProcess {
oldMarketRedisTemplate.opsForValue().set(key,value,expires, TimeUnit.SECONDS);
}
public boolean existsOld(String key) {
return Boolean.TRUE.equals(oldMarketRedisTemplate.hasKey(key));
}
public void delToken(String key) {
oldMarketRedisTemplate.delete(key);
}
public void hsetNew(String key, String field, int expire, String value) {
oldMarketRedisTemplate.opsForHash().put(key,field,value);
oldMarketRedisTemplate.expire(key,expire,TimeUnit.SECONDS);
}
public String getTotalCountKey(AttributionType attributionType, int platformId, Long channelOrPlanId ,int sprDedu, String dateStr) {
......
......@@ -117,7 +117,7 @@ public class DyvideoBehaviorFlow extends NodeSwitchFlow<StoryNovelAction> {
dyMarketPlatformAppIdList = Arrays.asList(dyMarketPlatformAppId.split("_"));
String tokenDy = "token_dy_" + dyMarketPlatformAppIdList.get(0);
ThirdAccountDy thirdAccountDy = null;
if (up.exists(tokenDy)) {
if (up.existsOld(tokenDy)) {
thirdAccountDy = up.get(ThirdAccountDy.class, tokenDy);
} else {
thirdAccountDy = up.getDyAccessToken(dyMarketPlatformAppIdList.get(0), dyMarketPlatformAppIdList.get(1),
......@@ -328,9 +328,9 @@ public class DyvideoBehaviorFlow extends NodeSwitchFlow<StoryNovelAction> {
tvcCount += costI;
}
up.hset(upcBehaviorKey,"tvc",60 * 60 * 24 * 3,JSON.toJSONString(tvcCount));
up.hset(upcBehaviorKey,"mvc",60 * 60 * 24 * 3,JSON.toJSONString(motivateCount));
up.hset(upcBehaviorKey,"vec",60 * 60 * 24 * 3,JSON.toJSONString(pecpmCount));
up.hsetNew(upcBehaviorKey,"tvc",60 * 60 * 24 * 3,JSON.toJSONString(tvcCount));
up.hsetNew(upcBehaviorKey,"mvc",60 * 60 * 24 * 3,JSON.toJSONString(motivateCount));
up.hsetNew(upcBehaviorKey,"vec",60 * 60 * 24 * 3,JSON.toJSONString(pecpmCount));
}
......
......@@ -249,6 +249,15 @@ public class AttrController {
@RequestMapping("/sendVideoApp")
public void testSendVideoapp() {
com.alibaba.fastjson.JSONObject dyMarketPlatformAppIdJson = JSON.parseObject(
"{\n"
+ " \"400\": \"ttf2f6844b6dc9702901_d4ac08a22f80f73256836fdd9655dbb0b6e6de7c\",\n"
+ " \"412\": \"ttd3dda5604ce230b401_5aac82a8c76db9c54f187dea7b43b58b233459db\"\n"
+ "}");
String platformKey = String.valueOf(412);
//走平台
String dyMarketPlatformAppId = dyMarketPlatformAppIdJson.getString(platformKey);
String msg = "{\"clientInfo\":{\"channel\":682000,\"clientIp\":\"183.226.74.112\","
+ "\"dID\":\"2705A240-1875-4C38-9529-0343B56B6C49\",\"fixVersion\":4,\"idfa\":\"00000000-0000-0000-0000-000000000000\","
+ "\"language\":\"zh\",\"mainVersion\":1,\"oaid\":\"2705A240-1875-4C38-9529-0343B56B6C49\",\"os\":\"1\","
......
......@@ -22,7 +22,7 @@ spring:
initialSize: 2
minIdle: 2
video-inland:
jdbc-url: jdbc:mysql://rm-2zeo09186ukqa8zh1.mysql.rds.aliyuncs.com:3306/video-inland?zeroDateTimeBehavior=CONVERT_TO_NULL&characterEncoding=utf8&autoReconnect=true
jdbc-url: jdbc:mysql://rm-2zeyw42052h06f905.mysql.rds.aliyuncs.com:3306/video-inland?zeroDateTimeBehavior=CONVERT_TO_NULL&characterEncoding=utf8&serverTimezone=Asia/Shanghai&autoReconnect=true
username: video
password: hdTImXLlzOEbP5bk
driver-class-name: com.mysql.cj.jdbc.Driver
......
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