1
This commit is contained in:
@@ -260,8 +260,8 @@ func UpdateCategory(ctx *jxcontext.Context, categoryID int, payload map[string]i
|
||||
|
||||
SetStoreCategorySyncStatus2(db, nil, []int{categoryID}, model.SyncFlagModifiedMask)
|
||||
var skuIDs []int
|
||||
if valid["jdCategoryID"] != nil || valid["ebaiCategoryID"] != nil || valid["mtwmCategoryID"] != nil ||
|
||||
valid["jdPricePercentage"] != nil || valid["ebaiPricePercentage"] != nil || valid["mtwmPricePercentage"] != nil {
|
||||
if valid["jdCategoryID"] != nil || valid["ebaiCategoryID"] != nil || valid["mtwmCategoryID"] != nil || valid["ddCategoryID"] != nil ||
|
||||
valid["jdPricePercentage"] != nil || valid["ebaiPricePercentage"] != nil || valid["mtwmPricePercentage"] != nil || valid["ddPricePercentage"] != nil {
|
||||
if skuList, err2 := dao.GetSkuByCats(db, []int{categoryID}); err2 == nil && len(skuList) > 0 {
|
||||
for _, sku := range skuList {
|
||||
skuIDs = append(skuIDs, sku.ID)
|
||||
@@ -291,6 +291,13 @@ func UpdateCategory(ctx *jxcontext.Context, categoryID int, payload map[string]i
|
||||
} else if valid["mtwmCategoryID"] != nil {
|
||||
vendorIDs = append(vendorIDs, model.VendorIDMTWM)
|
||||
}
|
||||
|
||||
if valid["ddPricePercentage"] != nil {
|
||||
vendorIDs = append(vendorIDs, model.VendorIDDD)
|
||||
syncStatus |= model.SyncFlagPriceMask
|
||||
} else if valid["ddCategoryID"] != nil {
|
||||
vendorIDs = append(vendorIDs, model.VendorIDDD)
|
||||
}
|
||||
if len(vendorIDs) > 0 {
|
||||
SetStoreSkuSyncStatus2(db, nil, vendorIDs, skuIDs, syncStatus)
|
||||
}
|
||||
|
||||
@@ -3588,6 +3588,8 @@ func vendorPriceTransForm(storeSkuExt *dao.StoreSkuExt, vendorID int) int64 {
|
||||
return int64(storeSkuExt.YbPrice)
|
||||
case 5:
|
||||
return int64(storeSkuExt.JdsPrice)
|
||||
case 14:
|
||||
return int64(storeSkuExt.DdPrice)
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user