fusenapi/server_api/inventory.api

123 lines
3.6 KiB
Plaintext
Raw Normal View History

2023-06-26 09:59:54 +00:00
syntax = "v1"
info (
title: "云仓服务"// TODO: add title
desc: // TODO: add description
author: "daming"
email: ""
)
import "basic.api"
2023-06-27 06:25:25 +00:00
service inventory {
2023-06-26 09:59:54 +00:00
//提取云仓货物
@handler TakeHandler
2023-07-12 03:09:43 +00:00
post /api/inventory/take(TakeReq) returns (response);
2023-06-27 09:04:58 +00:00
//获取云仓库存列表
@handler GetCloudListHandler
2023-08-03 10:27:52 +00:00
post /api/inventory/list(GetCloudListReq) returns (response);
2023-06-28 09:05:31 +00:00
//云仓补货
@handler SupplementHandler
2023-07-12 03:09:43 +00:00
post /api/inventory/supplement(SupplementReq) returns (response);
2023-06-29 03:15:42 +00:00
//提货列表
@handler GetPickupListHandler
2023-07-12 03:09:43 +00:00
get /api/inventory/pick-up-list(GetPickupListReq) returns (response);
2023-06-26 09:59:54 +00:00
}
2023-06-27 06:25:25 +00:00
//提取云仓货物
type TakeReq {
Form []TakeForm `json:"form"`
AddressId int64 `json:"address_id"`
}
type TakeForm {
Id int64 `json:"id"`
Num int64 `json:"num"`
2023-06-27 09:04:58 +00:00
}
//获取云仓库存列表
type GetCloudListReq {
2023-08-03 10:27:52 +00:00
Page int `json:"page"`
PageSize int `json:"page_size"`
Size int64 `json:"size"`
2023-06-27 09:04:58 +00:00
}
type GetCloudListRsp {
WarehouseBoxes int64 `json:"warehouse_boxes"`
TransitBoxes int64 `json:"transit_boxes"`
MinTakeNum int64 `json:"minTakeNum"`
ListData []ListDataItem `json:"listData"`
2023-06-29 03:38:38 +00:00
Meta Meta `json:"_meta"`
2023-06-27 09:04:58 +00:00
}
type ListDataItem {
Id int64 `json:"id"`
Sn string `json:"sn"`
Cover string `json:"cover"`
Name string `json:"name"`
DesignSn string `json:"design_sn"`
Fitting string `json:"fitting"`
Production int64 `json:"production"`
ProductionBox int64 `json:"production_box"`
EachBoxNum int64 `json:"each_box_num"`
Stick int64 `json:"stick"`
StickBox int64 `json:"stick_box"`
Type int64 `json:"type"`
TakeNum int64 `json:"takeNum"`
Size string `json:"size"`
IsStop int64 `json:"is_stop"`
PriceList []PriceItem `json:"price"`
}
type PriceItem {
2023-06-27 10:35:26 +00:00
Num int64 `json:"num"`
TotalNum int64 `json:"total_num"`
Price int64 `json:"price"`
2023-06-28 09:05:31 +00:00
}
//云仓补货
type SupplementReq {
Id int64 `json:"id"`
Num int64 `json:"num"`
}
type SupplementRsp {
Sn string `json:"sn"`
2023-06-29 03:15:42 +00:00
}
//提货列表
type GetPickupListReq {
2023-06-29 05:59:55 +00:00
Status int64 `form:"status,options=-1|1|2|3|4"`
2023-06-29 03:15:42 +00:00
Page int `form:"page"`
PageSize int `form:"page_size"`
Size int `form:"size"`
2023-06-29 03:46:04 +00:00
}
type GetPickupListRsp {
PickupList []PickupItem `json:"items"`
Meta Meta `json:"_meta"`
}
type PickupItem {
2023-06-29 09:25:34 +00:00
Id int64 `json:"id"`
UserId int64 `json:"user_id"`
2023-06-29 03:46:04 +00:00
TrackNum string `json:"track_num"`
Ctime string `json:"ctime"`
2023-06-29 09:25:34 +00:00
Status int64 `json:"status"`
2023-06-29 03:46:04 +00:00
UpsSn string `json:"ups_sn"`
Address string `json:"address"`
ProductList []Product `json:"productList"`
2023-06-29 09:25:34 +00:00
Pcs int64 `json:"pcs"`
PcsBox int64 `json:"pcs_box"`
LogisticsStatus int64 `json:"logistics_status"`
2023-06-29 03:46:04 +00:00
StatusTimes []StatusTimesItem `json:"status_times"`
}
type Product {
2023-06-29 09:25:34 +00:00
Id int64 `json:"id"`
PickId int64 `json:"pick_id"`
StockId int64 `json:"stock_id"`
Num int64 `json:"num"`
Boxes int64 `json:"boxes"`
Ctime int64 `json:"ctime"`
2023-06-29 03:46:04 +00:00
ProductName string `json:"product_name"`
2023-06-29 09:25:34 +00:00
Pcs int64 `json:"pcs"`
PcsBox int64 `json:"pcs_box"`
2023-06-29 03:46:04 +00:00
Cover string `json:"cover"`
Size string `json:"size"`
Fitting string `json:"fitting"`
}
type StatusTimesItem {
2023-06-29 09:25:34 +00:00
Key int64 `json:"key"`
2023-06-29 03:46:04 +00:00
Time string `json:"time"`
2023-06-26 09:59:54 +00:00
}