This commit is contained in:
richboo111
2022-12-07 10:51:18 +08:00
parent 08ae4fd941
commit fab6e33427
2 changed files with 189 additions and 209 deletions

View File

@@ -30,10 +30,10 @@ const (
)
// /warehouse/create 创建单个区域仓
func CreateWarehouse(appOrgCode string, storeID int64) (warehouseID string, err error) {
func CreateWarehouse(appOrgCode string, storeID int64) (warehouseID int64, err error) {
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), int(storeID), 0, "")
if err != nil {
return "", fmt.Errorf("获取门店本地信息失败:%v", err)
return 0, fmt.Errorf("获取门店本地信息失败:%v", err)
}
resp, err := getAPI(appOrgCode, 0, "").CreateWarehouse(&warehouse_create_request.WarehouseCreateParam{
OutWarehouseId: utils.Int64ToStr(storeID), //本地storeID绑定
@@ -50,7 +50,7 @@ func CreateWarehouse(appOrgCode string, storeID int64) (warehouseID string, err
},
})
if err != nil {
return "", fmt.Errorf("创建单个区域仓失败:%v", err)
return 0, fmt.Errorf("创建单个区域仓失败:%v", err)
}
return resp.WarehouseId, nil
}