|
@@ -169,6 +169,11 @@ func EventInfoAdd(start, end int64) {
|
|
|
eventtype = INFO
|
|
|
//截取id
|
|
|
ur := ArticleId.FindStringSubmatch(url_)
|
|
|
+ //变更url
|
|
|
+ if table != "jy_logs" {
|
|
|
+ url_ = strings.ReplaceAll(url_, "/jyapp", "")
|
|
|
+ }
|
|
|
+ //
|
|
|
if len(ur) > 1 {
|
|
|
uarr := BDecodeArticleId2ByCheck(ur[1], encrypt.SE, encrypt.SE2)
|
|
|
if len(uarr) > 0 {
|
|
@@ -195,6 +200,11 @@ func EventInfoAdd(start, end int64) {
|
|
|
if len(na) > 1 {
|
|
|
name = util.Unescape(na[1])
|
|
|
}
|
|
|
+ //变更url
|
|
|
+ if table != "jy_logs" {
|
|
|
+ url_ = strings.ReplaceAll(url_, "/jyapp/big/page", "/swordfish/page_big_pc")
|
|
|
+ }
|
|
|
+ //
|
|
|
} else if PcEntIntelligentceMonitorReg.MatchString(url_) && !strings.Contains(refer, "/swordfish/page_big_pc/free/ent_follow") {
|
|
|
eventtype = ENTPORTRAIT
|
|
|
na := PcEntPortraitNameReg.FindStringSubmatch(url_)
|
|
@@ -211,6 +221,11 @@ func EventInfoAdd(start, end int64) {
|
|
|
entId := util.DecodeId(eId)
|
|
|
name = GetEntNameByEntId(entId)
|
|
|
}
|
|
|
+ //变更url
|
|
|
+ if table != "jy_logs" {
|
|
|
+ url_ = strings.ReplaceAll(url_, "/jyapp/big/page", "/swordfish/page_big_pc")
|
|
|
+ }
|
|
|
+ //
|
|
|
} else if ProductIndexReg.MatchString(url_) {
|
|
|
eventtype = PRODUCTINDEX
|
|
|
} else if PcClientReg.MatchString(url_) && strings.Contains(refer, "/swordfish/page_big_pc/my_client") {
|
|
@@ -219,6 +234,11 @@ func EventInfoAdd(start, end int64) {
|
|
|
} else if AppClientReg.MatchString(url_) {
|
|
|
eventtype = CLIENT
|
|
|
name = AppClient(url_)
|
|
|
+ //变更url
|
|
|
+ if table != "jy_logs" {
|
|
|
+ url_ = strings.ReplaceAll(url_, "/jyapp/big/page/client_portrayal?entName=", "/swordfish/page_big_pc/unit_portrayal/")
|
|
|
+ }
|
|
|
+ //
|
|
|
} else if PcProjectMonitorReg.MatchString(url_) {
|
|
|
eventtype = PROJECTPROGRESS
|
|
|
name = ProjectProgress(url_)
|
|
@@ -300,8 +320,8 @@ func GetEntNameByEntId(entId string) (name string) {
|
|
|
return gconv.String((*entinfo)["company_name"])
|
|
|
}
|
|
|
|
|
|
-//潜在项目预测
|
|
|
-//返回title 和 href
|
|
|
+// 潜在项目预测
|
|
|
+// 返回title 和 href
|
|
|
func Forecast(urls string) (title, href string) {
|
|
|
//获取id
|
|
|
re := regexp.MustCompile(`id=([^&]+)`)
|
|
@@ -323,7 +343,7 @@ func Forecast(urls string) (title, href string) {
|
|
|
return "", ""
|
|
|
}
|
|
|
|
|
|
-//关注项目
|
|
|
+// 关注项目
|
|
|
func ProjectProgress(urls string) (title string) {
|
|
|
//获取id
|
|
|
re := regexp.MustCompile(`sid=([^&]+)`)
|
|
@@ -350,7 +370,7 @@ func ProjectProgress(urls string) (title string) {
|
|
|
return gconv.String((*res)["projectname"])
|
|
|
}
|
|
|
|
|
|
-//企业情报监控
|
|
|
+// 企业情报监控
|
|
|
func EntFollow(urls string) string {
|
|
|
re := regexp.MustCompile(`/[^/]+/[^/]+/[^/]+/(.*)`)
|
|
|
|
|
@@ -397,7 +417,7 @@ func AppClient(urls string) string {
|
|
|
return util.GetQueryParam(urls, "entName")
|
|
|
}
|
|
|
|
|
|
-//return title href
|
|
|
+// return title href
|
|
|
func GetInfoByBid(bid string) (string, string) {
|
|
|
title, href := "", ""
|
|
|
res, _ := config.MgoBid.FindById("bidding", bid, `{"title":1,"href":1}`)
|
|
@@ -414,7 +434,7 @@ func GetInfoByBid(bid string) (string, string) {
|
|
|
return title, href
|
|
|
}
|
|
|
|
|
|
-//短地址解密,二次解密带校验和
|
|
|
+// 短地址解密,二次解密带校验和
|
|
|
func BDecodeArticleId2ByCheck(id string, s1, s2 *encrypt.SimpleEncrypt) []string {
|
|
|
if !strings.Contains(id, "+") { //新加密算法解密
|
|
|
id, _ = url.QueryUnescape(id)
|