mtwmapi.SkuInfo.Weight类型从int修正为string,相应调整

This commit is contained in:
gazebo
2019-11-14 11:22:18 +08:00
parent 5935c94aca
commit 7b9e77ba2a

View File

@@ -403,7 +403,7 @@ func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTas
func vendorSku2Jx(appFood *mtwmapi.AppFood) (skuName *partner.SkuNameInfo) {
prefix, name, comment, specUnit, unit, specQuality := jxutils.SplitSkuName(appFood.Name)
vendorSku := appFood.SkuList[0]
weight := vendorSku.Weight
weight := int(utils.Str2Int64WithDefault(vendorSku.Weight, 0))
if weight <= 0 {
weight = jxutils.FormatSkuWeight(specQuality, specUnit)
}