...
|
...
|
@@ -310,7 +310,7 @@ public class ClickUnionRest { |
|
|
String version = agent.substring(agent.indexOf(" OS ") + 4, agent.indexOf(" like"));
|
|
|
log.info("addUnion4Special version={}", version);
|
|
|
}
|
|
|
|
|
|
|
|
|
@RequestMapping("/addUnion4Jump")
|
|
|
public void addUnion4Stream(ClickUnionRequestBO bo, HttpServletRequest request, HttpServletResponse response) {
|
|
|
clickUnion.info("addUnion4Stream ClickUnionRequestBO{}", bo);
|
...
|
...
|
@@ -339,7 +339,119 @@ public class ClickUnionRest { |
|
|
}
|
|
|
|
|
|
if (agent.indexOf("mac os x") >= 0 || agent.indexOf("iphone") >= 0 ||agent.indexOf("ipad")>0) {
|
|
|
setClickUnionRequestBO(agent,bo,url);
|
|
|
if(agent.contains("os")&&agent.contains("like")){
|
|
|
String version = agent.substring(agent.indexOf(" os ") + 4, agent.indexOf(" like"));
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}
|
|
|
//youku;5.4;ios;10.2;iphone6,1 ---这种情况比较多
|
|
|
else if(agent.contains("youku")){
|
|
|
String version = "";
|
|
|
if(agent.contains("ios")){
|
|
|
int first = agent.indexOf("ios;")+4;
|
|
|
String version1 = agent.substring(first);
|
|
|
version = version1.substring(version1.indexOf(" ")+1, version1.indexOf(";"));
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
} //youku;5.4.1;iphone os;8.4.1;iphone6,2
|
|
|
else if(agent.contains("os")){
|
|
|
int first = agent.indexOf("os;") + 3;
|
|
|
String version1 = agent.substring(first);
|
|
|
version = version1.substring(version1.indexOf(" ") + 1, version1.indexOf(";"));
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}
|
|
|
}
|
|
|
//momochat/7.5.6 ios/664 (iphone 6; ios 10.2; zh_cn; iphone7,2; s1)
|
|
|
else if(agent.contains("momochat")){
|
|
|
String version = "";
|
|
|
if(agent.contains("ios")){
|
|
|
int first = agent.indexOf(" ios ")+4;
|
|
|
String version1 = agent.substring(first);
|
|
|
version = version1.substring(version1.indexOf(" ")+1, version1.indexOf(";"));
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
} //momochat/7.5.6 ios/664 (iphone 6s; iphone os 9.2; zh_cn; iphone8,1; s1)
|
|
|
else if(agent.contains("os")){
|
|
|
int first = agent.indexOf(" os ")+3;
|
|
|
String version1 = agent.substring(first);
|
|
|
version = version1.substring(version1.indexOf(" ")+1, version1.indexOf(";"));
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}
|
|
|
}
|
|
|
else if(agent.contains("ios/")){
|
|
|
String version= "";
|
|
|
if(agent.contains("mozilla")){ // mozilla/5.0,ios/10.0.2,client/5.8.1,device/iphone6.2,theme/red
|
|
|
version = agent.substring(agent.indexOf("ios/")+4,agent.indexOf("client")-1);
|
|
|
}else if (agent.contains("iphone")) { //huazhu/ios/iphone9,2/10.2.1/6.5.3
|
|
|
int last = agent.lastIndexOf("/");
|
|
|
String version1 = agent.substring(0,last);
|
|
|
version = version1.substring(version1.lastIndexOf("/") + 1, version1.length());
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}else{ //ios/6.6 com.jugg.doctor ipad5,3/8.3/768x1024/2.0 /1---这个应该就是ios_6.6
|
|
|
version = agent.substring(agent.indexOf("ios/")+4,agent.indexOf(" "));
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}
|
|
|
}
|
|
|
//365jia news client/cn.ahurls.news/3.5.0_300500.209/ios(7.1|0|iphone)/59c2ed8b88175124c539e0c7a96a18d4eedb3d6c(none|none)/640x1136@2
|
|
|
else if(agent.contains("/ios")){
|
|
|
int first = agent.indexOf("/ios(") + 5;
|
|
|
String version1 = agent.substring(first);
|
|
|
String version = version1.substring(0,version1.indexOf("|"));
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}
|
|
|
else if (agent.contains("ios")){
|
|
|
String version = "";
|
|
|
if(agent.contains("letvshop")){
|
|
|
//letvshop;1.6.6;iphone 6plus;ios-iphone;9.2;zh_cn
|
|
|
int lastIndex = agent.lastIndexOf(";");
|
|
|
String version1 = agent.substring(0,lastIndex);
|
|
|
version = agent.substring(version1.lastIndexOf(";")+1,lastIndex);
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}else if(agent.contains("jxsg")) { //jxsg_ios-1.2.5/0.0.2 (iphone7,2; ios 10.2.1)
|
|
|
int first = agent.lastIndexOf("ios ") + 4;
|
|
|
String version1 = agent.substring(first);
|
|
|
int lastIndex = version1.indexOf(")");
|
|
|
version = version1.substring(version1.indexOf(" ") + 1, lastIndex);
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}else{
|
|
|
int first = agent.lastIndexOf("ios ") + 4;
|
|
|
String version1 = agent.substring(first);
|
|
|
int lastIndex = version1.indexOf(";");
|
|
|
version = version1.substring(0, lastIndex);
|
|
|
bo.setTd("ios_" + version.replaceAll("_", "."));
|
|
|
bo.setClient_type("ios");
|
|
|
bo.setAppid("490655927");
|
|
|
url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
int index = agent.lastIndexOf("android");
|
|
|
if (index > 0) {
|
...
|
...
|
|