2023-05-31 03:38:17 +00:00
|
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
|
|
info (
|
|
|
|
|
title: // TODO: add title
|
|
|
|
|
desc: // TODO: add description
|
|
|
|
|
author: ""
|
|
|
|
|
email: ""
|
|
|
|
|
)
|
|
|
|
|
|
2023-05-31 10:33:02 +00:00
|
|
|
|
import "basic.api"
|
|
|
|
|
|
2023-06-06 12:08:32 +00:00
|
|
|
|
service home-user-auth {
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-07-17 11:43:43 +00:00
|
|
|
|
// @handler UserRegisterHandler
|
|
|
|
|
// post /api/user/register(RequestUserRegister) returns (response);
|
2023-09-06 07:24:51 +00:00
|
|
|
|
//用户字体
|
2023-06-06 12:08:32 +00:00
|
|
|
|
@handler UserFontsHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
|
get /api/user/fonts(request) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-09-06 07:24:51 +00:00
|
|
|
|
//状态配置
|
2023-06-07 10:30:58 +00:00
|
|
|
|
@handler UserStatusConfigHandler
|
2023-07-14 11:26:00 +00:00
|
|
|
|
get /api/user/status-config(request) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-09-06 07:24:51 +00:00
|
|
|
|
//联系服务
|
2023-06-28 11:32:41 +00:00
|
|
|
|
@handler UserContactServiceHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
|
post /api/user/contact-service (RequestContactService) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-06-21 08:39:55 +00:00
|
|
|
|
// @handler UserOderListHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
|
// get /api/user/order-list(RequestOrderId) returns (response);
|
2023-09-06 07:24:51 +00:00
|
|
|
|
//删除订单
|
2023-06-20 04:15:14 +00:00
|
|
|
|
@handler UserOderDeleteHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
|
post /api/user/order-delete(RequestOrderId) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-07-20 07:55:01 +00:00
|
|
|
|
//订单列表
|
|
|
|
|
@handler UserOrderListHandler
|
|
|
|
|
get /api/user/order-list (UserOrderListReq) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-07-26 03:06:05 +00:00
|
|
|
|
//删除订单
|
|
|
|
|
@handler UserOrderDeleteHandler
|
|
|
|
|
get /api/user/order-delete (UserOrderDeleteReq) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-07-20 07:43:48 +00:00
|
|
|
|
//取消订单
|
|
|
|
|
@handler UserOrderCancelHandler
|
|
|
|
|
get /api/user/order-cancel (UserOrderCancelReq) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-08-03 06:38:17 +00:00
|
|
|
|
// 用户logo列表
|
|
|
|
|
@handler UserLogoListHandler
|
|
|
|
|
get /api/user/logo-list (UserLogoListReq) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-08-03 09:37:25 +00:00
|
|
|
|
// 再来一单
|
|
|
|
|
@handler UserAgainOrderHandler
|
|
|
|
|
get /api/user/one-more-order (UserAgainOrderReq) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-08-14 06:40:50 +00:00
|
|
|
|
// 保存商户信息
|
|
|
|
|
@handler UserInfoSetHandler
|
|
|
|
|
post /api/user/set_user_info (UserInfoSetReq) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-09-07 10:52:01 +00:00
|
|
|
|
// 用户logo设置当前
|
|
|
|
|
@handler UserLogoSetHandler
|
2023-09-08 03:47:53 +00:00
|
|
|
|
post /api/user/logo-set (UserLogoSetReq) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
2023-09-19 04:04:51 +00:00
|
|
|
|
// 用户logo模版信息
|
|
|
|
|
@handler UserLogoTemplateTagSetHandler
|
|
|
|
|
post /api/user/logo-templatetag-set (UserLogoTemplateTagSetReq) returns (response);
|
2023-10-26 06:35:22 +00:00
|
|
|
|
|
|
|
|
|
// 用户logo数据设置用户logo素材
|
|
|
|
|
@handler UserLogoDataSetHandler
|
|
|
|
|
post /api/user/logo-data-set (UserLogoDataSetReq) returns (response);
|
2023-07-20 07:43:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-10-26 06:35:22 +00:00
|
|
|
|
type (
|
|
|
|
|
UserLogoDataSetReq {
|
|
|
|
|
LogoDataId int64 `form:"logo_data_id"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2023-09-19 04:04:51 +00:00
|
|
|
|
type (
|
|
|
|
|
UserLogoTemplateTagSetReq {
|
|
|
|
|
TemplateTag string `form:"template_tag"`
|
|
|
|
|
TemplateTagColorIndex int64 `form:"template_tag_color_index"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2023-09-07 10:52:01 +00:00
|
|
|
|
type (
|
|
|
|
|
UserLogoSetReq {
|
2023-09-08 03:47:53 +00:00
|
|
|
|
SetLogoSelected int64 `form:"set_logo_selected"`
|
|
|
|
|
LogoSelectedId int64 `form:"logo_selected_id"`
|
|
|
|
|
SetLogoCategory int64 `form:"set_logo_category"`
|
|
|
|
|
CategoryId int64 `form:"category_id"`
|
2023-09-07 10:52:01 +00:00
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2023-08-14 06:40:50 +00:00
|
|
|
|
type (
|
|
|
|
|
UserInfoSetReq {
|
2023-09-07 08:54:49 +00:00
|
|
|
|
Module string `form:"module,options=[merchant_category,logo_merchant_category,profile]"` // json格式字符串
|
|
|
|
|
Metadata string `form:"metadata"` // json格式字符串
|
2023-08-14 06:40:50 +00:00
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2023-08-03 09:37:25 +00:00
|
|
|
|
type (
|
|
|
|
|
UserAgainOrderReq {
|
|
|
|
|
Sn string `form:"sn"` // 订单编号
|
|
|
|
|
}
|
|
|
|
|
UserAgainOrderRes struct{}
|
|
|
|
|
)
|
|
|
|
|
|
2023-08-03 06:38:17 +00:00
|
|
|
|
type (
|
|
|
|
|
UserLogoListReq {
|
|
|
|
|
}
|
|
|
|
|
UserLogoListRes {
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2023-07-26 03:06:05 +00:00
|
|
|
|
type (
|
|
|
|
|
UserOrderDeleteReq {
|
|
|
|
|
ID int64 `form:"id"` //订单id
|
|
|
|
|
}
|
|
|
|
|
UserOrderDeleteRes {
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2023-07-20 07:43:48 +00:00
|
|
|
|
//取消订单
|
|
|
|
|
type (
|
|
|
|
|
UserOrderCancelReq {
|
|
|
|
|
ID int64 `form:"id"` //订单id
|
|
|
|
|
RefundReasonId int64 `form:"refund_reason_id"` //退款配置id
|
|
|
|
|
RefundReason string `form:"refund_reason,optional"` //退款原因
|
|
|
|
|
}
|
|
|
|
|
UserOrderCancelRsp {
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 获取订单列表
|
|
|
|
|
type (
|
2023-07-20 07:55:01 +00:00
|
|
|
|
UserOrderListReq {
|
2023-07-20 07:43:48 +00:00
|
|
|
|
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"` // 图片尺寸
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-20 07:55:01 +00:00
|
|
|
|
UserOrderListRsp {
|
2023-07-20 07:43:48 +00:00
|
|
|
|
Items []Items `json:"items"`
|
|
|
|
|
Meta Meta `json:"_meta"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Items {
|
2023-07-24 10:04:24 +00:00
|
|
|
|
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"`
|
2023-07-20 07:43:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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"`
|
2023-07-21 10:17:01 +00:00
|
|
|
|
IsStop int64 `json:"is_stop"`
|
2023-07-17 11:43:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-06-28 11:32:41 +00:00
|
|
|
|
type RequestContactService {
|
|
|
|
|
Type string `json:"type"` // 类型
|
|
|
|
|
RelationID int64 `json:"relation_id"` // 关系id
|
|
|
|
|
Name string `json:"name"` // 名字
|
|
|
|
|
Email string `json:"email"` // email
|
|
|
|
|
Phone string `json:"phone,optional"` // phone
|
|
|
|
|
Remark string `json:"remark,optional"` // remark标记
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-05 09:56:55 +00:00
|
|
|
|
type RequestBasicInfoForm {
|
2023-06-19 07:52:14 +00:00
|
|
|
|
FirstName string `json:"first_name"` // FirstName
|
|
|
|
|
LastName string `json:"last_name"` // LastName
|
|
|
|
|
Company string `json:"company"` // 公司名称
|
|
|
|
|
Mobile string `json:"mobile"` // 手机号码
|
|
|
|
|
Email string `json:"email"` // 邮箱
|
|
|
|
|
Type int64 `json:"type"` // 1正常 0不正常
|
|
|
|
|
IsOrderStatusEmail int64 `json:"is_order_status_email"` // 订单状态改变时是否接收邮件
|
|
|
|
|
IsEmailAdvertisement int64 `json:"is_email_advertisement"` // 是否接收邮件广告
|
|
|
|
|
IsOrderStatusPhone int64 `json:"is_order_status_phone"` // 订单状态改变是是否接收电话
|
|
|
|
|
IsPhoneAdvertisement int64 `json:"is_phone_advertisement"` // 是否接收短信广告
|
|
|
|
|
IsOpenRender int64 `json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
|
|
|
|
IsLowRendering int64 `json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
|
|
|
|
IsRemoveBg int64 `json:"is_remove_bg"` // 用户上传logo是否去除背景
|
2023-06-05 09:56:55 +00:00
|
|
|
|
|
2023-06-15 08:08:43 +00:00
|
|
|
|
// NewPassword string `form:"new_password,optional" db:"new_password"` // new_password 如果存在新密码
|
2023-06-05 09:56:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-06-20 04:15:14 +00:00
|
|
|
|
// RequestAddAddress 增加地址结构
|
2023-06-19 10:27:31 +00:00
|
|
|
|
type RequestAddAddress {
|
2023-09-06 07:24:51 +00:00
|
|
|
|
Id int64 `json:"id,optional"` // address_id 地址id
|
|
|
|
|
IsDefault int64 `json:"is_default"` //是否默认
|
|
|
|
|
Name string `json:"name"` //收货人
|
|
|
|
|
FirstName string `json:"first_name"` //first_name
|
|
|
|
|
LastName string `json:"last_name"` //last_name
|
|
|
|
|
Mobile string `json:"mobile"` //手机
|
|
|
|
|
ZipCode string `json:"zip_code"` //邮编
|
|
|
|
|
Street string `json:"street"` //街道
|
|
|
|
|
Suite string `json:"suite"` //房号
|
|
|
|
|
City string `json:"city"` //城市
|
|
|
|
|
State string `json:"state"` //州
|
2023-06-19 10:27:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-06-20 04:15:14 +00:00
|
|
|
|
// RequestOrderId 传入订单id的结构
|
|
|
|
|
type RequestOrderId {
|
2023-06-20 09:29:02 +00:00
|
|
|
|
OrderId int64 `json:"id"` //订单id
|
|
|
|
|
RefundReasonId int64 `json:"refund_reason_id"` //取消原因id
|
|
|
|
|
RefundReason string `json:"refund_reason"` //取消原因
|
2023-06-20 04:15:14 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-06-01 10:35:09 +00:00
|
|
|
|
// UserBasicInfoHandler 返回data结构
|
|
|
|
|
type DataUserBasicInfo {
|
2023-06-15 09:51:06 +00:00
|
|
|
|
Type int64 `json:"type"` // 1普通餐厅 2连锁餐厅
|
2023-06-19 07:52:14 +00:00
|
|
|
|
IsOrderStatusEmail int64 `json:"is_order_status_email"` // 订单状态改变时是否接收邮件
|
|
|
|
|
IsEmailAdvertisement int64 `json:"is_email_advertisement"` // 是否接收邮件广告
|
|
|
|
|
IsOrderStatusPhone int64 `json:"is_order_status_phone"` // 订单状态改变是是否接收电话
|
|
|
|
|
IsPhoneAdvertisement int64 `json:"is_phone_advertisement"` // 是否接收短信广告
|
|
|
|
|
IsOpenRender int64 `json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
|
|
|
|
IsThousandFace int64 `json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
|
|
|
|
IsLowRendering int64 `json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
|
|
|
|
IsRemoveBg int64 `json:"is_remove_bg"` // 用户上传logo是否去除背景
|
2023-06-01 10:35:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// /user/get-type reponse.data 结构
|
|
|
|
|
type DataGetType {
|
2023-06-19 07:52:14 +00:00
|
|
|
|
Id int64 `json:"key"` // ID
|
|
|
|
|
Name string `json:"name"` // 餐厅名字
|
2023-06-08 02:51:56 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// KeyName 普通的key name 对象结构. eg: /user/status-config 用在返回值
|
|
|
|
|
type KeyName {
|
2023-06-08 03:36:47 +00:00
|
|
|
|
Key int `json:"key"`
|
2023-06-08 02:51:56 +00:00
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// KeyNameButton 普通的key name button 对象结构 eg: /user/status-config 用在返回值
|
|
|
|
|
type KeyNameButton {
|
2023-06-08 03:36:47 +00:00
|
|
|
|
Key int `json:"key"`
|
2023-06-08 02:51:56 +00:00
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Button []string `json:"button"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DataStatusConfig /user/status-config 返回值data结构
|
|
|
|
|
type DataStatusConfig {
|
|
|
|
|
SearchList []KeyName `json:"search_list"` //搜索下拉列表
|
|
|
|
|
OrderStatus []KeyNameButton `json:"order_status"` //直邮单状态
|
|
|
|
|
InventoryStatus []KeyNameButton `json:"Inventory_status"` //云仓单状态
|
|
|
|
|
OrderLogisticsStatus []KeyName `json:"order_logistics_status"` //订单物流状态
|
|
|
|
|
InventoryLogisticsStatus []KeyName `json:"Inventory_logistics_status"` //订单物流状态
|
|
|
|
|
Time []KeyName `json:"time"` //返回订单时间筛选项
|
|
|
|
|
RefundReason []KeyName `json:"refund_reason"` //退款原因说明项
|
2023-06-08 03:36:47 +00:00
|
|
|
|
LogisticsStatus []KeyNameButton `json:"logistics_status"` //物流状态筛选项
|
2023-06-08 07:41:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DataAddressList /user/address-list 返回值
|
|
|
|
|
type DataAddressList {
|
2023-06-19 07:52:14 +00:00
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
UserId int64 `json:"user_id"` // 用户ID
|
|
|
|
|
Name string `json:"name"` // 地址名称
|
|
|
|
|
FirstName string `json:"first_name"` // FirstName
|
|
|
|
|
LastName string `json:"last_name"` // LastName
|
|
|
|
|
Mobile string `json:"mobile"` // 手机号码
|
|
|
|
|
Street string `json:"street"` // 街道
|
|
|
|
|
Suite string `json:"suite"` // 房号
|
|
|
|
|
City string `json:"city"` // 城市
|
|
|
|
|
State string `json:"state"` // 州名
|
|
|
|
|
// Country string `json:"country"` // 国家
|
|
|
|
|
ZipCode string `json:"zip_code"` // 邮编
|
|
|
|
|
// Status int64 `json:"status"` // 1正常 0异常
|
|
|
|
|
IsDefault int64 `json:"is_default"` // 1默认地址,0非默认地址
|
2023-06-07 03:57:04 +00:00
|
|
|
|
}
|