Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into feature/auth
This commit is contained in:
@@ -10,50 +10,82 @@ info (
|
||||
import "basic.api"
|
||||
|
||||
service home-user-auth {
|
||||
|
||||
|
||||
// @handler UserRegisterHandler
|
||||
// post /api/user/register(RequestUserRegister) returns (response);
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
@handler UserLoginHandler
|
||||
post /api/user/login(RequestUserLogin) returns (response);
|
||||
|
||||
@handler AcceptCookieHandler
|
||||
post /api/user/accept-cookie(request) returns (response);
|
||||
|
||||
>>>>>>> d843fff73d7ba5d4e14a5d86281d5166f04cb303
|
||||
@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);
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
@handler UserGoogleLoginHandler
|
||||
get /api/user/oauth2/login/google(RequestGoogleLogin) returns (response);
|
||||
|
||||
@handler UserEmailRegisterHandler
|
||||
get /api/user/oauth2/login/register(RequestEmailRegister) returns (response);
|
||||
|
||||
>>>>>>> d843fff73d7ba5d4e14a5d86281d5166f04cb303
|
||||
//订单列表
|
||||
@handler UserOrderListHandler
|
||||
get /api/user/order-list (UserOrderListReq) returns (response);
|
||||
|
||||
|
||||
//删除订单
|
||||
@handler UserOrderDeleteHandler
|
||||
get /api/user/order-delete (UserOrderDeleteReq) returns (response);
|
||||
|
||||
//取消订单
|
||||
@handler UserOrderCancelHandler
|
||||
get /api/user/order-cancel (UserOrderCancelReq) returns (response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
type (
|
||||
UserOrderDeleteReq {
|
||||
ID int64 `form:"id"` //订单id
|
||||
}
|
||||
UserOrderDeleteRes {
|
||||
}
|
||||
)
|
||||
|
||||
//取消订单
|
||||
type (
|
||||
UserOrderCancelReq {
|
||||
@@ -83,25 +115,25 @@ type (
|
||||
)
|
||||
|
||||
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"`
|
||||
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 {
|
||||
|
||||
29
server_api/pay.api
Normal file
29
server_api/pay.api
Normal file
@@ -0,0 +1,29 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: 支付模块
|
||||
desc: 支付相关
|
||||
author: ""
|
||||
email: ""
|
||||
)
|
||||
|
||||
import "basic.api"
|
||||
|
||||
service pay {
|
||||
|
||||
@handler OrderPaymentIntentHandler
|
||||
post /api/pay/payment-intent(OrderPaymentIntentReq) returns (response);
|
||||
}
|
||||
|
||||
// 生成预付款
|
||||
type (
|
||||
OrderPaymentIntentReq {
|
||||
Sn string `form:"sn"` //订单编号
|
||||
DeliveryMethod int64 `form:"delivery_method"` //发货方式
|
||||
AddressId int64 `form:"address_id"` //地址id
|
||||
PayMethod int64 `form:"pay_method"` //支付方式
|
||||
}
|
||||
OrderPaymentIntentRes {
|
||||
RedirectUrl string `json:"redirect_url"`
|
||||
}
|
||||
)
|
||||
25
server_api/product-template-tag.api
Normal file
25
server_api/product-template-tag.api
Normal file
@@ -0,0 +1,25 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "产品模板标签服务"// TODO: add title
|
||||
desc: // TODO: add description
|
||||
author: ""
|
||||
email: ""
|
||||
)
|
||||
|
||||
import "basic.api"
|
||||
|
||||
service product-template-tag {
|
||||
//获取产品模板标签列表
|
||||
@handler GetProductTemplateTagsHandler
|
||||
get /api/product-template/get_product_template_tags(GetProductTemplateTagsReq) returns (response);
|
||||
}
|
||||
|
||||
//获取产品模板标签列表
|
||||
type GetProductTemplateTagsReq {
|
||||
Limit int `form:"limit"`
|
||||
}
|
||||
type GetProductTemplateTagsRsp {
|
||||
Tag string `json:"tag"`
|
||||
Cover string `json:"cover"`
|
||||
}
|
||||
@@ -308,29 +308,24 @@ type GetTagProductListRsp {
|
||||
TagList []TagItem `json:"tag_list"`
|
||||
}
|
||||
type TagItem {
|
||||
TypeName string `json:"type_name"`
|
||||
TypeId int64 `json:"type_id"`
|
||||
Description string `json:"description"`
|
||||
Level int64 `json:"level"`
|
||||
LevelPrefix string `json:"level_prefix"`
|
||||
Icon string `json:"icon"`
|
||||
Sort int64 `json:"sort"`
|
||||
TagProductList []TagProduct `json:"tag_product_list"` //分类下的产品
|
||||
ChildTagList []*TagItem `json:"child_tag_list"`
|
||||
TypeName string `json:"type_name"`
|
||||
TypeId int64 `json:"type_id"`
|
||||
Icon string `json:"icon"`
|
||||
Sort int64 `json:"sort"`
|
||||
LevelPrefix string `json:"level_prefix"`
|
||||
TagProductList []interface{} `json:"tag_product_list"` //分类下的产品
|
||||
ChildTagList []*TagItem `json:"child_tag_list"`
|
||||
}
|
||||
type TagProduct {
|
||||
ProductId int64 `json:"product_id"`
|
||||
Sn string `json:"sn"`
|
||||
Title string `json:"title"`
|
||||
Cover string `json:"cover"`
|
||||
Intro string `json:"intro"`
|
||||
CoverImg string `json:"cover_img"`
|
||||
IsEnv int64 `json:"is_env"`
|
||||
IsMicro int64 `json:"is_micro"`
|
||||
SizeNum uint32 `json:"size_num"`
|
||||
MinPrice int64 `json:"min_price"`
|
||||
CoverDefault string `json:"cover_default"`
|
||||
HaveOptionalFitting bool `json:"have_optional_fitting"`
|
||||
Recommended bool `json:"recommended"`
|
||||
}
|
||||
//获取云渲染设计方案信息
|
||||
type GetRenderDesignReq {
|
||||
@@ -434,14 +429,10 @@ type HomePageRecommendProductListReq {
|
||||
Size uint32 `form:"size"`
|
||||
}
|
||||
type HomePageRecommendProductListRsp {
|
||||
ProductId int64 `json:"product_id"`
|
||||
Id int64 `json:"id"`
|
||||
Sn string `json:"sn"`
|
||||
Title string `json:"title"`
|
||||
Cover string `json:"cover"`
|
||||
Intro string `json:"intro"`
|
||||
CoverImg string `json:"cover_img"`
|
||||
IsEnv int64 `json:"is_env"`
|
||||
IsMicro int64 `json:"is_micro"`
|
||||
SizeNum uint32 `json:"size_num"`
|
||||
MinPrice int64 `json:"min_price"`
|
||||
CoverDefault string `json:"cover_default"`
|
||||
|
||||
47
server_api/websocket.api
Normal file
47
server_api/websocket.api
Normal file
@@ -0,0 +1,47 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "websocket"// TODO: add title
|
||||
desc: // TODO: add description
|
||||
author: ""
|
||||
email: ""
|
||||
)
|
||||
|
||||
import "basic.api"
|
||||
service websocket {
|
||||
//websocket数据交互
|
||||
@handler DataTransferHandler
|
||||
get /api/websocket/data_transfer(request) returns (response);
|
||||
//渲染完了通知接口
|
||||
@handler RenderNotifyHandler
|
||||
post /api/websocket/render_notify(RenderNotifyReq) returns (response);
|
||||
}
|
||||
|
||||
//websocket数据交互
|
||||
type DataTransferData {
|
||||
T string `json:"t"` //消息类型
|
||||
D interface{} `json:"d"` //传递的消息
|
||||
}
|
||||
type RenderImageReqMsg { //websocket接受要云渲染处理的数据
|
||||
ProductIds []int64 `json:"product_ids"` //产品 id
|
||||
TemplateTagId int64 `json:"template_tag_id"` //模板标签id
|
||||
AlgorithmVersion string `json:"algorithm_version,optional"` //算法版本
|
||||
}
|
||||
type RenderImageRspMsg { //websocket发送渲染完的数据
|
||||
ProductId int64 `json:"product_id"` //产品 id
|
||||
TemplateTagId int64 `json:"template_tag_id"` //模板标签id
|
||||
AlgorithmVersion string `json:"algorithm_version,optional"` //算法版本
|
||||
Image string `json:"image"` //渲染后的图片
|
||||
}
|
||||
//渲染完了通知接口
|
||||
type RenderNotifyReq {
|
||||
Sign string `json:"sign"`
|
||||
Time int64 `json:"time"`
|
||||
Info NotifyInfo `json:"info"`
|
||||
}
|
||||
type NotifyInfo {
|
||||
ProductId int64 `json:"product_id"` //产品id
|
||||
TemplateTagId int64 `json:"template_tag_id"` //模板标签id
|
||||
AlgorithmVersion string `json:"algorithm_version,optional"` //算法版本
|
||||
Image string `json:"image"`
|
||||
}
|
||||
Reference in New Issue
Block a user