实验StoreSkuAct

This commit is contained in:
gazebo
2020-01-16 10:47:06 +08:00
parent b94a1dd520
commit 88748b4d99
12 changed files with 409 additions and 126 deletions

View File

@@ -47,6 +47,10 @@ func (p *PurchaseHandler) GetStoreSkusBatchSize(funcID int) (batchSize int) {
batchSize = 1 // mtwmapi.MaxStoreSkuBatchSize
case partner.FuncGetStoreSkusFullInfo:
batchSize = 1
case partner.FuncCreateActs:
batchSize = mtwmapi.MaxRetailDiscountCreateBatchSize
case partner.FuncCancelActs:
batchSize = mtwmapi.MaxRetailDiscountDeleteBatchSize
}
return batchSize
}
@@ -574,3 +578,11 @@ func SelectStoreSkuListByFoodList(storeSkuList interface{}, foodList []*mtwmapi.
}
return selectedStoreSkuList
}
func (p *PurchaseHandler) CreateStoreSkusAct(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
return createOneShopAct(putils.GetFixDirectDownAct(storeID, 0), vendorStoreID, putils.StoreSku2ActStoreSku(storeSkuList))
}
func (p *PurchaseHandler) CancelActs(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
return cancelOneShopAct(putils.GetFixDirectDownAct(storeID, 0), vendorStoreID, putils.StoreSku2ActStoreSku(storeSkuList))
}