|
@@ -3,6 +3,7 @@ package front
|
|
|
import (
|
|
|
qu "app.yhyue.com/moapp/jybase/common"
|
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
|
+ elastic "app.yhyue.com/moapp/jybase/es"
|
|
|
"app.yhyue.com/moapp/jybase/redis"
|
|
|
"app.yhyue.com/moapp/jypkg/common/src/qfw/util/bidsearch"
|
|
|
"app.yhyue.com/moapp/jypkg/public"
|
|
@@ -69,7 +70,7 @@ func GetWinnerInfo() (data []*BuyerList) {
|
|
|
|
|
|
for _, v := range *rs {
|
|
|
var vs BuyerList
|
|
|
- id := qu.InterfaceToStr(v["seo_id"])
|
|
|
+ id := qu.InterfaceToStr(v["nseo_id"])
|
|
|
vs.Name = qu.InterfaceToStr(v["name"])
|
|
|
vs.Url = fmt.Sprintf("/qy/%s.html", id)
|
|
|
data = append(data, &vs)
|
|
@@ -116,11 +117,11 @@ func getEntBaseInfo(identityType, limit int) *[]map[string]interface{} {
|
|
|
}
|
|
|
|
|
|
func GetSeoId(identityType, limit int) *[]map[string]interface{} {
|
|
|
- //q := fmt.Sprintf(`{"query": {"bool": {}},"sort": {"updatetime": "desc"},"from": 0,"size": %d,"_source": ["name","seo_id"]}`, config.HotWinnerConfig.Limit)
|
|
|
- //index := qu.If(isWinner, "qyxy", "buyer").(string)
|
|
|
- q := "SELECT company_id AS id,name,name_id,seo_id FROM dws_f_ent_baseinfo WHERE company_id !='' and company_id is not null AND (identity_type &(1 << ?)) > 0 order by latest_time desc limit ?"
|
|
|
- return public.GlobalCommonMysql.SelectBySql(q, identityType, limit)
|
|
|
+ index := qu.If(identityType != 0, "qyxy", "buyer").(string)
|
|
|
+ seo := qu.If(identityType != 0, "nseo_id", "seo_id").(string)
|
|
|
+ q := fmt.Sprintf(`{"query": {"bool": {}},"sort": {"updatetime": "desc"},"from": 0,"size": %d,"_source": ["name","%s"]}`, limit, seo)
|
|
|
|
|
|
+ return elastic.Get(index, index, q)
|
|
|
}
|
|
|
|
|
|
// ContentRecommendation 实用内容推荐
|