@@ -58,12 +58,12 @@ func AddMallGoods(c *gin.Context) { | |||||
return | return | ||||
} | } | ||||
func MallGoodsDetail(c *gin.Context) { | |||||
func GetGoodsDetail(c *gin.Context) { | |||||
id := c.Query("id") | id := c.Query("id") | ||||
if id == "" { | if id == "" { | ||||
id = "0" | id = "0" | ||||
} | } | ||||
resp, err := goods.MallGoodsDetail(c, utils.StrToInt(id)) | |||||
resp, err := goods.GetGoodsDetail(c, utils.StrToInt(id)) | |||||
if err != nil { | if err != nil { | ||||
e.OutErr(c, 400, err) | e.OutErr(c, 400, err) | ||||
return | return | ||||
@@ -199,7 +199,7 @@ func DeleteScheme(c *gin.Context) { | |||||
return | return | ||||
} | } | ||||
func GoodsDetail(c *gin.Context) { | |||||
func SchemeGoodsDetail(c *gin.Context) { | |||||
goodsId := c.Query("goods_id") | goodsId := c.Query("goods_id") | ||||
if goodsId == "" { | if goodsId == "" { | ||||
goodsId = "0" | goodsId = "0" | ||||
@@ -253,7 +253,7 @@ func GetIndexesStr(baseGoods *md.MallBaseGoods, goodsSku *md.MallGoodsSku) strin | |||||
return strings.Trim(result, "-") | 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{}) | resp := make(map[string]interface{}) | ||||
var skuList []*model.Sku | var skuList []*model.Sku | ||||
var goodsModel *model.Goods | var goodsModel *model.Goods | ||||
@@ -59,7 +59,7 @@ func rScheme(r *gin.RouterGroup) { | |||||
r.POST("/updateSchemeState", hdl.UpdateSchemeState) | r.POST("/updateSchemeState", hdl.UpdateSchemeState) | ||||
r.DELETE("/delete/:id", hdl.DeleteScheme) | r.DELETE("/delete/:id", hdl.DeleteScheme) | ||||
r.GET("/goodsList", goodsHdl.GetMallGoodsList) | r.GET("/goodsList", goodsHdl.GetMallGoodsList) | ||||
r.GET("/goodsDetail", hdl.GoodsDetail) | |||||
r.GET("/goodsDetail", hdl.SchemeGoodsDetail) | |||||
r.POST("/saveSchemeGoods", hdl.SaveSchemeGoods) | r.POST("/saveSchemeGoods", hdl.SaveSchemeGoods) | ||||
} | } | ||||
@@ -99,7 +99,7 @@ func rCategory(r *gin.RouterGroup) { | |||||
func rGoods(r *gin.RouterGroup) { | func rGoods(r *gin.RouterGroup) { | ||||
r.POST("/del", goodsHdl.DelMallGoods) | r.POST("/del", goodsHdl.DelMallGoods) | ||||
r.POST("/add", goodsHdl.AddMallGoods) | r.POST("/add", goodsHdl.AddMallGoods) | ||||
r.GET("/detail", goodsHdl.MallGoodsDetail) | |||||
r.GET("/detail", goodsHdl.GetGoodsDetail) | |||||
r.GET("/list", goodsHdl.GetMallGoodsList) | r.GET("/list", goodsHdl.GetMallGoodsList) | ||||
r.GET("/checkSkuCode", goodsHdl.CheckSkuCode) | r.GET("/checkSkuCode", goodsHdl.CheckSkuCode) | ||||
r.POST("/change-sale-state", goodsHdl.ChangeSaleState) | r.POST("/change-sale-state", goodsHdl.ChangeSaleState) | ||||