houyaf hace 3 años
padre
commit
eb06cb09b1

+ 3 - 3
pkg/system/controller/oc_controller.go

@@ -28,7 +28,7 @@ func (c *OcController) BeforeActivation(b mvc.BeforeActivation) {
 }
 
 func (c *OcController) GetList() *JsonResult {
-    params := c.buildParams()
+    params   := c.buildParams()
     ocTypeId := c.Ctx.URLParamInt64Default("ocTypeId", 0)
     if ocTypeId > 0 {
         params["ocTypeId"] = ocTypeId
@@ -47,7 +47,7 @@ func (c *OcController) GetList() *JsonResult {
 }
 
 func (c *OcController) GetPage() *JsonResult {
-    params := c.buildParams()
+    params   := c.buildParams()
     ocTypeId := c.Ctx.URLParamInt64Default("ocTypeId", 0)
     if ocTypeId > 0 {
         params["ocTypeId"] = ocTypeId
@@ -110,7 +110,7 @@ func (c *OcController) DeleteByID(ocId int64) *JsonResult {
     userId := c.GetCurUserId()
 
     m := make(map[string]interface{})
-    m["ocId"] = ocId
+    m["ocId"]      = ocId
     m["deletedBy"] = userId
     if err := c.Service.Delete(m); err != nil {
         return ResultErr(err.Error(), nil)

+ 1 - 1
pkg/system/controller/oc_type_controller.go

@@ -85,7 +85,7 @@ func (c *OcTypeController) DeleteByID(ocTypeId int64) *JsonResult {
     userId := c.GetCurUserId()
 
     m := make(map[string]interface{})
-    m["ocTypeId"] = ocTypeId
+    m["ocTypeId"]  = ocTypeId
     m["deletedBy"] = userId
     if err := c.Service.Delete(m); err != nil {
         return ResultErr(err.Error(), nil)

+ 4 - 4
pkg/system/controller/position_controller.go

@@ -54,7 +54,7 @@ func (c *PositionController) Create() *JsonResult {
     userId := c.GetCurUserId()
 
     position := datamodel.Position{}
-    position.OcId = ocId
+    position.OcId      = ocId
     position.CreatedBy = userId
     if err := c.Ctx.ReadJSON(&position); err != nil {
         return ResultErr("读取数据失败", nil)
@@ -77,7 +77,7 @@ func (c *PositionController) Update() *JsonResult {
         return ResultErr("读取数据失败", nil)
     }
 
-    position.OcId = ocId
+    position.OcId      = ocId
     position.UpdatedBy = userId
     if err := c.Service.Update(&position); err != nil {
         return ResultErr(err.Error(), nil)
@@ -91,9 +91,9 @@ func (c *PositionController) DeleteByID(positionId int64) *JsonResult {
     userId := c.GetCurUserId()
 
     m := make(map[string]interface{})
-    m["ocId"] = ocId
+    m["ocId"]       = ocId
     m["positionId"] = positionId
-    m["deletedBy"] = userId
+    m["deletedBy"]  = userId
     if err := c.Service.Delete(m); err != nil {
         return ResultErr(err.Error(), nil)
     } else {

+ 2 - 1
pkg/system/controller/role_controller.go

@@ -81,8 +81,9 @@ func (c *RoleController) Update() *JsonResult {
 
 func (c *RoleController) DeleteById(roleId int64) *JsonResult {
     userId := c.GetCurUserId()
+
     m := make(map[string]interface{})
-    m["roleId"] = roleId
+    m["roleId"]    = roleId
     m["deletedBy"] = userId
     if err := c.Service.Delete(m); err != nil {
         return ResultErr(err.Error(), nil)

+ 2 - 2
pkg/system/controller/task_cat_controller.go

@@ -87,11 +87,11 @@ func (c *TaskCatController) Update() *JsonResult {
 }
 
 func (c *TaskCatController) DeleteByID(taskCatId int64) *JsonResult {
-    ocId := c.GetCurOcId()
+    ocId   := c.GetCurOcId()
     userId := c.GetCurUserId()
 
     m := make(map[string]interface{})
-    m["ocId"] = ocId
+    m["ocId"]      = ocId
     m["taskCatId"] = taskCatId
     m["deletedBy"] = userId
     if err := c.Service.Delete(m); err != nil {

+ 3 - 3
pkg/system/controller/task_controller.go

@@ -77,7 +77,7 @@ func (c *TaskController) Update() *JsonResult {
         return ResultErr("读取数据失败", nil)
     }
 
-    task.OcId = ocId
+    task.OcId      = ocId
     task.UpdatedBy = userId
     if err := c.Service.Update(task); err != nil {
         return ResultErr(err.Error(), nil)
@@ -91,8 +91,8 @@ func (c *TaskController) DeleteByID(taskId int64) *JsonResult {
     userId := c.GetCurUserId()
 
     m := make(map[string]interface{})
-    m["ocId"] = ocId
-    m["taskId"] = taskId
+    m["ocId"]      = ocId
+    m["taskId"]    = taskId
     m["deletedBy"] = userId
     if err := c.Service.Delete(m); err != nil {
         return ResultErr(err.Error(), nil)