- 使用GetPricePercentage
This commit is contained in:
@@ -15,14 +15,6 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
type tStoreSkuBindExt struct {
|
||||
model.StoreSkuBind
|
||||
PricePercentage int
|
||||
CatPricePercentage int
|
||||
VendorStoreID string `orm:"column(vendor_store_id)"`
|
||||
JdID int64 `orm:"column(jd_id)"`
|
||||
}
|
||||
|
||||
// 京东到家,以有库存表示关注(认领)
|
||||
func (p *PurchaseHandler) syncStoreSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, db *dao.DaoDB, storeID int, storeSkus []*dao.StoreSkuSyncInfo, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debugf("jd syncStoreSkus, storeID:%d", storeID)
|
||||
@@ -73,9 +65,10 @@ func (p *PurchaseHandler) syncStoreSkus(ctx *jxcontext.Context, parentTask tasks
|
||||
}
|
||||
if storeSku.StoreSkuSyncStatus&(model.SyncFlagPriceMask|model.SyncFlagNewMask) != 0 {
|
||||
vendorSkuID4Price = storeSku.VendorSkuID
|
||||
pricePercentage := jxutils.GetPricePercentage(storeDetail.PricePercentagePackObj, int(storeSku.Price), int(storeDetail.PricePercentage))
|
||||
skuPriceInfoList = append(skuPriceInfoList, &jdapi.SkuPriceInfo{
|
||||
OutSkuId: utils.Int2Str(storeSku.SkuID),
|
||||
Price: constrainPrice(jxutils.CaculateSkuVendorPrice(int(storeSku.Price), int(storeDetail.PricePercentage), storeSku.CatPricePercentage)),
|
||||
Price: constrainPrice(jxutils.CaculateSkuVendorPrice(int(storeSku.Price), pricePercentage, storeSku.CatPricePercentage)),
|
||||
})
|
||||
}
|
||||
if storeSku.StoreSkuSyncStatus&(model.SyncFlagSaleMask|model.SyncFlagNewMask) != 0 {
|
||||
|
||||
Reference in New Issue
Block a user