...
|
...
|
@@ -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();
|
|
|
}
|
|
|
} |
...
|
...
|
|