fix
This commit is contained in:
parent
519d9952e0
commit
543308ddbc
|
@ -27,8 +27,9 @@ func NewGetPickupListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Get
|
|||
}
|
||||
|
||||
func (l *GetPickupListLogic) GetPickupList(req *types.GetPickupListReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
|
||||
// userinfo 传入值时, 一定不为null
|
||||
if userinfo.GetIdType() != auth.IDTYPE_User {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "please login first")
|
||||
}
|
||||
|
||||
return resp.SetStatus(basic.CodeOK)
|
||||
}
|
||||
|
|
|
@ -70,6 +70,46 @@ type GetPickupListReq struct {
|
|||
Size int `form:"size"`
|
||||
}
|
||||
|
||||
type GetPickupListRsp struct {
|
||||
PickupList []PickupItem `json:"items"`
|
||||
Meta Meta `json:"_meta"`
|
||||
}
|
||||
|
||||
type PickupItem struct {
|
||||
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 struct {
|
||||
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 struct {
|
||||
Key int `json:"key"`
|
||||
Time string `json:"time"`
|
||||
}
|
||||
|
||||
type Request struct {
|
||||
}
|
||||
|
||||
|
|
|
@ -84,4 +84,40 @@ type GetPickupListReq {
|
|||
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"`
|
||||
}
|
Loading…
Reference in New Issue
Block a user