|
@@ -40,7 +40,6 @@ func Consultation(n string, num int) map[string]interface{} {
|
|
)
|
|
)
|
|
req := make(map[string]interface{})
|
|
req := make(map[string]interface{})
|
|
columnCode, _ := config.Sysconfig["columnCode"].(map[string]interface{})
|
|
columnCode, _ := config.Sysconfig["columnCode"].(map[string]interface{})
|
|
-
|
|
|
|
//热点咨询
|
|
//热点咨询
|
|
query := map[string]interface{}{"s_contenttype": util.InterfaceToStr(columnCode["行业资讯"]), "i_status": 1, "releasetime": map[string]interface{}{"$lt": time.Now().Unix()}} //调用行业资讯板块内内容 随机显示10篇
|
|
query := map[string]interface{}{"s_contenttype": util.InterfaceToStr(columnCode["行业资讯"]), "i_status": 1, "releasetime": map[string]interface{}{"$lt": time.Now().Unix()}} //调用行业资讯板块内内容 随机显示10篇
|
|
data1, ok := mongodb.Find("content", query, `{"releasetime":-1,"l_createdate":-1}`, `{"_id":1,"i_viewnum":1,"s_title":1,"s_pic1":1,"s_pic":1,"releasetime":1,"s_description":1,"l_createdate":1,"s_contenttype":1,"s_secondclassifytype":1}`, false, 0, 500)
|
|
data1, ok := mongodb.Find("content", query, `{"releasetime":-1,"l_createdate":-1}`, `{"_id":1,"i_viewnum":1,"s_title":1,"s_pic1":1,"s_pic":1,"releasetime":1,"s_description":1,"l_createdate":1,"s_contenttype":1,"s_secondclassifytype":1}`, false, 0, 500)
|
|
@@ -62,7 +61,7 @@ func Consultation(n string, num int) map[string]interface{} {
|
|
//重要咨询 important
|
|
//重要咨询 important
|
|
query["s_contenttype"] = "ztbgl" //调用招投标攻略的当前栏目外的其他栏目内容
|
|
query["s_contenttype"] = "ztbgl" //调用招投标攻略的当前栏目外的其他栏目内容
|
|
query["s_secondclassifytype"] = map[string]interface{}{
|
|
query["s_secondclassifytype"] = map[string]interface{}{
|
|
- "$ne": []string{n},
|
|
|
|
|
|
+ "$ne": n,
|
|
}
|
|
}
|
|
data2, ok := mongodb.Find("content", query, `{"releasetime":-1,"l_createdate":-1}`, `{"_id":1,"i_viewnum":1,"s_title":1,"s_pic1":1,"s_pic":1,"releasetime":1,"s_description":1,"l_createdate":1,"s_contenttype":1,"s_secondclassifytype":1}`, false, 0, 500)
|
|
data2, ok := mongodb.Find("content", query, `{"releasetime":-1,"l_createdate":-1}`, `{"_id":1,"i_viewnum":1,"s_title":1,"s_pic1":1,"s_pic":1,"releasetime":1,"s_description":1,"l_createdate":1,"s_contenttype":1,"s_secondclassifytype":1}`, false, 0, 500)
|
|
if ok && data2 != nil && len(*data1) > 0 {
|
|
if ok && data2 != nil && len(*data1) > 0 {
|