addstoreVendorMap和update支持京西门店
This commit is contained in:
@@ -359,7 +359,7 @@ func UpdateConfig(ctx *jxcontext.Context, key, configType, value string) (hint s
|
||||
if vendorID != model.VendorIDJX {
|
||||
dao.SetStoreSkuSyncStatus(db, vendorID, storeIDs, nil, model.SyncFlagPriceMask)
|
||||
} else {
|
||||
ReCalculateJxPrice(ctx, storeIDs)
|
||||
ReCalculateJxPrice(db, ctx, storeIDs)
|
||||
}
|
||||
}
|
||||
case model.ConfigTypeFreightPack:
|
||||
|
||||
@@ -1058,7 +1058,7 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
|
||||
err = ErrCanNotFindVendor
|
||||
}
|
||||
} else {
|
||||
ReCalculateJxPrice(ctx, []int{storeID})
|
||||
ReCalculateJxPrice(db, ctx, []int{storeID})
|
||||
}
|
||||
if err == nil {
|
||||
dao.WrapAddIDCULDEntity(storeMap, userName)
|
||||
@@ -1201,7 +1201,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
||||
}
|
||||
} else {
|
||||
if valid["pricePercentage"] != nil || valid["pricePercentagePack"] != nil {
|
||||
ReCalculateJxPrice(ctx, []int{storeID})
|
||||
ReCalculateJxPrice(db, ctx, []int{storeID})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2058,8 +2058,7 @@ func AutoSaleStoreSku(ctx *jxcontext.Context, storeIDs []int, isNeedSync bool) (
|
||||
return err
|
||||
}
|
||||
|
||||
func ReCalculateJxPrice(ctx *jxcontext.Context, storeIDs []int) (err error) {
|
||||
db := dao.GetDB()
|
||||
func ReCalculateJxPrice(db *dao.DaoDB, ctx *jxcontext.Context, storeIDs []int) (err error) {
|
||||
for _, storeID := range storeIDs {
|
||||
if storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX); err == nil {
|
||||
if storeSkuList, err := dao.GetStoresSkusInfo(db, []int{storeID}, nil); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user