houyaf 3 tahun lalu
induk
melakukan
5bd3b0b89a

TEMPAT SAMPAH
build/go_build_main_go.exe


+ 10 - 10
pkg/app/controller/app_cat_controller.go

@@ -12,12 +12,12 @@ type AppCatController struct {
 }
 
 func (c *AppCatController) BeforeActivation(b mvc.BeforeActivation) {
-    b.Handle("GET",         "/",                         "GetList"    )
-    b.Handle("GET",         "/page",                     "GetPage"    )
-    b.Handle("GET",         "/{appCatId:int64}",         "GetById"    )
-    b.Handle("POST",         "/add",                     "Create"    )
-    b.Handle("PUT",         "/update",                     "Update"    )
-    b.Handle("DELETE",         "/{appCatId:int64}",         "DeleteByID")
+    b.Handle("GET",         "/",                            "GetList"       )
+    b.Handle("GET",         "/page",                        "GetPage"       )
+    b.Handle("GET",         "/{appCatId:int64}",            "GetById"       )
+    b.Handle("POST",        "/add",                         "Create"        )
+    b.Handle("PUT",         "/update",                      "Update"        )
+    b.Handle("DELETE",      "/{appCatId:int64}",            "DeleteByID"    )
 }
 
 func (c *AppCatController) GetList() *JsonResult {
@@ -82,13 +82,13 @@ func (c *AppCatController) Update() *JsonResult {
 }
 
 func (c *AppCatController) DeleteByID(appCatId int64) *JsonResult {
-    ocId := c.GetCurOcId()
+    ocId   := c.GetCurOcId()
     userId := c.GetCurUserId()
 
     m := make(map[string]interface{})
-    m["ocId"] = ocId
-    m["appCatId"] = appCatId
-    m["deletedBy"] = userId
+    m["ocId"]       = ocId
+    m["appCatId"]   = appCatId
+    m["deletedBy"]  = userId
     if err := c.Service.Delete(m); err != nil {
         return ResultErr(err.Error(), nil)
     } else {

+ 9 - 9
pkg/app/controller/app_controller.go

@@ -12,12 +12,12 @@ type AppController struct {
 }
 
 func (c *AppController) BeforeActivation(b mvc.BeforeActivation) {
-    b.Handle("GET",     "/",                         "GetList"    )
-    b.Handle("GET",     "/page",                     "GetPage"    )
-    b.Handle("GET",     "/{appId:int64}",             "GetById"    )
-    b.Handle("POST",     "/add",                     "Create"    )
-    b.Handle("PUT",     "/update",                     "Update"    )
-    b.Handle("DELETE",     "/{appId:int64}",             "DeleteByID")
+    b.Handle("GET",         "/",                            "GetList"    )
+    b.Handle("GET",         "/page",                        "GetPage"    )
+    b.Handle("GET",         "/{appId:int64}",               "GetById"    )
+    b.Handle("POST",        "/add",                         "Create"     )
+    b.Handle("PUT",         "/update",                      "Update"     )
+    b.Handle("DELETE",      "/{appId:int64}",               "DeleteByID" )
 }
 
 func (c *AppController) GetList() *JsonResult {
@@ -81,12 +81,12 @@ func (c *AppController) Update() *JsonResult {
 }
 
 func (c *AppController) DeleteByID(appId int64) *JsonResult {
-    ocId := c.GetCurOcId()
+    ocId   := c.GetCurOcId()
     userId := c.GetCurUserId()
 
     m := make(map[string]interface{})
-    m["ocId"] = ocId
-    m["appId"] = appId
+    m["ocId"]      = ocId
+    m["appId"]     = appId
     m["deletedBy"] = userId
 
     if err := c.Service.Delete(m); err != nil {

+ 10 - 10
pkg/app/controller/app_permit_controller.go

@@ -12,12 +12,12 @@ type AppPermitController struct {
 }
 
 func (c *AppPermitController) BeforeActivation(b mvc.BeforeActivation) {
-    b.Handle("GET",         "",                                                 "GetList"    )
-    b.Handle("GET",         "/{appId:int64}/{roleId:int64}/{permitId:int64}",     "GetById"    )
+    b.Handle("GET",         "",                                                  "GetList"    )
+    b.Handle("GET",         "/{appId:int64}/{roleId:int64}/{permitId:int64}",    "GetById"    )
     b.Handle("GET",         "/{appId:int64}/{roleId:int64}",                     "GetListById")
-    b.Handle("POST",         "/add",                                             "Create"    )
-    b.Handle("PUT",         "/update",                                             "Update"    )
-    b.Handle("DELETE",         "/{appId:int64}/{roleId:int64}/{permitId:int64}",     "DeleteByID")
+    b.Handle("POST",        "/add",                                              "Create"     )
+    b.Handle("PUT",         "/update",                                           "Update"     )
+    b.Handle("DELETE",      "/{appId:int64}/{roleId:int64}/{permitId:int64}",    "DeleteByID" )
 }
 
 func (c *AppPermitController) GetList() *JsonResult {
@@ -53,7 +53,7 @@ func (c *AppPermitController) GetListById(appId, roleId int64) *JsonResult {
 }
 
 func (c *AppPermitController) Create() *JsonResult {
-    userId := c.GetCurUserId()
+    userId    := c.GetCurUserId()
     appPermit := datamodel.AppPermit{
         CreatedBy: userId,
     }
@@ -70,7 +70,7 @@ func (c *AppPermitController) Create() *JsonResult {
 }
 
 func (c *AppPermitController) Update() *JsonResult {
-    userId := c.GetCurUserId()
+    userId    := c.GetCurUserId()
     appPermit := datamodel.AppPermit{}
     if err := c.Ctx.ReadJSON(&appPermit); err != nil {
         return ResultErr("读取数据失败", nil)
@@ -88,9 +88,9 @@ func (c *AppPermitController) DeleteByID(appId, roleId, permitId int64) *JsonRes
     userId := c.GetCurUserId()
 
     m := make(map[string]interface{})
-    m["appId"] = appId
-    m["roleId"] = roleId
-    m["permitId"] = permitId
+    m["appId"]     = appId
+    m["roleId"]    = roleId
+    m["permitId"]  = permitId
     m["deletedBy"] = userId
     if err := c.Service.Delete(m); err != nil {
         return ResultErr(err.Error(), nil)

+ 3 - 3
pkg/system/repository/msg_repo.go

@@ -116,7 +116,7 @@ func (d *MsgRepo) GetList(m map[string]interface{}) ([]viewmodel.MsgInfo, error)
                             MC.is_detailed,
                             M.status,
                             M.msg_time       `
-    sqlFrom := `  FROM      msg       AS M
+    sqlFrom  := `   FROM      msg       AS M
                     LEFT JOIN account   AS A  ON (M.oc_id       = A.oc_id AND M.msg_fr_id = A.account_id)
                     LEFT JOIN msg_to    AS B  ON (M.oc_id       = B.oc_id AND M.msg_id    = B.msg_id AND B.msg_to_id=#{msgToCc, jdbcType=BIGINT})
                     LEFT JOIN msg_cc    AS C  ON (M.oc_id       = C.oc_id AND M.msg_id    = C.msg_id AND C.msg_cc_id=#{msgToCc, jdbcType=BIGINT})
@@ -175,12 +175,12 @@ func (d *MsgRepo) GetById(ocId, msgId int64) (*viewmodel.MsgInfo, error) {
                             MC.is_detailed,
                             M.status,
                             M.msg_time       `
-    sqlFrom := `  FROM      msg       AS M
+    sqlFrom   := `  FROM      msg       AS M
                     LEFT JOIN account   AS A  ON (M.oc_id       = A.oc_id AND M.msg_fr_id = A.account_id)
                     LEFT JOIN msg_to    AS B  ON (M.oc_id       = B.oc_id AND M.msg_id    = B.msg_id AND B.msg_to_id=#{msgToCc, jdbcType=BIGINT})
                     LEFT JOIN msg_cc    AS C  ON (M.oc_id       = C.oc_id AND M.msg_id    = C.msg_id AND C.msg_cc_id=#{msgToCc, jdbcType=BIGINT})
                     LEFT JOIN msg_cat   AS MC ON (MC.msg_cat_id = M.msg_cat_id)  `
-    sqlWhere := `  WHERE  A.deleted_flag = 0 `
+    sqlWhere := `   WHERE  A.deleted_flag = 0   `
     sqlWhere += fmt.Sprintf(" AND A.oc_id = %d ", ocId)
     sqlWhere += fmt.Sprintf(" AND A.msg_id  = %d ", msgId)
     data := &viewmodel.MsgInfo{}