|
|
@@ -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 {
|
|
|
@@ -40,8 +40,7 @@ func (c *AppCatController) GetPage() *JsonResult {
|
|
|
}
|
|
|
|
|
|
func (c *AppCatController) GetById(appCatId int64) *JsonResult {
|
|
|
- ocId := c.GetCurOcId()
|
|
|
- data, err := c.Service.GetById(ocId, appCatId)
|
|
|
+ data, err := c.Service.GetById(appCatId)
|
|
|
if err != nil {
|
|
|
return ResultErr(err.Error(), nil)
|
|
|
} else {
|
|
|
@@ -87,7 +86,7 @@ func (c *AppCatController) DeleteByID(appCatId int64) *JsonResult {
|
|
|
userId := c.GetCurUserId()
|
|
|
m := make(map[string]interface{})
|
|
|
m["ocId"] = ocId
|
|
|
- m["appCatId"]= appCatId
|
|
|
+ m["appCatId"] = appCatId
|
|
|
m["deletedBy"] = userId
|
|
|
err := c.Service.Delete(m)
|
|
|
if err != nil {
|