更新门店库存测试

This commit is contained in:
苏尹岚
2020-05-26 15:31:35 +08:00
parent 00fa9d4d61
commit 2dba8fe5c7
2 changed files with 6 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package jdshop
import (
"fmt"
"regexp"
"strings"
"time"
@@ -242,11 +243,12 @@ func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTas
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo, status int) (failedList []*partner.StoreSkuInfoWithErr, err error) {
if globals.EnableJdShopWrite {
var stock = 0
fmt.Println("testUpdateSkuSiteStock", storeID, vendorStoreID)
for _, v := range storeSkuList {
if status == model.SkuStatusNormal {
stock = 9999
}
if vendorStoreID == model.JdShopMainVendorStoreID {
if storeID == model.JdShopMainStoreID {
err = api.JdShopAPI.UpdateSkuStock(utils.Str2Int(v.VendorSkuID), stock)
} else {
storeSkus, err2 := dao.GetStoresSkusInfo(dao.GetDB(), []int{model.JdShopMainStoreID}, []int{v.SkuID})