Authored by linlong

Merge branch 'master' into hotfix_0307

... ... @@ -27,6 +27,7 @@
<value>/ActivateUnionRest/test</value>
<value>/MobvistaUnionRest/addUnion4Mobvista</value>
<value>/ActivateUnionRest/addActivate</value>
<value>/ActivateUnionRest/addActivateLog</value>
<value>/ActivateUnionRest/queryActivateDeviceId</value>
<value>/UnionRest/addYas</value>
<value>/ActivateUnionRest/queryActivateCount</value>
... ...
... ... @@ -190,6 +190,29 @@ public class ActivateUnionRest {
return new ActiveUnionResponseBO();
}
@RequestMapping("/addActivateLog")
@ResponseBody public ActiveUnionResponseBO activate(ActivateUnionRequestVO request) {
JSONObject j = new JSONObject();
j.put("apptype", request.getClient_type());
j.put("appid", request.getAppid());
j.put("idfa", request.getIdfa());
j.put("imei", request.getImei());
j.put("udid", request.getUdid());
j.put("dateid", request.getDateId());
j.put("source", request.getSourceName());
j.put("source_id",request.getSource());
j.put("ip", request.getClientIp());
j.put("collect_ip", "");
j.put("app_key", request.getAppkey());
j.put("active_type", "90");
j.put("tdid", request.getTdid());
j.put("interfaceType",request.getInterfaceType());
activeDingdang.info(j.toString());
return new ActiveUnionResponseBO();
}
/**
* 给品友留的后门,如果定时任务没有启动,则通过curl调用接口,直接获取数据,并发送给品友
*/
... ...
... ... @@ -221,7 +221,8 @@ public class PinYouServiceImpl implements IPinYouService {
log.info("pinyou sendUrl union success url={}, and result={}", url, pair);
if (pair.getLeft() != 200) {
log.warn("pinyou callback error with request={}", url);
redisListCache.rightPushAll(UNION_SENDFAIL_KEY,url,24, TimeUnit.HOURS);
url = URLDecoder.decode(url,"UTF-8");
redisListCache.rightPushAll(UNION_SENDFAIL_KEY,url,6, TimeUnit.MINUTES);
return new UnionResponse(204, "callback error");
}
} catch (Exception e) {
... ...
... ... @@ -63,12 +63,11 @@ public class PinYouTask {
List<ViewPinYouRequestBO> viewPinYouRequestBOList = new ArrayList<>();
int viewSizeInt = viewSize == null ? 0 : viewSize.intValue();
int transSizeInt = transSize == null ? 0:transSize.intValue();
log.info("viewSize is {},transSize is {}",viewSizeInt,transSizeInt);
log.info("viewSize is {},transSize is {},failSize is {}",viewSizeInt,transSizeInt,failSize);
List<TransPinYouRequestBO> transPinYouRequestBOList = new ArrayList<>();
if(transSizeInt>0){
for(int i=0; i < limit; i++){
TransPinYouRequestBO transPinYouRequestBO = redisListCache.rightPop(UNION_TRANS_KEY, TransPinYouRequestBO.class);
log.info("transPinYouRequestBO is {}",transPinYouRequestBO);
transPinYouRequestBOList.add(transPinYouRequestBO);
}
}
... ...