From a2406a1f2739f674b3bc323b8d5404b0f19bdb47 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Tue, 26 Mar 2024 21:48:38 +0800 Subject: [PATCH] update --- app/admin/hdl/goods/hdl_goods.go | 4 ++-- app/admin/hdl/hdl_scheme.go | 2 +- app/admin/svc/goods/svc_goods.go | 2 +- app/router/admin_router.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) 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)