...
|
...
|
@@ -22,6 +22,7 @@ import org.apache.commons.lang.StringUtils; |
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
...
|
...
|
@@ -173,15 +174,18 @@ public class ClickUnionRest { |
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/addUnion4Jump")
|
|
|
@RequestMapping(value = {"/addUnion4Jump", "/addUnion4Jump/goitunes"})
|
|
|
public void addUnion4Stream(ClickUnionRequestBO bo, HttpServletRequest request, HttpServletResponse response) {
|
|
|
clickUnion.info("addUnion4Stream ClickUnionRequestBO{}", bo);
|
|
|
if (null == bo || StringUtils.isEmpty(bo.getUnion_type())) {
|
|
|
return;
|
|
|
}
|
|
|
String downloadDirect = "Y";
|
|
|
if(null != request && null != request.getRequestURI() && request.getRequestURI().endsWith("goitunes")){
|
|
|
downloadDirect = "N";
|
|
|
}
|
|
|
String clientIp = null;
|
|
|
String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
String downloadDirect = bo.getDownloadDirect();
|
|
|
|
|
|
if(StringUtils.isNotEmpty(IP)){
|
|
|
String[] IPS = IP.split(",");
|
...
|
...
|
@@ -367,7 +371,7 @@ public class ClickUnionRest { |
|
|
//response.setHeader("Location",url);
|
|
|
//如果不需要直接下载, 配置参数downloadDirect=N, 跳转应用宝下载
|
|
|
if(null != downloadDirect && "N".equals(downloadDirect.trim())){
|
|
|
url = "http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445";
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}
|
|
|
response.sendRedirect(url);
|
|
|
} catch (Exception e) {
|
...
|
...
|
|