|
@@ -457,7 +457,7 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, a
|
|
|
tmp["bidopentime"] = qu.Int64All(bidopentime)
|
|
|
}
|
|
|
//
|
|
|
- if appid == "jyOh1XQgUJBQ5bTUlKCyZ1" {
|
|
|
+ if appid == qu.ObjToString(Sysconfig["project_appid"]) {
|
|
|
projectId := GetProjectId(id)
|
|
|
if projectId != "" {
|
|
|
tmp["projectId"] = projectId
|
|
@@ -780,8 +780,9 @@ func GetProjectId(id string) string {
|
|
|
querys := fmt.Sprintf(query, id)
|
|
|
projectId := ""
|
|
|
data := Es.Get("projectset", "projectset", querys)
|
|
|
- if data != nil && *data != nil {
|
|
|
- projectId = qu.ObjToString((*data)[0]["id"])
|
|
|
+ if data != nil && *data != nil && len(*data) > 0 {
|
|
|
+ projectId = qu.ObjToString((*data)[0]["_id"])
|
|
|
+ log.Println("查找到projectId", projectId)
|
|
|
}
|
|
|
return projectId
|
|
|
}
|
|
@@ -794,7 +795,8 @@ func InitProjectId() {
|
|
|
log.Printf("本次共取到%d个projectId\n", count)
|
|
|
}()
|
|
|
save := Sysconfig["save"].(map[string]interface{})
|
|
|
- query := map[string]interface{}{"appid": "jyOh1XQgUJBQ5bTUlKCyZ1"}
|
|
|
+ log.Println(Sysconfig["project_appid"])
|
|
|
+ query := map[string]interface{}{"appid": Sysconfig["project_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{}{}
|