Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -15,14 +15,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// /warehouse/create 创建单个区域仓
|
// /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 + "的区域仓"
|
tempName := "门店编码:" + outWarehouseID + "的区域仓"
|
||||||
req := &warehouse_create_request.WarehouseCreateParam{
|
req := &warehouse_create_request.WarehouseCreateParam{
|
||||||
OutWarehouseId: outWarehouseID,
|
OutWarehouseId: outWarehouseID,
|
||||||
Name: tempName,
|
Name: tempName,
|
||||||
Intro: "",
|
Intro: "",
|
||||||
}
|
}
|
||||||
resp, err := getAPI("", 0, "").CreateWarehouse(req)
|
resp, err := getAPI(appOrgCode, 0, "").CreateWarehouse(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,7 @@ func (P *PurchaseHandler) CreateWarehouse(outWarehouseID string) (warehouseID in
|
|||||||
}
|
}
|
||||||
|
|
||||||
// /warehouse/createBatch 批量创建区域仓
|
// /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{}
|
infos := []warehouse_createBatch_request.OutWarehouseListItem{}
|
||||||
for _, v := range param.OutWarehouseList {
|
for _, v := range param.OutWarehouseList {
|
||||||
info := warehouse_createBatch_request.OutWarehouseListItem{
|
info := warehouse_createBatch_request.OutWarehouseListItem{
|
||||||
@@ -48,7 +48,7 @@ func (P *PurchaseHandler) BatchCreateWarehouse(param warehouse_createBatch_reque
|
|||||||
OutWarehouseList: infos,
|
OutWarehouseList: infos,
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := getAPI("", 0, "").BatchCreateWarehouse(req)
|
resp, err := getAPI(appOrgCode, 0, "").BatchCreateWarehouse(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -59,12 +59,12 @@ func (P *PurchaseHandler) BatchCreateWarehouse(param warehouse_createBatch_reque
|
|||||||
}
|
}
|
||||||
|
|
||||||
// /warehouse/bindStore 仓库绑定门店
|
// /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{
|
param := &warehouse_bindStore_request.WarehouseBindStoreParam{
|
||||||
StoreIds: storeIDs,
|
StoreIds: storeIDs,
|
||||||
OutWarehouseId: outWarehouseID,
|
OutWarehouseId: outWarehouseID,
|
||||||
}
|
}
|
||||||
if _, err := getAPI("", 0, "").StoreBindWarehouse(param); err != nil {
|
if _, err := getAPI(appOrgCode, 0, "").StoreBindWarehouse(param); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user