|
@@ -696,6 +696,7 @@ func (this *CourseManage) OnLineList() {
|
|
|
perPage, _ := this.GetInteger("perPage")
|
|
|
queryStr := this.GetString("query")
|
|
|
flag := this.GetString("flag")
|
|
|
+ infoId := this.GetString("infoId")
|
|
|
query := map[string]interface{}{}
|
|
|
if queryStr != "" {
|
|
|
query["s_name"] = bson.M{"$regex": queryStr}
|
|
@@ -705,6 +706,9 @@ func (this *CourseManage) OnLineList() {
|
|
|
query["i_status"] = 1
|
|
|
query["l_publishtime"] = bson.M{"$lt":now}
|
|
|
query["l_endtime"] = bson.M{"$gt":now}
|
|
|
+ if infoId != ""{
|
|
|
+ query["_id"] = bson.M{"$ne": bson.ObjectIdHex(infoId)}
|
|
|
+ }
|
|
|
}
|
|
|
query["i_type"] = 3
|
|
|
rData := mongodb.Find("jy_course", query, `{"l_publishtime":-1}`, `{"_id":1,"s_courseDate":1,"i_price":1,"i_status":1,"s_name":1,"l_publishtime":1}`, false, (currentPage-1)*perPage, perPage)
|