瀏覽代碼

Merge branch 'feature/v4.7.10' of http://192.168.3.207:8080/qmx/jy into feature/v4.7.10

tsz 3 年之前
父節點
當前提交
2674fdfcbd

+ 2 - 0
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -890,6 +890,7 @@
         </div>
         </div>
         {{if .T.obj.site}}
         {{if .T.obj.site}}
         {{if eq .T.obj.site "剑鱼信息发布平台"}}
         {{if eq .T.obj.site "剑鱼信息发布平台"}}
+        {{if .T.obj.recommended_service}}
         {{if eq .T.obj.recommended_service 1}}
         {{if eq .T.obj.recommended_service 1}}
           <div class="bm-bottom">
           <div class="bm-bottom">
             <div>
             <div>
@@ -909,6 +910,7 @@
         {{end}}
         {{end}}
         {{end}}
         {{end}}
         {{end}}
         {{end}}
+        {{end}}
     </div>
     </div>
 </div>
 </div>
 <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
 <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>

+ 20 - 20
src/jfw/modules/common/src/qfw/util/jy/subscribepush.go

@@ -505,28 +505,28 @@ func (s *subscribePush) GetInfoByIds(Mgo_bidding mg.MongodbSim, bidding, bidding
 	infos := map[string]map[string]interface{}{}
 	infos := map[string]map[string]interface{}{}
 	//redis
 	//redis
 
 
-	//es_ids := ids
-	//for _, v := range ids {
-	//	info_i := redis.Get("pushcache_1", fmt.Sprintf("info_%s", v))
-	//	if info_i != nil {
-	//		info_m, _ := info_i.(map[string]interface{})
-	//		info_m["_id"] = v
-	//		infos[v] = info_m
-	//	} else {
-	//		es_ids = append(es_ids, v)
-	//	}
-	//}
-	//	log.Println(es_ids)
+	es_ids := ids
+	for _, v := range ids {
+		info_i := redis.Get("pushcache_1", fmt.Sprintf("info_%s", v))
+		if info_i != nil {
+			info_m, _ := info_i.(map[string]interface{})
+			info_m["_id"] = v
+			infos[v] = info_m
+		} else {
+			es_ids = append(es_ids, v)
+		}
+	}
+	log.Println(es_ids)
 	//elasticsearch
 	//elasticsearch
-	//if len(es_ids) > 0 {
-	list := elastic.Get("bidding", "bidding", fmt.Sprintf(query, strings.Join(ids, `","`), len(ids)))
-	if list != nil {
-		for _, v := range *list {
-			_id := ObjToString(v["_id"])
-			infos[_id] = v
+	if len(es_ids) > 0 {
+		list := elastic.Get("bidding", "bidding", fmt.Sprintf(query, strings.Join(es_ids, `","`), len(es_ids)))
+		if list != nil {
+			for _, v := range *list {
+				_id := ObjToString(v["_id"])
+				infos[_id] = v
+			}
 		}
 		}
 	}
 	}
-	//}
 	//mongodb bidding
 	//mongodb bidding
 	mgo_ids := []primitive.ObjectID{}
 	mgo_ids := []primitive.ObjectID{}
 	for _, v := range ids {
 	for _, v := range ids {
@@ -576,7 +576,7 @@ func (s *subscribePush) GetInfoByIds(Mgo_bidding mg.MongodbSim, bidding, bidding
 //保存最近7天的数据到历史记录
 //保存最近7天的数据到历史记录
 func (s *subscribePush) MakeHistoryDatas(MQFW mg.MongodbSim, PushMysql *mysql.Mysql, userId string, PushView func(userid, allquery, field string, pageNum, pageSize int) (keys []interface{}, list *[]map[string]interface{})) (bool, []*SubPushList) {
 func (s *subscribePush) MakeHistoryDatas(MQFW mg.MongodbSim, PushMysql *mysql.Mysql, userId string, PushView func(userid, allquery, field string, pageNum, pageSize int) (keys []interface{}, list *[]map[string]interface{})) (bool, []*SubPushList) {
 	log.Println("匹配最近7天数据", userId)
 	log.Println("匹配最近7天数据", userId)
-	field := `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount"`
+	field := `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount","spidercode","site"`
 	allquery := `{"range":{"publishtime":{"gt":%s}}}`
 	allquery := `{"range":{"publishtime":{"gt":%s}}}`
 	allquery = fmt.Sprintf(allquery, fmt.Sprint(time.Now().AddDate(0, 0, -7).Unix()))
 	allquery = fmt.Sprintf(allquery, fmt.Sprint(time.Now().AddDate(0, 0, -7).Unix()))
 	//allquery = ``
 	//allquery = ``

+ 19 - 17
src/jfw/modules/publicapply/src/bidcollection/entity/entity.go

@@ -521,25 +521,27 @@ func GetInfoById(Mgo_bidding mg.MongodbSim, bidding, bidding_back string, idlist
 	}
 	}
 	infos := map[string]map[string]interface{}{}
 	infos := map[string]map[string]interface{}{}
 	//redis
 	//redis
-	//es_ids := ids
-	//for _, v := range ids {
-	//	info_i := redis.Get("pushcache_1", fmt.Sprintf("info_%s", v))
-	//	if info_i != nil {
-	//		info_m, _ := info_i.(map[string]interface{})
-	//		info_m["_id"] = v
-	//		infos[v] = info_m
-	//	} else {
-	//		es_ids = append(es_ids, v)
-	//	}
-	//}
-	//	log.Println(es_ids)
+	es_ids := ids
+	for _, v := range ids {
+		info_i := redis.Get("pushcache_1", fmt.Sprintf("info_%s", v))
+		if info_i != nil {
+			info_m, _ := info_i.(map[string]interface{})
+			info_m["_id"] = v
+			infos[v] = info_m
+		} else {
+			es_ids = append(es_ids, v)
+		}
+	}
+	log.Println(es_ids)
 	//elasticsearch
 	//elasticsearch
 
 
-	list := elastic.Get("bidding", "bidding", fmt.Sprintf(querys, strings.Join(ids, `","`), len(ids)))
-	if list != nil {
-		for _, v := range *list {
-			_id := qu.ObjToString(v["_id"])
-			infos[_id] = v
+	if len(es_ids) > 0 {
+		list := elastic.Get("bidding", "bidding", fmt.Sprintf(querys, strings.Join(es_ids, `","`), len(es_ids)))
+		if list != nil {
+			for _, v := range *list {
+				_id := qu.ObjToString(v["_id"])
+				infos[_id] = v
+			}
 		}
 		}
 	}
 	}
 
 

+ 2 - 0
src/web/templates/weixin/wxinfocontent_rec.html

@@ -1247,6 +1247,7 @@ em {
 </div>
 </div>
 {{if .T.obj.site}}
 {{if .T.obj.site}}
 {{if eq .T.obj.site "剑鱼信息发布平台"}}
 {{if eq .T.obj.site "剑鱼信息发布平台"}}
+{{if .T.obj.recommended_service}}
 {{if eq .T.obj.recommended_service 1}}
 {{if eq .T.obj.recommended_service 1}}
 <div class="bm-bottom">
 <div class="bm-bottom">
   <div>
   <div>
@@ -1266,6 +1267,7 @@ em {
 {{end}}
 {{end}}
 {{end}}
 {{end}}
 {{end}}
 {{end}}
+{{end}}
 <div id="ryhd" class="recovery-head recoveryerror" style="display:none;bottom:60px;">
 <div id="ryhd" class="recovery-head recoveryerror" style="display:none;bottom:60px;">
 	<img class="rhclose" onClick="rhclose('1')" src="{{Msg "seo" "cdn"}}/images/t-close.png"/>
 	<img class="rhclose" onClick="rhclose('1')" src="{{Msg "seo" "cdn"}}/images/t-close.png"/>
 	<div class="rh-content">
 	<div class="rh-content">