|
@@ -801,7 +801,7 @@ func GetProjectId(id string) string {
|
|
|
return projectId
|
|
|
}
|
|
|
|
|
|
-func InitProjectId() {
|
|
|
+func InitProjectId(appid string) {
|
|
|
session := MgoSave.GetMgoConn()
|
|
|
count := 0
|
|
|
defer func() {
|
|
@@ -809,7 +809,7 @@ func InitProjectId() {
|
|
|
log.Printf("本次共取到%d个projectId\n", count)
|
|
|
}()
|
|
|
save := Sysconfig["save"].(map[string]interface{})
|
|
|
- query := map[string]interface{}{"appid": Sysconfig["project_appid"]}
|
|
|
+ query := map[string]interface{}{"appid": appid}
|
|
|
field := map[string]interface{}{"projectId": 1}
|
|
|
iter := session.DB(qu.ObjToString(save["db"])).C(SaveColl).Find(query).Select(field).Sort("_id").Iter()
|
|
|
thisData := map[string]interface{}{}
|