|
@@ -144,9 +144,11 @@ func (i *Front) ListInfo() error {
|
|
qu.Debug("query:", coll, query)
|
|
qu.Debug("query:", coll, query)
|
|
if coll == "" {
|
|
if coll == "" {
|
|
coll = util.Config.Fromtable
|
|
coll = util.Config.Fromtable
|
|
|
|
+ //coll = "markwork_wb_zcz"
|
|
}
|
|
}
|
|
i.SetSession("coll", coll) //session中存入查询表
|
|
i.SetSession("coll", coll) //session中存入查询表
|
|
i.SetSession("query", query) //session中存入查询条件
|
|
i.SetSession("query", query) //session中存入查询条件
|
|
|
|
+
|
|
listData := getListInfo(coll, query, pagenum)
|
|
listData := getListInfo(coll, query, pagenum)
|
|
i.T["list"] = listData
|
|
i.T["list"] = listData
|
|
i.T["type"] = stype
|
|
i.T["type"] = stype
|
|
@@ -162,6 +164,9 @@ func (i *Front) ListInfo() error {
|
|
i.T["hasno"] = hasno
|
|
i.T["hasno"] = hasno
|
|
i.T["notag"] = notag
|
|
i.T["notag"] = notag
|
|
checkedNum, allNum := GetCheckedAndAllDataInfo(query, coll) //已标和总数信息
|
|
checkedNum, allNum := GetCheckedAndAllDataInfo(query, coll) //已标和总数信息
|
|
|
|
+ if notag {
|
|
|
|
+ checkedNum = 0
|
|
|
|
+ }
|
|
i.T["checkednum"] = checkedNum
|
|
i.T["checkednum"] = checkedNum
|
|
i.T["allnum"] = allNum
|
|
i.T["allnum"] = allNum
|
|
i.T["pagenum"] = pagenum
|
|
i.T["pagenum"] = pagenum
|
|
@@ -670,6 +675,7 @@ func (i *Front) SyncMarked() {
|
|
tmpMap[f] = val
|
|
tmpMap[f] = val
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ tmpMap["info"] = tmp["info"]
|
|
lock.Lock()
|
|
lock.Lock()
|
|
idArr = append(idArr, id)
|
|
idArr = append(idArr, id)
|
|
result[id] = tmpMap
|
|
result[id] = tmpMap
|
|
@@ -834,6 +840,7 @@ func (i *Front) ReviewList() {
|
|
if user != "0" && user != "-1" {
|
|
if user != "0" && user != "-1" {
|
|
q["modifyuser"] = user
|
|
q["modifyuser"] = user
|
|
}
|
|
}
|
|
|
|
+ i.SetSession("query1", q)
|
|
datas, b := util.MgoM.Find(coll, q, bson.M{"_id": 1}, nil, false, -1, -1)
|
|
datas, b := util.MgoM.Find(coll, q, bson.M{"_id": 1}, nil, false, -1, -1)
|
|
if b && len(*datas) > 0 {
|
|
if b && len(*datas) > 0 {
|
|
i.ServeJson(map[string]interface{}{
|
|
i.ServeJson(map[string]interface{}{
|
|
@@ -853,7 +860,7 @@ func (i *Front) ReviewList() {
|
|
func (i *Front) ReviewDetail(id string) error {
|
|
func (i *Front) ReviewDetail(id string) error {
|
|
defer qu.Catch()
|
|
defer qu.Catch()
|
|
coll, _ := i.GetSession("coll").(string)
|
|
coll, _ := i.GetSession("coll").(string)
|
|
- query, _ := i.GetSession("query").(map[string]interface{})
|
|
|
|
|
|
+ query, _ := i.GetSession("query1").(map[string]interface{})
|
|
rep := getDetail(id, coll) //获取本条公告的信息
|
|
rep := getDetail(id, coll) //获取本条公告的信息
|
|
i.T["otherInfo"] = rep["otherInfo"] //展示关联公告信息
|
|
i.T["otherInfo"] = rep["otherInfo"] //展示关联公告信息
|
|
i.T["moreInfo"] = rep["moreInfo"] //更多关联公告信息
|
|
i.T["moreInfo"] = rep["moreInfo"] //更多关联公告信息
|
|
@@ -1083,7 +1090,6 @@ func (i *Front) ReviewNext() {
|
|
coll := i.GetSession("coll").(string)
|
|
coll := i.GetSession("coll").(string)
|
|
q := bson.M{"_id": bson.M{"$gt": mgo.StringTOBsonId(id)}}
|
|
q := bson.M{"_id": bson.M{"$gt": mgo.StringTOBsonId(id)}}
|
|
info, b := util.MgoM.Find(coll, q, bson.M{"_id": 1}, bson.M{"_id": 1}, false, 0, 1)
|
|
info, b := util.MgoM.Find(coll, q, bson.M{"_id": 1}, bson.M{"_id": 1}, false, 0, 1)
|
|
- qu.Debug(q)
|
|
|
|
if b && len(*info) > 0 {
|
|
if b && len(*info) > 0 {
|
|
nxid := mgo.BsonIdToSId((*info)[0]["_id"])
|
|
nxid := mgo.BsonIdToSId((*info)[0]["_id"])
|
|
i.ServeJson(bson.M{"id": nxid, "exists": true})
|
|
i.ServeJson(bson.M{"id": nxid, "exists": true})
|