|
|
|
@ -77,11 +77,8 @@ type ReplyCommodityInfo struct {
|
|
|
|
|
CommodityCode string `json:"commodityCode"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
ImgUrl string `json:"imgUrl"`
|
|
|
|
|
FirstCategoryId uint `json:"firstCategoryId"`
|
|
|
|
|
FirstCategoryName string `json:"firstCategoryName"`
|
|
|
|
|
SecondCategoryId uint `json:"secondCategoryId"`
|
|
|
|
|
SecondCategoryName string `json:"secondCategoryName"`
|
|
|
|
|
ThirdCategoryId uint `json:"thirdCategoryId"`
|
|
|
|
|
ThirdCategoryName string `json:"thirdCategoryName"`
|
|
|
|
|
SupplyCategoryId uint `json:"supplyCategoryId"`
|
|
|
|
|
Handle uint `json:"handle"`
|
|
|
|
@ -158,6 +155,22 @@ func (c *commodity) Discard(ctx context.Context, goodsIds []uint) (err error) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsCommodityReplaceImg struct {
|
|
|
|
|
CommodityId uint // 商品id
|
|
|
|
|
ImgId uint // 图片id
|
|
|
|
|
ImgPath string // 图片路径
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ReplaceImg @Title 替换图片
|
|
|
|
|
func (c *commodity) ReplaceImg(ctx context.Context, args ArgsCommodityReplaceImg) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
xClient, err := client.GetClient(c)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
return xClient.Call(ctx, "ReplaceImg", args, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
//// ReHandle @Title 重新处理商品
|
|
|
|
|
//func (c *commodity) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) {
|
|
|
|
|