Commit 5517ca9a authored by 宋新宇's avatar 宋新宇

dy短剧关键行为优化

parent 870c5e6d
......@@ -83,8 +83,7 @@ public class DyVideoUniversalProcess extends UniversalProcess {
);
}
@Override
public <T> T get(Class<T> clazz, String key) {
public <T> T getOld(Class<T> clazz, String key) {
String value = oldMarketRedisTemplate.opsForValue().get(key);
if(!Objects.isNull(value)){
return JSON.parseObject(value,clazz);
......@@ -229,9 +228,9 @@ public class DyVideoUniversalProcess extends UniversalProcess {
tvcCount += costI;
}
hsetNew(upcBehaviorKey,"tvc",60 * 60 * 24 * 3,JSON.toJSONString(tvcCount));
hsetNew(upcBehaviorKey,"mvc",60 * 60 * 24 * 3,JSON.toJSONString(motivateCount));
hsetNew(upcBehaviorKey,"vec",60 * 60 * 24 * 3,JSON.toJSONString(pecpmCount));
hset(upcBehaviorKey,"tvc",60 * 60 * 24 * 3,JSON.toJSONString(tvcCount));
hset(upcBehaviorKey,"mvc",60 * 60 * 24 * 3,JSON.toJSONString(motivateCount));
hset(upcBehaviorKey,"vec",60 * 60 * 24 * 3,JSON.toJSONString(pecpmCount));
}
......
......@@ -96,7 +96,7 @@ public class DyvideoBehaviorFlow extends NodeSwitchFlow<StoryNovelAction> {
ThirdAccountDy thirdAccountDy = null;
DYVIDEO_SYS_LOG.info("thirdAccountDy url={}",Objects.equals(env.getActiveProfiles()[0],"prod") ? tokenDyProdUrl : tokenDyDevUrl);
if (up.existsOld(tokenDy)) {
thirdAccountDy = up.get(ThirdAccountDy.class, tokenDy);
thirdAccountDy = up.getOld(ThirdAccountDy.class, tokenDy);
} else {
thirdAccountDy = up.getDyAccessToken(dyMarketPlatformAppIdList.get(0), dyMarketPlatformAppIdList.get(1),
Objects.equals(env.getActiveProfiles()[0],"prod") ? tokenDyProdUrl : tokenDyDevUrl);
......
......@@ -38,6 +38,8 @@ public class BiRedisConfig {
StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
template.setKeySerializer(stringRedisSerializer);
template.setValueSerializer(stringRedisSerializer);
template.setHashKeySerializer(stringRedisSerializer);
template.setHashValueSerializer(stringRedisSerializer);
template.setConnectionFactory(redisConnectionFactory);
return template;
}
......
......@@ -34,6 +34,8 @@ public class RedisConfig {
StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
template.setKeySerializer(stringRedisSerializer);
template.setValueSerializer(stringRedisSerializer);
template.setHashKeySerializer(stringRedisSerializer);
template.setHashValueSerializer(stringRedisSerializer);
template.setConnectionFactory(redisConnectionFactory);
return template;
}
......
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