订单导出字段修改

This commit is contained in:
苏尹岚
2020-04-29 16:56:56 +08:00
parent cbeb31873c
commit e5a312ab1b
2 changed files with 12 additions and 4 deletions

View File

@@ -4068,10 +4068,19 @@ func RefreshMatterStock(ctx *jxcontext.Context, skuID int) (err error) {
}
func buildStoreSkuBindInfosAndFocus(ctx *jxcontext.Context, db *dao.DaoDB, store *dao.StoreDetail, v *partner.SkuNameInfo, nameID int) (err error) {
var pricePercentagePack []*model.PricePercentageItem
var (
pricePercentagePack []*model.PricePercentageItem
pricePercentagePack2 []*model.PricePercentageItem
jxPrice = 0
)
skus, _ := dao.GetSkus(db, nil, []int{nameID}, nil, nil, nil)
err = jxutils.Strings2Objs(store.PricePercentagePackStr, &pricePercentagePack)
price := jxutils.CaculateJxPriceByPricePack(pricePercentagePack, 0, int(v.SkuList[0].VendorPrice))
store2, _ := dao.GetStoreDetail(db, store.ID, model.VendorIDJX)
if store2 != nil {
err = jxutils.Strings2Objs(store2.PricePercentagePackStr, &pricePercentagePack2)
jxPrice = jxutils.CaculatePriceByPricePack(pricePercentagePack2, 0, price)
}
skuBind := &model.StoreSkuBind{
StoreID: store.ID,
UnitPrice: price,
@@ -4079,6 +4088,7 @@ func buildStoreSkuBindInfosAndFocus(ctx *jxcontext.Context, db *dao.DaoDB, store
Status: model.StoreSkuBindStatusNormal,
YbID: utils.Str2Int64(v.SkuList[0].VendorSkuID),
YbPrice: int(v.SkuList[0].VendorPrice),
JxPrice: jxPrice,
YbSyncStatus: 0,
}
if len(skus) > 0 {