houyaf 3 роки тому
батько
коміт
9648e5d4c1
1 змінених файлів з 6 додано та 6 видалено
  1. 6 6
      web/controllers/user_controller.go

+ 6 - 6
web/controllers/user_controller.go

@@ -20,7 +20,7 @@ func (c *UserController) BeforeActivation(b mvc.BeforeActivation) {
 }
 
 func (c *UserController) GetPage() *JsonResult {
-    params := c.buildParams()
+    params    := c.buildParams()
     data, err := c.Service.GetPage(params)
     if err != nil {
         return ResultErr(err.Error(), nil)
@@ -30,7 +30,7 @@ func (c *UserController) GetPage() *JsonResult {
 }
 
 func (c *UserController) GetById(groupId, accountId int64) *JsonResult {
-    ocId := c.GetCurOcId()
+    ocId      := c.GetCurOcId()
     data, err := c.Service.GetById(ocId, groupId, accountId)
     if err != nil {
         return ResultErr(err.Error(), nil)
@@ -40,9 +40,9 @@ func (c *UserController) GetById(groupId, accountId int64) *JsonResult {
 }
 
 func (c *UserController) Create() *JsonResult {
-    ocId   := c.GetCurOcId()
+    ocId     := c.GetCurOcId()
     ocTypeId := c.GetOcTypeId()
-    user := &viewmodels.UserInfo{}
+    user     := &viewmodels.UserInfo{}
     err := c.Ctx.ReadJSON(user)
     if err != nil {
         return ResultErr("读取数据失败", nil)
@@ -59,7 +59,7 @@ func (c *UserController) Create() *JsonResult {
 
 func (c *UserController) Update() *JsonResult {
     user := &viewmodels.UserInfo{}
-    err := c.Ctx.ReadJSON(user)
+    err  := c.Ctx.ReadJSON(user)
     if err != nil {
         return ResultErr("读取数据失败", nil)
     }
@@ -75,7 +75,7 @@ func (c *UserController) DeleteById(accountId int64) *JsonResult {
     ocId   := c.GetCurOcId()
     userId := c.GetCurUserId()
     
-    var m  = make(map[string]interface{})
+    m := make(map[string]interface{})
     m["ocId"]      = ocId
     m["accountId"] = accountId
     m["deletedBy"] = userId