diff --git a/app/admin/hdl/goods/hdl_goods.go b/app/admin/hdl/goods/hdl_goods.go index c8cd3eb..a919dfa 100644 --- a/app/admin/hdl/goods/hdl_goods.go +++ b/app/admin/hdl/goods/hdl_goods.go @@ -58,12 +58,12 @@ func AddMallGoods(c *gin.Context) { return } -func MallGoodsDetail(c *gin.Context) { +func GetGoodsDetail(c *gin.Context) { id := c.Query("id") if id == "" { id = "0" } - resp, err := goods.MallGoodsDetail(c, utils.StrToInt(id)) + resp, err := goods.GetGoodsDetail(c, utils.StrToInt(id)) if err != nil { e.OutErr(c, 400, err) return diff --git a/app/admin/hdl/hdl_scheme.go b/app/admin/hdl/hdl_scheme.go index ef4931a..0693e93 100644 --- a/app/admin/hdl/hdl_scheme.go +++ b/app/admin/hdl/hdl_scheme.go @@ -199,7 +199,7 @@ func DeleteScheme(c *gin.Context) { return } -func GoodsDetail(c *gin.Context) { +func SchemeGoodsDetail(c *gin.Context) { goodsId := c.Query("goods_id") if goodsId == "" { goodsId = "0" diff --git a/app/admin/svc/goods/svc_goods.go b/app/admin/svc/goods/svc_goods.go index c447105..08ac586 100644 --- a/app/admin/svc/goods/svc_goods.go +++ b/app/admin/svc/goods/svc_goods.go @@ -253,7 +253,7 @@ func GetIndexesStr(baseGoods *md.MallBaseGoods, goodsSku *md.MallGoodsSku) strin return strings.Trim(result, "-") } -func MallGoodsDetail(c *gin.Context, id int) (map[string]interface{}, error) { +func GetGoodsDetail(c *gin.Context, id int) (map[string]interface{}, error) { resp := make(map[string]interface{}) var skuList []*model.Sku var goodsModel *model.Goods diff --git a/app/router/admin_router.go b/app/router/admin_router.go index 77bcc30..f217172 100644 --- a/app/router/admin_router.go +++ b/app/router/admin_router.go @@ -59,7 +59,7 @@ func rScheme(r *gin.RouterGroup) { r.POST("/updateSchemeState", hdl.UpdateSchemeState) r.DELETE("/delete/:id", hdl.DeleteScheme) r.GET("/goodsList", goodsHdl.GetMallGoodsList) - r.GET("/goodsDetail", hdl.GoodsDetail) + r.GET("/goodsDetail", hdl.SchemeGoodsDetail) r.POST("/saveSchemeGoods", hdl.SaveSchemeGoods) } @@ -99,7 +99,7 @@ func rCategory(r *gin.RouterGroup) { func rGoods(r *gin.RouterGroup) { r.POST("/del", goodsHdl.DelMallGoods) r.POST("/add", goodsHdl.AddMallGoods) - r.GET("/detail", goodsHdl.MallGoodsDetail) + r.GET("/detail", goodsHdl.GetGoodsDetail) r.GET("/list", goodsHdl.GetMallGoodsList) r.GET("/checkSkuCode", goodsHdl.CheckSkuCode) r.POST("/change-sale-state", goodsHdl.ChangeSaleState)