Merge branch 'zct-v2-dengluyang' of https://code.hoteas.com/golang/hotime into zhoupengwei
This commit is contained in:
commit
3d1a1670cc
@ -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, "参数错误")
|
||||
|
Loading…
Reference in New Issue
Block a user