This commit is contained in:
邹宗楠
2022-10-08 17:47:19 +08:00
parent 385d8d5999
commit 3466efa552
6 changed files with 27 additions and 3 deletions

View File

@@ -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)
}

View File

@@ -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
}