更新研发
This commit is contained in:
+13
-1
@@ -2,10 +2,12 @@ package app
|
||||
|
||||
import (
|
||||
. "../../../hotime"
|
||||
. "../../../hotime/common"
|
||||
. "../../common"
|
||||
"time"
|
||||
)
|
||||
|
||||
var analyseCtr = Ctr{
|
||||
|
||||
"home_data": func(this *Context) {
|
||||
orgId := ObjToInt(this.Req.FormValue("org_id"))
|
||||
if orgId == 0 {
|
||||
@@ -146,6 +148,16 @@ var analyseCtr = Ctr{
|
||||
|
||||
res["upload_data"] = res.GetMap("upload_data")
|
||||
res["collect_data"] = res.GetMap("collect_data")
|
||||
if res.GetMap("collect_data") == nil {
|
||||
path := "company" + Md5(res.GetString("name")) + time.Now().Format("/200601021504.json")
|
||||
|
||||
data := getCompany(res.GetString("name"), this.Config.GetString("tpt")+"/"+path)
|
||||
if len(data) != 0 {
|
||||
data["path"] = path
|
||||
this.Db.Update("company", Map{"collect_data": data.ToJsonString()}, Map{"id": res.GetCeilInt("id")})
|
||||
res["collect_data"] = data
|
||||
}
|
||||
}
|
||||
this.Display(0, res)
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user