This commit is contained in:
richboo111
2023-10-08 10:29:41 +08:00
parent aa7fc8c4f4
commit 4525274e40
3 changed files with 3 additions and 2 deletions

View File

@@ -6348,7 +6348,7 @@ func CreateDDWarehouse(vendorOrgCode string, vendorStoreID, storeID int64) error
}
err1 = tiktok_store.BindStoreWarehouse(vendorOrgCode, utils.Int64ToStr(storeID), vendorStoreID)
if err1 != nil { //仓库绑定通过自定义外部ID
errList.AddErr(fmt.Errorf("门店(%d) 绑定仓库%d 失败:%v", storeID, warehouseID, err1))
errList.AddErr(fmt.Errorf("门店(%d) 绑定仓库失败:%v", storeID, err1))
}
return errList.GetErrListAsOne()
}

View File

@@ -124,7 +124,7 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
},
},
}
if resp, err := a.BatchCreateStore(ShopBatchCreateStoreParam); err != nil {
if resp, err := a.BatchCreateStore(ShopBatchCreateStoreParam); err != nil || resp.ResultList[0].Store.StoreId == 0 {
globals.SugarLogger.Debugf("BatchCreateStore err=%v", err)
return "", err
} else {

View File

@@ -82,6 +82,7 @@ func (P *PurchaseHandler) BatchCreateWarehouse(param warehouse_createBatch_reque
// /warehouse/bindStore 仓库绑定门店
func BindStoreWarehouse(VendorOrgCode, outWarehouseID string, storeIDs int64) error {
globals.SugarLogger.Debugf("BindStoreWarehouse storeID=%s,vendorStoreID=%d", outWarehouseID, storeIDs)
if _, err := getAPI(VendorOrgCode, 0, "").StoreBindWarehouse(&warehouse_bindStore_request.WarehouseBindStoreParam{
StoreIds: []int64{storeIDs},
OutWarehouseId: outWarehouseID,