Authored by gemingdan

微信次留上报

... ... @@ -25,6 +25,7 @@ import com.yoho.unions.server.service.IUnionService;
/**
* 广点通7天之内的点击算有效推广--微信mp推广
* 已废弃 todo 过段时间确定删除class
* Created by yoho on 2016/10/21.
*/
@Service("UnionServiceImpl_3")
... ...
... ... @@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit;
@Service("UnionServiceImpl_201909")
public class GDTwx2019ServiceImpl extends GDT2019ServiceImpl {
private static final String CL_KEY = "yh:union:cl:";
@Resource
RedisValueCache redisValueCache;
... ... @@ -50,9 +50,18 @@ public class GDTwx2019ServiceImpl extends GDT2019ServiceImpl {
@Override
public Pair<Integer, String> visitCallbackUrl(String url, ClickUnionRequestBO clickBO) {
Pair<Integer, String> result = visitCallbackUrl(url, clickBO, 0);
//调用成功需要保存点击数据用于其他类型时间回调,例如次留
String dateStr = DateUtil.getToday( "MMdd");
String okey = CL_KEY + dateStr+ "_" + clickBO.getUdid();
redisValueCache.set(okey,JSON.toJSONString(clickBO), 2*24, TimeUnit.HOURS);
activeUnion.info("GDTwx2019ServiceImpl visitCallbackUrl end,result is {},clickBO is {}.",result,clickBO);
return result;
}
@Override
public Pair<Integer, String> visitCallbackUrl(String url, ClickUnionRequestBO clickBO,int type) {
activeUnion.info("GDTwx2019ServiceImpl super.visitCallbackUrl,url is {},clickBO is {},type is {}.",url,clickBO,type);
return super.visitCallbackUrl(url, clickBO, type);
}
@Override
String getRefreshToken(String keypre) {
... ...