|
@@ -206,6 +206,8 @@ public class ArticleController extends BaseController {
|
|
String subReferer = "";
|
|
String subReferer = "";
|
|
if (referer.length() > 200) {
|
|
if (referer.length() > 200) {
|
|
subReferer = referer.substring(0, 190);
|
|
subReferer = referer.substring(0, 190);
|
|
|
|
+ } else {
|
|
|
|
+ subReferer = referer;
|
|
}
|
|
}
|
|
source = source(referer);
|
|
source = source(referer);
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
@@ -338,26 +340,34 @@ public class ArticleController extends BaseController {
|
|
private String source(String link) {
|
|
private String source(String link) {
|
|
if (link.contains("baidu.com")) {
|
|
if (link.contains("baidu.com")) {
|
|
return "1";
|
|
return "1";
|
|
- } else if (link.contains("www.so.com")) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("www.so.com")) {
|
|
return "2";
|
|
return "2";
|
|
- } else if (link.contains("google")) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("google")) {
|
|
return "3";
|
|
return "3";
|
|
- } else if (link.contains("m.sm.cn")) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("m.sm.cn")) {
|
|
return "4";
|
|
return "4";
|
|
- } else if (link.contains("toutiao.com")) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("toutiao.com")) {
|
|
return "5";
|
|
return "5";
|
|
- } else if (link.contains("sogou.com")) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("sogou.com")) {
|
|
return "6";
|
|
return "6";
|
|
- } else if (link.contains("servicewechat.com")) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("servicewechat.com")) {
|
|
return "7";
|
|
return "7";
|
|
- } else if (link.contains("weibo.com")) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("weibo.com")) {
|
|
return "8";
|
|
return "8";
|
|
- } else if (link.contains("caimei365.com")) {
|
|
|
|
- return "0";
|
|
|
|
- } else if (link.contains("zzjtest.gz.aeert.com")) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("caimei365.com")) {
|
|
return "0";
|
|
return "0";
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("zzjtest.gz.aeert.com")) {
|
|
return "0";
|
|
return "0";
|
|
}
|
|
}
|
|
|
|
+ return null;
|
|
}
|
|
}
|
|
}
|
|
}
|