接口调整
This commit is contained in:
@@ -10,49 +10,126 @@ info (
|
||||
import "basic.api"
|
||||
|
||||
service home-user-auth {
|
||||
|
||||
|
||||
// @handler UserRegisterHandler
|
||||
// post /api/user/register(RequestUserRegister) returns (response);
|
||||
|
||||
|
||||
@handler UserLoginHandler
|
||||
post /api/user/login(RequestUserLogin) returns (response);
|
||||
|
||||
|
||||
@handler AcceptCookieHandler
|
||||
post /api/user/accept-cookie(request) returns (response);
|
||||
|
||||
|
||||
@handler UserFontsHandler
|
||||
get /api/user/fonts(request) returns (response);
|
||||
|
||||
|
||||
@handler UserGetTypeHandler
|
||||
get /api/user/get-type(request) returns (response);
|
||||
|
||||
|
||||
@handler UserSaveBasicInfoHandler
|
||||
post /api/user/basic-info(RequestBasicInfoForm) returns (response);
|
||||
|
||||
|
||||
@handler UserStatusConfigHandler
|
||||
get /api/user/status-config(request) returns (response);
|
||||
|
||||
|
||||
@handler UserBasicInfoHandler
|
||||
get /api/user/basic-info(request) returns (response);
|
||||
|
||||
|
||||
@handler UserAddressListHandler
|
||||
get /api/user/address-list(request) returns (response);
|
||||
|
||||
|
||||
@handler UserAddAddressHandler
|
||||
post /api/user/add-address(RequestAddAddress) returns (response);
|
||||
|
||||
|
||||
@handler UserContactServiceHandler
|
||||
post /api/user/contact-service (RequestContactService) returns (response);
|
||||
|
||||
|
||||
// @handler UserOderListHandler
|
||||
// get /api/user/order-list(RequestOrderId) returns (response);
|
||||
|
||||
|
||||
@handler UserOderDeleteHandler
|
||||
post /api/user/order-delete(RequestOrderId) returns (response);
|
||||
|
||||
|
||||
@handler UserGoogleLoginHandler
|
||||
get /api/user/oauth2/login/google(RequestGoogleLogin) returns (response);
|
||||
|
||||
|
||||
//获取订单列表
|
||||
@handler GetUserOrderListHandler
|
||||
get /api/user/order-list (GetUserOrderListReq) returns (response);
|
||||
|
||||
//取消订单
|
||||
@handler UserOrderCancelHandler
|
||||
get /api/user/order-cancel (UserOrderCancelReq) returns (response);
|
||||
|
||||
}
|
||||
|
||||
//取消订单
|
||||
type (
|
||||
UserOrderCancelReq {
|
||||
ID int64 `form:"id"` //订单id
|
||||
RefundReasonId int64 `form:"refund_reason_id"` //退款配置id
|
||||
RefundReason string `form:"refund_reason,optional"` //退款原因
|
||||
}
|
||||
UserOrderCancelRsp {
|
||||
}
|
||||
)
|
||||
|
||||
// 获取订单列表
|
||||
type (
|
||||
GetUserOrderListReq {
|
||||
Page int64 `form:"page"` // 分页
|
||||
PageSize int64 `form:"page_size"` // 每页数量
|
||||
Status int64 `form:"status"` // 状态筛选
|
||||
Time int64 `form:"time"` // 时间筛选
|
||||
Total int64 `form:"total"` // 总数
|
||||
Size int64 `form:"size"` // 图片尺寸
|
||||
}
|
||||
|
||||
GetUserOrderListRsp {
|
||||
Items []Items `json:"items"`
|
||||
Meta Meta `json:"_meta"`
|
||||
}
|
||||
)
|
||||
|
||||
type Items {
|
||||
ID int64 `json:"id"`
|
||||
Sn string `json:"sn"`
|
||||
UserID int64 `json:"user_id"`
|
||||
TotalAmount int64 `json:"total_amount"`
|
||||
Ctime string `json:"ctime"`
|
||||
Status int64 `json:"status"`
|
||||
DeliveryMethod int64 `json:"delivery_method"`
|
||||
TsTime string `json:"ts_time"`
|
||||
IsPayCompleted int64 `json:"is_pay_completed"`
|
||||
DeliverSn string `json:"deliver_sn"`
|
||||
PcsBox int64 `json:"pcs_box"`
|
||||
Pcs int64 `json:"pcs"`
|
||||
SurplusAt int64 `json:"surplus_at"`
|
||||
LogisticsStatus int64 `json:"logistics_status"`
|
||||
StatusTimes []*StatusTime `json:"status_times"`
|
||||
Deposit int64 `json:"deposit"`
|
||||
Remaining int64 `json:"remaining"`
|
||||
ProductList []*Product `json:"productList"`
|
||||
IsStop int64 `json:"is_stop"`
|
||||
}
|
||||
|
||||
type StatusTime {
|
||||
Key int `json:"key"`
|
||||
Time string `json:"time"`
|
||||
}
|
||||
|
||||
type Product {
|
||||
Cover string `json:"cover"`
|
||||
Fitting string `json:"fitting"`
|
||||
OptionPrice int64 `json:"option_price"`
|
||||
OrderDetailTemplateId int64 `json:"order_detail_template_id"`
|
||||
OrderId int64 `json:"order_id"`
|
||||
Pcs int64 `json:"pcs"`
|
||||
PcsBox int64 `json:"pcs_box"`
|
||||
Price int64 `json:"price"`
|
||||
ProductId int64 `json:"product_id"`
|
||||
Size string `json:"size"`
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
type RequestGoogleLogin {
|
||||
|
||||
@@ -16,10 +16,6 @@ service orders {
|
||||
//获取订单详情
|
||||
@handler GetOrderDetailHandler
|
||||
get /api/order/detail (GetOrderDetailReq) returns (response);
|
||||
|
||||
//获取订单列表
|
||||
@handler GetUserOrderListHandler
|
||||
get /api/user/order-list (GetUserOrderListReq) returns (response);
|
||||
}
|
||||
|
||||
//获取订单发票
|
||||
@@ -86,48 +82,4 @@ type PayInfo {
|
||||
type Deposit {
|
||||
Method string `json:"method"`
|
||||
TransNo string `json:"trans_no"`
|
||||
}
|
||||
|
||||
// 获取订单列表
|
||||
type (
|
||||
GetUserOrderListReq {
|
||||
Page int64 `form:"page"` // 分页
|
||||
PageSize int64 `form:"page_size"` // 每页数量
|
||||
Status int64 `form:"status"` // 状态筛选
|
||||
Time int64 `form:"time"` // 时间筛选
|
||||
Total int64 `form:"total"` // 总数
|
||||
Size int64 `form:"size"` // 图片尺寸
|
||||
}
|
||||
|
||||
GetUserOrderListRsp {
|
||||
Items []Items `json:"items"`
|
||||
Meta Meta `json:"_meta"`
|
||||
}
|
||||
)
|
||||
|
||||
type StatusTime {
|
||||
Key int `json:"key"`
|
||||
Time string `json:"time"`
|
||||
}
|
||||
|
||||
type Items {
|
||||
ID int64 `json:"id"`
|
||||
Sn string `json:"sn"`
|
||||
UserID int64 `json:"user_id"`
|
||||
TotalAmount int64 `json:"total_amount"`
|
||||
Ctime string `json:"ctime"`
|
||||
Status int64 `json:"status"`
|
||||
DeliveryMethod int64 `json:"delivery_method"`
|
||||
TsTime string `json:"ts_time"`
|
||||
IsPayCompleted int64 `json:"is_pay_completed"`
|
||||
DeliverSn string `json:"deliver_sn"`
|
||||
PcsBox int64 `json:"pcs_box"`
|
||||
Pcs int64 `json:"pcs"`
|
||||
SurplusAt int64 `json:"surplus_at"`
|
||||
LogisticsStatus int64 `json:"logistics_status"`
|
||||
StatusTimes []*StatusTime `json:"status_times"`
|
||||
Deposit int64 `json:"deposit"`
|
||||
Remaining int64 `json:"remaining"`
|
||||
ProductList []*Product `json:"productList"`
|
||||
IsStop int64 `json:"is_stop"`
|
||||
}
|
||||
Reference in New Issue
Block a user