houyaf преди 3 години
родител
ревизия
4fff4d3350
променени са 1 файла, в които са добавени 6 реда и са изтрити 9 реда
  1. 6 9
      web/controllers/app_cat_controller.go

+ 6 - 9
web/controllers/app_cat_controller.go

@@ -21,7 +21,7 @@ func (c *AppCatController) BeforeActivation(b mvc.BeforeActivation) {
 }
 
 func (c *AppCatController) GetByList() *JsonResult {
-    params := c.buildParams()
+    params    := c.buildParams()
     data, err := c.Service.GetByList(params)
     if err != nil {
         return ResultErr(err.Error(), nil)
@@ -30,7 +30,7 @@ func (c *AppCatController) GetByList() *JsonResult {
 }
 
 func (c *AppCatController) GetByPage() *JsonResult {
-    params := c.buildParams()
+    params    := c.buildParams()
     data, err := c.Service.GetByPage(params)
     if err != nil {
         return ResultErr(err.Error(), nil)
@@ -40,7 +40,7 @@ func (c *AppCatController) GetByPage() *JsonResult {
 }
 
 func (c *AppCatController) GetById(appCatId int64) *JsonResult {
-    ocId := c.GetCurOcId()
+    ocId      := c.GetCurOcId()
     data, err := c.Service.GetById(ocId, appCatId)
     if err != nil {
         return ResultErr(err.Error(), nil)
@@ -50,8 +50,7 @@ func (c *AppCatController) GetById(appCatId int64) *JsonResult {
 }
 
 func (c *AppCatController) Create() *JsonResult {
-    userId   := c.GetCurUserId()
-    
+    userId := c.GetCurUserId()
     appCat := datamodels.AppCat{}
     appCat.CreatedBy = userId
     err := c.Ctx.ReadJSON(&appCat)
@@ -68,8 +67,7 @@ func (c *AppCatController) Create() *JsonResult {
 }
 
 func (c *AppCatController) Update() *JsonResult {
-    userId   := c.GetCurUserId()
-    
+    userId := c.GetCurUserId()
     appCat := datamodels.AppCat{}
     if err := c.Ctx.ReadJSON(&appCat); err != nil {
         return ResultErr("读取数据失败", nil)
@@ -87,8 +85,7 @@ func (c *AppCatController) Update() *JsonResult {
 func (c *AppCatController) DeleteByID(appCatId int64) *JsonResult {
     ocId   := c.GetCurOcId()
     userId := c.GetCurUserId()
-    
-    var m  = make(map[string]interface{})
+    m  := make(map[string]interface{})
     m["ocId"]      = ocId
     m["appCatId"]= appCatId
     m["deletedBy"] = userId