Browse Source

fix:上下文搜索修改

duxin 2 years ago
parent
commit
916253e7c7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/jfw/jyutil/classroomiInfo.go

+ 2 - 1
src/jfw/jyutil/classroomiInfo.go

@@ -328,7 +328,7 @@ func GetNextInfo(_id string, keyWord ...string) (lastId, nextId string) {
 			"$lt": time.Now().Unix(),
 		},
 	}
-	for _, t := range []string{"s_contenttype", "s_secondclassifytype", "s_threeclassifytype"} {
+	for _, t := range []string{"s_contenttype"} {
 		if tv, _ := (*doc)[t].(string); tv != "" {
 			commonQuery[t] = tv
 		}
@@ -338,6 +338,7 @@ func GetNextInfo(_id string, keyWord ...string) (lastId, nextId string) {
 			"$regex": keyWord[0],
 		}
 	}
+	log.Println("content上下文query:", commonQuery)
 	dataOn, ok := mongodb.Find("content", commonQuery, `{"releasetime":-1,"l_createdate":-1}`, `{"_id":1,"i_viewnum":1,releasetime":-1,"l_createdate":1}`, false, -1, -1)
 	if ok && dataOn != nil && len(*dataOn) > 0 {
 		for k, v := range *dataOn {