diff --git a/example/app/declare.go b/example/app/declare.go index 1926f94..eeb24cf 100644 --- a/example/app/declare.go +++ b/example/app/declare.go @@ -101,6 +101,7 @@ var DeclareCtr = Ctr{ } company := that.Db.Get("company", "*", Map{"user_id": that.Session("user_id").Data}) + delete(company, "id") delete(company, "salesman_id") delete(company, "provider_id") @@ -489,18 +490,6 @@ var DeclareCtr = Ctr{ that.Display(4, "找不到用户") return } - //消除company没有创建的影响 - if user.GetCeilInt("company_id") == 0 { - companyId := that.Db.Insert("company", Map{ - "user_id": user["id"], - "create_time[#]": "now()", - "modify_time[#]": "now()", - "del_flag": 0, - }) - user["company_id"] = companyId - that.Db.Update("user", Map{"company_id": companyId}, Map{"id": user.GetCeilInt("id")}) - } - companyName := that.Req.FormValue("company_name") if companyName == "" { that.Display(3, "参数错误")