This commit is contained in:
richboo111
2022-12-06 17:33:52 +08:00
parent c8c33d38c1
commit 72e2688560
3 changed files with 58 additions and 61 deletions

View File

@@ -90,11 +90,11 @@ func BindStoreWarehouse(VendorOrgCode, outWarehouseID string, storeIDs int64) er
}
// /warehouse/getWarehouseByStore 门店id获取绑定仓库详情包括电子围栏
func GetWarehouseByStore(appOrgCode string, storeID int64) (map[int64][]warehouse_getWarehouseByStore_response.WarehouseInfoMapItem, error) {
func GetWarehouseByStore(appOrgCode string, storeID int64) (map[string][]*warehouse_getWarehouseByStore_response.WarehouseInfoMapItem, error) {
if resp, err := getAPI(appOrgCode, 0, "").GetWarehouseByStore(storeID); err != nil {
return nil, err
} else {
return resp, nil
return resp.WarehouseInfoMap, nil
}
}
@@ -235,14 +235,13 @@ func BindFenceByStore(appOrgCode string, storeID int64, addOutFenceIDs []string)
}
//获取电子围栏信息
func GetFence(appOrgCode, outFenceID string) (warehouse_getFences_response.FencesItem, error) {
emptyResp := warehouse_getFences_response.FencesItem{}
func GetFence(appOrgCode string, outFenceID []string) ([]warehouse_getFences_response.FencesItem, error) {
emptyResp := []warehouse_getFences_response.FencesItem{}
if resp, err := getAPI(appOrgCode, 0, "").GetFence(outFenceID); err != nil {
return emptyResp, err
} else {
return resp.Fences[0], nil
return resp.Fences, nil
}
}
//特殊处理