pdd 物料详情

This commit is contained in:
suyl
2021-04-27 16:05:51 +08:00
parent db199feb00
commit 37c188ffa7
8 changed files with 76 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import (
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/globals/api"
"strings"
)
var (
@@ -107,3 +108,25 @@ func (s *UnionHandler) GetUnionMatterList(ctx *jxcontext.Context, vendorCatID, k
}
return nil, err
}
func (s *UnionHandler) GetUnionMatterDetail(ctx *jxcontext.Context, goodsID string) (result *partner.GoodsDetail, err error) {
result = &partner.GoodsDetail{}
if goods, err2 := api.PddAPI.GoodsDetail(goodsID); err2 != nil {
return nil, err2
} else {
result.GoodsID = goods.GoodsSign
result.GoodsName = goods.GoodsName
result.Img = goods.GoodsThumbnailURL
result.CouponDiscount = goods.CouponDiscount
result.MinNormalPrice = goods.MinNormalPrice
result.SalesCount = goods.SalesTip
result.Imgs = strings.Join(goods.GoodsGalleryUrls, ",")
result.MainImg = goods.GoodsImageURL
result.StoreImg = goods.MallImgURL
result.StoreName = goods.MallName
result.LgstTxt = goods.LgstTxt
result.DescTxt = goods.DescTxt
result.ServTxt = goods.ServTxt
}
return result, err
}