Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop

This commit is contained in:
richboo111
2022-10-09 18:01:20 +08:00

View File

@@ -15,14 +15,14 @@ import (
)
// /warehouse/create 创建单个区域仓
func (P *PurchaseHandler) CreateWarehouse(outWarehouseID string) (warehouseID int64, err error) {
func (P *PurchaseHandler) CreateWarehouse(outWarehouseID, appOrgCode string) (warehouseID int64, err error) {
tempName := "门店编码:" + outWarehouseID + "的区域仓"
req := &warehouse_create_request.WarehouseCreateParam{
OutWarehouseId: outWarehouseID,
Name: tempName,
Intro: "",
}
resp, err := getAPI("", 0, "").CreateWarehouse(req)
resp, err := getAPI(appOrgCode, 0, "").CreateWarehouse(req)
if err != nil {
return 0, err
}
@@ -32,7 +32,7 @@ func (P *PurchaseHandler) CreateWarehouse(outWarehouseID string) (warehouseID in
}
// /warehouse/createBatch 批量创建区域仓
func (P *PurchaseHandler) BatchCreateWarehouse(param warehouse_createBatch_request.WarehouseCreateBatchParam) error {
func (P *PurchaseHandler) BatchCreateWarehouse(param warehouse_createBatch_request.WarehouseCreateBatchParam, appOrgCode string) error {
infos := []warehouse_createBatch_request.OutWarehouseListItem{}
for _, v := range param.OutWarehouseList {
info := warehouse_createBatch_request.OutWarehouseListItem{
@@ -48,7 +48,7 @@ func (P *PurchaseHandler) BatchCreateWarehouse(param warehouse_createBatch_reque
OutWarehouseList: infos,
}
resp, err := getAPI("", 0, "").BatchCreateWarehouse(req)
resp, err := getAPI(appOrgCode, 0, "").BatchCreateWarehouse(req)
if err != nil {
return err
}
@@ -59,12 +59,12 @@ func (P *PurchaseHandler) BatchCreateWarehouse(param warehouse_createBatch_reque
}
// /warehouse/bindStore 仓库绑定门店
func (P *PurchaseHandler) BindStoreWarehouse(storeIDs []int64, outWarehouseID string) error {
func (P *PurchaseHandler) BindStoreWarehouse(storeIDs []int64, outWarehouseID, appOrgCode string) error {
param := &warehouse_bindStore_request.WarehouseBindStoreParam{
StoreIds: storeIDs,
OutWarehouseId: outWarehouseID,
}
if _, err := getAPI("", 0, "").StoreBindWarehouse(param); err != nil {
if _, err := getAPI(appOrgCode, 0, "").StoreBindWarehouse(param); err != nil {
return err
}
return nil