From 7de6a7961182f7ccd17bbdf9488991b3848d8e77 Mon Sep 17 00:00:00 2001 From: hoteas <等> Date: Tue, 10 May 2022 12:54:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=94=BF=E7=AD=96=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/app/declare.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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, "参数错误")