Authored by zhengwen.ge

Merge branch 'master' into union_1021

... ... @@ -23,6 +23,7 @@
<value>/ClickUnionRest/addMonitor</value>
<value>/ActivateUnionRest/test</value>
<value>/MobvistaUnionRest/addUnion4Mobvista</value>
<value>/ActivateUnionRest/addActivate</value>
</list>
</property>
<property name="excludeMethods">
... ...
... ... @@ -651,4 +651,64 @@ union_types:
name: RD-qqlaq4
- value: 322
name: RD-qqlaq5
\ No newline at end of file
name: RD-qqlaq5
- value: 323
name: USX-uc1
- value: 324
name: USX-uc2
- value: 325
name: USX-uc3
- value: 326
name: USX-uc4
- value: 327
name: USX-uc5
- value: 328
name: USX-uc6
- value: 329
name: USX-uc7
- value: 330
name: USX-uc8
- value: 331
name: USX-uc9
- value: 332
name: USX-uc10
- value: 333
name: ASZM-fensitong16
- value: 334
name: ASZM-fensitong17
- value: 335
name: ASZM-fensitong18
- value: 336
name: ASZM-fensitong19
- value: 337
name: ASZM-fensitong20
- value: 338
name: ASZM-fensitong21
- value: 339
name: ASZM-fensitong22
- value: 340
name: ASZM-fensitong23
- value: 341
name: ASZM-fensitong24
- value: 342
name: ASZM-fensitong25
\ No newline at end of file
... ...
... ... @@ -86,6 +86,7 @@
<dependency>
<groupId>com.yoho.service.model</groupId>
<artifactId>union-service-model</artifactId>
<version>1.1.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yoho.service.model</groupId>
... ...
... ... @@ -29,10 +29,6 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.yoho.service.model</groupId>
<artifactId>union-service-model</artifactId>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
</dependency>
... ...
... ... @@ -9,7 +9,7 @@ import java.util.concurrent.Executors;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
... ... @@ -17,12 +17,14 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSONObject;
import com.yoho.service.model.union.request.ActivateUnionRequestBO;
import com.yoho.service.model.union.request.ActivateUnionRequestVO;
import com.yoho.service.model.union.response.ActiveUnionResponseBO;
import com.yoho.service.model.union.response.UnionResponse;
import com.yoho.unions.common.constant.UnionConstant;
import com.yoho.unions.common.enums.ClientTypeEnum;
import com.yoho.unions.common.utils.DateUtil;
import com.yoho.unions.common.utils.SpringContextUtil;
import com.yoho.unions.interceptor.RemoteIPInterceptor;
import com.yoho.unions.server.service.IUnionService;
... ... @@ -40,6 +42,8 @@ public class ActivateUnionRest {
static Logger log = LoggerFactory.getLogger(ActivateUnionRest.class);
static Logger activeDingdang = LoggerFactory.getLogger("activeDingdang");
static ExecutorService exe = Executors.newFixedThreadPool(10);
/**
... ... @@ -151,4 +155,26 @@ public class ActivateUnionRest {
}
}
@RequestMapping("/addActivate")
@ResponseBody public ActiveUnionResponseBO activate(HttpServletRequest request) {
JSONObject j = new JSONObject();
j.put("apptype", StringUtils.defaultString(request.getParameter("DEVICETYPE")));
j.put("appid", StringUtils.defaultString(request.getParameter("APPSTOREID")));
j.put("idfa", StringUtils.defaultString(request.getParameter("IDFA")));
j.put("imei", StringUtils.defaultString(request.getParameter("IMEI")));
j.put("udid", StringUtils.defaultString(request.getParameter("UDID")));
String EVENTTIME = StringUtils.defaultString(request.getParameter("EVENTTIME"), "0");
EVENTTIME = DateUtil.long2DateStr(Long.parseLong(EVENTTIME), DateUtil.DATE_TIME_FORMAT);
j.put("dateid", EVENTTIME);
j.put("source", StringUtils.defaultString(request.getParameter("ADNETNAME")));
j.put("ip", StringUtils.defaultString(request.getParameter("IP")));
j.put("collect_ip", "");
j.put("app_key", StringUtils.defaultString(request.getParameter("app_key"), "yohobuy"));
j.put("active_type", "90");
j.put("tdid", StringUtils.defaultString(request.getParameter("TDID")));
j.put("tdsource", "1");
activeDingdang.info(j.toString());
return new ActiveUnionResponseBO();
}
}
... ...
... ... @@ -196,6 +196,7 @@ public class DDServiceImpl implements MainUnionService {
j.put("ip", request.getClientIp());
j.put("collect_ip", "");
j.put("active_type", "15");
j.put("tdid", request.getTdid());
activeDingdang.info(j.toString());
}
return new UnionResponseBO(false, "have activite in 90 days");
... ... @@ -255,6 +256,7 @@ public class DDServiceImpl implements MainUnionService {
j.put("ip", request.getClientIp());
j.put("collect_ip", "");
j.put("active_type", "90");
j.put("tdid", request.getTdid());
activeDingdang.info(j.toString());
j.put("active_type", "15");
... ...
... ... @@ -207,6 +207,7 @@ public class DingdangServiceImpl implements DingdangService {
j.put("source", e == null ? "" : e.getName());
j.put("ip", request.getClientIP());
j.put("collect_ip", "");
j.put("tdid", request.getTdid());
activeDingdang.info(j.toString());
} catch (Exception e) {
log.error("", e);
... ...
... ... @@ -151,6 +151,7 @@ public class GDTServiceImpl implements MainUnionService {
j.put("ip", request.getClientIp());
j.put("collect_ip", "");
j.put("active_type", "15");
j.put("tdid", request.getTdid());
activeDingdang.info(j.toString());
}
return new UnionResponseBO(false, "have activite in 90 days");
... ... @@ -215,6 +216,7 @@ public class GDTServiceImpl implements MainUnionService {
j.put("ip", request.getClientIp());
j.put("collect_ip", "");
j.put("active_type", "90");
j.put("tdid", request.getTdid());
activeDingdang.info(j.toString());
j.put("active_type", "15");
... ...
... ... @@ -10,7 +10,6 @@ import java.util.concurrent.TimeUnit;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import com.yoho.service.model.union.AppTypeModel;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
... ... @@ -281,6 +280,7 @@ public class UnionServiceImpl implements IUnionService {
j.put("collect_ip", "");
j.put("app_key", request.getAppkey());
j.put("active_type", "15");
j.put("tdid", request.getTdid());
activeDingdang.info(j.toString());
}
return new UnionResponse(203, "have activite in 90 days");
... ... @@ -324,6 +324,7 @@ public class UnionServiceImpl implements IUnionService {
j.put("collect_ip", "");
j.put("app_key", request.getAppkey());
j.put("active_type", "90");
j.put("tdid", request.getTdid());
//打印90天的大数据日志
activeDingdang.info(j.toString());
... ...