123 lines
3.6 KiB
Plaintext
123 lines
3.6 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: "云仓服务"// TODO: add title
|
|
desc: // TODO: add description
|
|
author: "daming"
|
|
email: ""
|
|
)
|
|
import "basic.api"
|
|
|
|
service inventory {
|
|
//提取云仓货物
|
|
@handler TakeHandler
|
|
post /inventory/take(TakeReq) returns (response);
|
|
//获取云仓库存列表
|
|
@handler GetCloudListHandler
|
|
get /inventory/list(GetCloudListReq) returns (response);
|
|
//云仓补货
|
|
@handler SupplementHandler
|
|
post /inventory/supplement(SupplementReq) returns (response);
|
|
//提货列表
|
|
@handler GetPickupListHandler
|
|
get /inventory/pick-up-list(GetPickupListReq) returns (response);
|
|
}
|
|
|
|
//提取云仓货物
|
|
type TakeReq {
|
|
Form []TakeForm `json:"form"`
|
|
AddressId int64 `json:"address_id"`
|
|
}
|
|
type TakeForm {
|
|
Id int64 `json:"id"`
|
|
Num int64 `json:"num"`
|
|
}
|
|
//获取云仓库存列表
|
|
type GetCloudListReq {
|
|
Page int `form:"page"`
|
|
PageSize int `form:"page_size"`
|
|
Size int64 `form:"size"`
|
|
}
|
|
type GetCloudListRsp {
|
|
WarehouseBoxes int64 `json:"warehouse_boxes"`
|
|
TransitBoxes int64 `json:"transit_boxes"`
|
|
MinTakeNum int64 `json:"minTakeNum"`
|
|
ListData []ListDataItem `json:"listData"`
|
|
Meta Meta `json:"_meta"`
|
|
}
|
|
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 {
|
|
Num int64 `json:"num"`
|
|
TotalNum int64 `json:"total_num"`
|
|
Price int64 `json:"price"`
|
|
}
|
|
|
|
//云仓补货
|
|
type SupplementReq {
|
|
Id int64 `json:"id"`
|
|
Num int64 `json:"num"`
|
|
}
|
|
type SupplementRsp {
|
|
Sn string `json:"sn"`
|
|
}
|
|
|
|
//提货列表
|
|
type GetPickupListReq {
|
|
Status int64 `form:"status,options=0|1|2|3|4"`
|
|
Page int `form:"page"`
|
|
PageSize int `form:"page_size"`
|
|
Size int `form:"size"`
|
|
}
|
|
type GetPickupListRsp {
|
|
PickupList []PickupItem `json:"items"`
|
|
Meta Meta `json:"_meta"`
|
|
}
|
|
type PickupItem {
|
|
Id int `json:"id"`
|
|
UserId int `json:"user_id"`
|
|
TrackNum string `json:"track_num"`
|
|
Ctime string `json:"ctime"`
|
|
Status int `json:"status"`
|
|
UpsSn string `json:"ups_sn"`
|
|
Address string `json:"address"`
|
|
ProductList []Product `json:"productList"`
|
|
Pcs int `json:"pcs"`
|
|
PcsBox int `json:"pcs_box"`
|
|
LogisticsStatus int `json:"logistics_status"`
|
|
StatusTimes []StatusTimesItem `json:"status_times"`
|
|
}
|
|
type Product {
|
|
Id int `json:"id"`
|
|
PickId int `json:"pick_id"`
|
|
StockId int `json:"stock_id"`
|
|
Num int `json:"num"`
|
|
Boxes int `json:"boxes"`
|
|
Ctime int `json:"ctime"`
|
|
ProductName string `json:"product_name"`
|
|
Pcs int `json:"pcs"`
|
|
PcsBox int `json:"pcs_box"`
|
|
Cover string `json:"cover"`
|
|
Size string `json:"size"`
|
|
Fitting string `json:"fitting"`
|
|
}
|
|
type StatusTimesItem {
|
|
Key int `json:"key"`
|
|
Time string `json:"time"`
|
|
} |