temp
This commit is contained in:
75
app/main/api/desc/admin/admin.md
Normal file
75
app/main/api/desc/admin/admin.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# 后台管理面板功能说明
|
||||
|
||||
## 1. 统计中心
|
||||
|
||||
- **数据概览**
|
||||
展示平台核心数据指标,包括用户数、订单数、收入等关键指标的实时统计。
|
||||
- **趋势分析**
|
||||
提供各项数据的趋势图表,支持按日、周、月、年等维度查看数据变化。
|
||||
- **转化分析**
|
||||
分析用户行为路径和转化率,帮助优化业务流程。
|
||||
- **地域分布**
|
||||
展示用户和订单的地域分布情况,支持地图可视化。
|
||||
|
||||
## 2. 系统管理
|
||||
|
||||
- **用户管理**
|
||||
管理平台所有用户信息,包括用户的基本资料、状态、权限等。
|
||||
- **角色管理**
|
||||
管理系统角色,分配不同角色的权限,支持角色的增删改查。
|
||||
- **菜单管理**
|
||||
配置后台左侧菜单栏的结构和显示内容,支持菜单的自定义和排序。
|
||||
|
||||
## 3. 推广管理
|
||||
|
||||
- **推广数据分析**
|
||||
查看和分析推广相关的数据报表,支持多维度统计和导出。
|
||||
- **推广链接管理**
|
||||
管理推广渠道和推广链接,支持生成、分发和统计推广链接的效果。
|
||||
|
||||
## 4. 订单管理
|
||||
|
||||
- 管理平台所有订单,支持订单的查询、退款、导出等操作。
|
||||
|
||||
## 5. 平台用户管理
|
||||
|
||||
- **用户信息管理**
|
||||
基于 user 表,管理平台所有注册用户的详细信息。
|
||||
- **用户认证管理**
|
||||
基于 userAuth 表,管理用户的认证信息(如第三方登录、手机号、邮箱等)。
|
||||
|
||||
## 6. 通知管理
|
||||
|
||||
- 管理平台的系统通知,包括通知的发布、编辑、删除和推送历史。
|
||||
|
||||
## 7. 产品与功能管理
|
||||
|
||||
- **产品管理**
|
||||
管理平台所有产品的信息,包括产品的价格、介绍、上下架等。
|
||||
- **功能管理**
|
||||
管理平台所有功能点,支持功能的增删改查。
|
||||
- **产品功能配置**
|
||||
支持为每个产品配置可用的功能,实现产品与功能的灵活绑定。
|
||||
|
||||
## 8. 示例管理
|
||||
|
||||
- 管理产品的示例内容,支持为不同产品配置不同的示例,便于用户参考和体验。
|
||||
|
||||
## 9. 平台配置管理
|
||||
|
||||
- 用于管理平台的全局配置项,如站点信息、支付配置、第三方集成等。
|
||||
|
||||
## 10. 版本更新管理
|
||||
|
||||
- **版本发布**
|
||||
管理平台版本更新,包括版本号、更新内容、发布时间等。
|
||||
- **更新记录**
|
||||
维护版本更新历史,支持查看历史版本信息和回滚操作。
|
||||
- **强制更新**
|
||||
配置版本强制更新策略,确保用户使用最新版本。
|
||||
- **灰度发布**
|
||||
支持新版本灰度发布,可控制更新推送比例和范围。
|
||||
|
||||
---
|
||||
|
||||
> 以上为后台管理面板的主要功能模块规划,后续可根据业务发展持续扩展和优化。
|
||||
108
app/main/api/desc/admin/admin_feature.api
Normal file
108
app/main/api/desc/admin/admin_feature.api
Normal file
@@ -0,0 +1,108 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "后台功能管理服务"
|
||||
desc: "后台功能管理相关接口"
|
||||
author: "Liangzai"
|
||||
email: "2440983361@qq.com"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
// 功能管理接口
|
||||
@server(
|
||||
prefix: /api/v1/admin/feature
|
||||
group: admin_feature
|
||||
)
|
||||
service main {
|
||||
// 创建功能
|
||||
@handler AdminCreateFeature
|
||||
post /create (AdminCreateFeatureReq) returns (AdminCreateFeatureResp)
|
||||
|
||||
// 更新功能
|
||||
@handler AdminUpdateFeature
|
||||
put /update/:id (AdminUpdateFeatureReq) returns (AdminUpdateFeatureResp)
|
||||
|
||||
// 删除功能
|
||||
@handler AdminDeleteFeature
|
||||
delete /delete/:id (AdminDeleteFeatureReq) returns (AdminDeleteFeatureResp)
|
||||
|
||||
// 获取功能列表
|
||||
@handler AdminGetFeatureList
|
||||
get /list (AdminGetFeatureListReq) returns (AdminGetFeatureListResp)
|
||||
|
||||
// 获取功能详情
|
||||
@handler AdminGetFeatureDetail
|
||||
get /detail/:id (AdminGetFeatureDetailReq) returns (AdminGetFeatureDetailResp)
|
||||
}
|
||||
|
||||
type (
|
||||
// 创建功能请求
|
||||
AdminCreateFeatureReq {
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
}
|
||||
|
||||
// 创建功能响应
|
||||
AdminCreateFeatureResp {
|
||||
Id int64 `json:"id"` // 功能ID
|
||||
}
|
||||
|
||||
// 更新功能请求
|
||||
AdminUpdateFeatureReq {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
ApiId *string `json:"api_id,optional"` // API标识
|
||||
Name *string `json:"name,optional"` // 描述
|
||||
}
|
||||
|
||||
// 更新功能响应
|
||||
AdminUpdateFeatureResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 删除功能请求
|
||||
AdminDeleteFeatureReq {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
}
|
||||
|
||||
// 删除功能响应
|
||||
AdminDeleteFeatureResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 获取功能列表请求
|
||||
AdminGetFeatureListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
ApiId *string `form:"api_id,optional"` // API标识
|
||||
Name *string `form:"name,optional"` // 描述
|
||||
}
|
||||
|
||||
// 功能列表项
|
||||
FeatureListItem {
|
||||
Id int64 `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 获取功能列表响应
|
||||
AdminGetFeatureListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []FeatureListItem `json:"items"` // 列表数据
|
||||
}
|
||||
|
||||
// 获取功能详情请求
|
||||
AdminGetFeatureDetailReq {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
}
|
||||
|
||||
// 获取功能详情响应
|
||||
AdminGetFeatureDetailResp {
|
||||
Id int64 `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
)
|
||||
175
app/main/api/desc/admin/admin_product.api
Normal file
175
app/main/api/desc/admin/admin_product.api
Normal file
@@ -0,0 +1,175 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "后台产品管理服务"
|
||||
desc: "后台产品管理相关接口"
|
||||
author: "Liangzai"
|
||||
email: "2440983361@qq.com"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
// 产品管理接口
|
||||
@server(
|
||||
prefix: /api/v1/admin/product
|
||||
group: admin_product
|
||||
)
|
||||
service main {
|
||||
// 创建产品
|
||||
@handler AdminCreateProduct
|
||||
post /create (AdminCreateProductReq) returns (AdminCreateProductResp)
|
||||
|
||||
// 更新产品
|
||||
@handler AdminUpdateProduct
|
||||
put /update/:id (AdminUpdateProductReq) returns (AdminUpdateProductResp)
|
||||
|
||||
// 删除产品
|
||||
@handler AdminDeleteProduct
|
||||
delete /delete/:id (AdminDeleteProductReq) returns (AdminDeleteProductResp)
|
||||
|
||||
// 获取产品列表
|
||||
@handler AdminGetProductList
|
||||
get /list (AdminGetProductListReq) returns (AdminGetProductListResp)
|
||||
|
||||
// 获取产品详情
|
||||
@handler AdminGetProductDetail
|
||||
get /detail/:id (AdminGetProductDetailReq) returns (AdminGetProductDetailResp)
|
||||
|
||||
// 获取产品功能列表
|
||||
@handler AdminGetProductFeatureList
|
||||
get /feature/list/:product_id (AdminGetProductFeatureListReq) returns ([]AdminGetProductFeatureListResp)
|
||||
|
||||
// 更新产品功能关联(批量)
|
||||
@handler AdminUpdateProductFeatures
|
||||
put /feature/update/:product_id (AdminUpdateProductFeaturesReq) returns (AdminUpdateProductFeaturesResp)
|
||||
}
|
||||
|
||||
type (
|
||||
// 创建产品请求
|
||||
AdminCreateProductReq {
|
||||
ProductName string `json:"product_name"` // 服务名
|
||||
ProductEn string `json:"product_en"` // 英文名
|
||||
Description string `json:"description"` // 描述
|
||||
Notes string `json:"notes,optional"` // 备注
|
||||
CostPrice float64 `json:"cost_price"` // 成本
|
||||
SellPrice float64 `json:"sell_price"` // 售价
|
||||
}
|
||||
|
||||
// 创建产品响应
|
||||
AdminCreateProductResp {
|
||||
Id int64 `json:"id"` // 产品ID
|
||||
}
|
||||
|
||||
// 更新产品请求
|
||||
AdminUpdateProductReq {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
ProductName *string `json:"product_name,optional"` // 服务名
|
||||
ProductEn *string `json:"product_en,optional"` // 英文名
|
||||
Description *string `json:"description,optional"` // 描述
|
||||
Notes *string `json:"notes,optional"` // 备注
|
||||
CostPrice *float64 `json:"cost_price,optional"` // 成本
|
||||
SellPrice *float64 `json:"sell_price,optional"` // 售价
|
||||
}
|
||||
|
||||
// 更新产品响应
|
||||
AdminUpdateProductResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 删除产品请求
|
||||
AdminDeleteProductReq {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
}
|
||||
|
||||
// 删除产品响应
|
||||
AdminDeleteProductResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 获取产品列表请求
|
||||
AdminGetProductListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
ProductName *string `form:"product_name,optional"` // 服务名
|
||||
ProductEn *string `form:"product_en,optional"` // 英文名
|
||||
}
|
||||
|
||||
// 产品列表项
|
||||
ProductListItem {
|
||||
Id int64 `json:"id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 服务名
|
||||
ProductEn string `json:"product_en"` // 英文名
|
||||
Description string `json:"description"` // 描述
|
||||
Notes string `json:"notes"` // 备注
|
||||
CostPrice float64 `json:"cost_price"` // 成本
|
||||
SellPrice float64 `json:"sell_price"` // 售价
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 获取产品列表响应
|
||||
AdminGetProductListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []ProductListItem `json:"items"` // 列表数据
|
||||
}
|
||||
|
||||
// 获取产品详情请求
|
||||
AdminGetProductDetailReq {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
}
|
||||
|
||||
// 获取产品详情响应
|
||||
AdminGetProductDetailResp {
|
||||
Id int64 `json:"id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 服务名
|
||||
ProductEn string `json:"product_en"` // 英文名
|
||||
Description string `json:"description"` // 描述
|
||||
Notes string `json:"notes"` // 备注
|
||||
CostPrice float64 `json:"cost_price"` // 成本
|
||||
SellPrice float64 `json:"sell_price"` // 售价
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 获取产品功能列表请求
|
||||
AdminGetProductFeatureListReq {
|
||||
ProductId int64 `path:"product_id"` // 产品ID
|
||||
}
|
||||
|
||||
// 获取产品功能列表响应Item
|
||||
AdminGetProductFeatureListResp {
|
||||
Id int64 `json:"id"` // 关联ID
|
||||
ProductId int64 `json:"product_id"` // 产品ID
|
||||
FeatureId int64 `json:"feature_id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 功能描述
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
Enable int64 `json:"enable"` // 是否启用
|
||||
IsImportant int64 `json:"is_important"` // 是否重要
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// // 获取产品功能列表响应
|
||||
// AdminGetProductFeatureListResp {
|
||||
// Items []ProductFeatureListItem `json:"items"` // 列表数据
|
||||
// }
|
||||
|
||||
// 产品功能关联项
|
||||
ProductFeatureItem {
|
||||
FeatureId int64 `json:"feature_id"` // 功能ID
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
Enable int64 `json:"enable"` // 是否启用
|
||||
IsImportant int64 `json:"is_important"` // 是否重要
|
||||
}
|
||||
|
||||
// 更新产品功能关联请求(批量)
|
||||
AdminUpdateProductFeaturesReq {
|
||||
ProductId int64 `path:"product_id"` // 产品ID
|
||||
Features []ProductFeatureItem `json:"features"` // 功能列表
|
||||
}
|
||||
|
||||
// 更新产品功能关联响应
|
||||
AdminUpdateProductFeaturesResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
)
|
||||
@@ -1,8 +1,8 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "用户中心服务"
|
||||
desc: "用户中心服务"
|
||||
title: "后台用户中心服务"
|
||||
desc: "后台用户中心服务"
|
||||
author: "Liangzai"
|
||||
email: "2440983361@qq.com"
|
||||
version: "v1"
|
||||
@@ -51,12 +51,12 @@ type (
|
||||
|
||||
// 列表响应
|
||||
AdminGetUserListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []UserListItem `json:"items"` // 列表
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []AdminUserListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
// 列表项
|
||||
UserListItem {
|
||||
AdminUserListItem {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
127
app/main/api/desc/admin/notification.api
Normal file
127
app/main/api/desc/admin/notification.api
Normal file
@@ -0,0 +1,127 @@
|
||||
syntax = "v1"
|
||||
|
||||
type (
|
||||
// 创建通知请求
|
||||
AdminCreateNotificationReq {
|
||||
Title string `json:"title"` // 通知标题
|
||||
NotificationPage string `json:"notification_page"` // 通知页面
|
||||
Content string `json:"content"` // 通知内容
|
||||
StartDate string `json:"start_date"` // 生效开始日期(yyyy-MM-dd)
|
||||
StartTime string `json:"start_time"` // 生效开始时间(HH:mm:ss)
|
||||
EndDate string `json:"end_date"` // 生效结束日期(yyyy-MM-dd)
|
||||
EndTime string `json:"end_time"` // 生效结束时间(HH:mm:ss)
|
||||
Status int64 `json:"status"` // 状态:1-启用,0-禁用
|
||||
}
|
||||
|
||||
// 创建通知响应
|
||||
AdminCreateNotificationResp {
|
||||
Id int64 `json:"id"` // 通知ID
|
||||
}
|
||||
|
||||
// 更新通知请求
|
||||
AdminUpdateNotificationReq {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
Title *string `json:"title,optional"` // 通知标题
|
||||
Content *string `json:"content,optional"` // 通知内容
|
||||
NotificationPage *string `json:"notification_page,optional"` // 通知页面
|
||||
StartDate *string `json:"start_date,optional"` // 生效开始日期
|
||||
StartTime *string `json:"start_time,optional"` // 生效开始时间
|
||||
EndDate *string `json:"end_date,optional"` // 生效结束日期
|
||||
EndTime *string `json:"end_time,optional"` // 生效结束时间
|
||||
Status *int64 `json:"status,optional"` // 状态
|
||||
}
|
||||
|
||||
// 更新通知响应
|
||||
AdminUpdateNotificationResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 删除通知请求
|
||||
AdminDeleteNotificationReq {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
}
|
||||
|
||||
// 删除通知响应
|
||||
AdminDeleteNotificationResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 获取通知详情请求
|
||||
AdminGetNotificationDetailReq {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
}
|
||||
|
||||
// 获取通知详情响应
|
||||
AdminGetNotificationDetailResp {
|
||||
Id int64 `json:"id"` // 通知ID
|
||||
Title string `json:"title"` // 通知标题
|
||||
Content string `json:"content"` // 通知内容
|
||||
NotificationPage string `json:"notification_page"` // 通知页面
|
||||
StartDate string `json:"start_date"` // 生效开始日期
|
||||
StartTime string `json:"start_time"` // 生效开始时间
|
||||
EndDate string `json:"end_date"` // 生效结束日期
|
||||
EndTime string `json:"end_time"` // 生效结束时间
|
||||
Status int64 `json:"status"` // 状态
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 获取通知列表请求
|
||||
AdminGetNotificationListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
Title *string `form:"title,optional"` // 通知标题(可选)
|
||||
NotificationPage *string `form:"notification_page,optional"` // 通知页面(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选)
|
||||
StartDate *string `form:"start_date,optional"` // 开始日期范围(可选)
|
||||
EndDate *string `form:"end_date,optional"` // 结束日期范围(可选)
|
||||
}
|
||||
|
||||
// 通知列表项
|
||||
NotificationListItem {
|
||||
Id int64 `json:"id"` // 通知ID
|
||||
Title string `json:"title"` // 通知标题
|
||||
NotificationPage string `json:"notification_page"` // 通知页面
|
||||
Content string `json:"content"` // 通知内容
|
||||
StartDate string `json:"start_date"` // 生效开始日期
|
||||
StartTime string `json:"start_time"` // 生效开始时间
|
||||
EndDate string `json:"end_date"` // 生效结束日期
|
||||
EndTime string `json:"end_time"` // 生效结束时间
|
||||
Status int64 `json:"status"` // 状态
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 获取通知列表响应
|
||||
AdminGetNotificationListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []NotificationListItem `json:"items"` // 列表数据
|
||||
}
|
||||
)
|
||||
|
||||
// 通知管理接口
|
||||
@server(
|
||||
prefix: /api/v1/admin/notification
|
||||
group: admin_notification
|
||||
)
|
||||
service main {
|
||||
// 创建通知
|
||||
@handler AdminCreateNotification
|
||||
post /create (AdminCreateNotificationReq) returns (AdminCreateNotificationResp)
|
||||
|
||||
// 更新通知
|
||||
@handler AdminUpdateNotification
|
||||
put /update/:id (AdminUpdateNotificationReq) returns (AdminUpdateNotificationResp)
|
||||
|
||||
// 删除通知
|
||||
@handler AdminDeleteNotification
|
||||
delete /delete/:id (AdminDeleteNotificationReq) returns (AdminDeleteNotificationResp)
|
||||
|
||||
// 获取通知详情
|
||||
@handler AdminGetNotificationDetail
|
||||
get /detail/:id (AdminGetNotificationDetailReq) returns (AdminGetNotificationDetailResp)
|
||||
|
||||
// 获取通知列表
|
||||
@handler AdminGetNotificationList
|
||||
get /list (AdminGetNotificationListReq) returns (AdminGetNotificationListResp)
|
||||
}
|
||||
167
app/main/api/desc/admin/order.api
Normal file
167
app/main/api/desc/admin/order.api
Normal file
@@ -0,0 +1,167 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "订单服务"
|
||||
desc: "订单服务"
|
||||
author: "Liangzai"
|
||||
email: "2440983361@qq.com"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1/admin/order
|
||||
group: admin_order
|
||||
jwt: JwtAuth
|
||||
)
|
||||
service main {
|
||||
@doc "获取订单列表"
|
||||
@handler AdminGetOrderList
|
||||
get /list (AdminGetOrderListReq) returns (AdminGetOrderListResp)
|
||||
|
||||
@doc "获取订单详情"
|
||||
@handler AdminGetOrderDetail
|
||||
get /detail/:id (AdminGetOrderDetailReq) returns (AdminGetOrderDetailResp)
|
||||
|
||||
@doc "创建订单"
|
||||
@handler AdminCreateOrder
|
||||
post /create (AdminCreateOrderReq) returns (AdminCreateOrderResp)
|
||||
|
||||
@doc "更新订单"
|
||||
@handler AdminUpdateOrder
|
||||
put /update/:id (AdminUpdateOrderReq) returns (AdminUpdateOrderResp)
|
||||
|
||||
@doc "删除订单"
|
||||
@handler AdminDeleteOrder
|
||||
delete /delete/:id (AdminDeleteOrderReq) returns (AdminDeleteOrderResp)
|
||||
|
||||
@doc "订单退款"
|
||||
@handler AdminRefundOrder
|
||||
post /refund/:id (AdminRefundOrderReq) returns (AdminRefundOrderResp)
|
||||
}
|
||||
|
||||
type (
|
||||
// 列表请求
|
||||
AdminGetOrderListReq {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
OrderNo string `form:"order_no,optional"` // 商户订单号
|
||||
PlatformOrderId string `form:"platform_order_id,optional"` // 支付订单号
|
||||
ProductName string `form:"product_name,optional"` // 产品名称
|
||||
PaymentPlatform string `form:"payment_platform,optional"` // 支付方式
|
||||
PaymentScene string `form:"payment_scene,optional"` // 支付平台
|
||||
Amount float64 `form:"amount,optional"` // 金额
|
||||
Status string `form:"status,optional"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
IsPromotion int64 `form:"is_promotion,optional,default=-1"` // 是否推广订单:0-否,1-是
|
||||
CreateTimeStart string `form:"create_time_start,optional"` // 创建时间开始
|
||||
CreateTimeEnd string `form:"create_time_end,optional"` // 创建时间结束
|
||||
PayTimeStart string `form:"pay_time_start,optional"` // 支付时间开始
|
||||
PayTimeEnd string `form:"pay_time_end,optional"` // 支付时间结束
|
||||
RefundTimeStart string `form:"refund_time_start,optional"` // 退款时间开始
|
||||
RefundTimeEnd string `form:"refund_time_end,optional"` // 退款时间结束
|
||||
}
|
||||
|
||||
// 列表响应
|
||||
AdminGetOrderListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []OrderListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
// 列表项
|
||||
OrderListItem {
|
||||
Id int64 `json:"id"` // 订单ID
|
||||
OrderNo string `json:"order_no"` // 商户订单号
|
||||
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
PaymentPlatform string `json:"payment_platform"` // 支付方式
|
||||
PaymentScene string `json:"payment_scene"` // 支付平台
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
Status string `json:"status"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
PayTime string `json:"pay_time"` // 支付时间
|
||||
RefundTime string `json:"refund_time"` // 退款时间
|
||||
IsPromotion int64 `json:"is_promotion"` // 是否推广订单:0-否,1-是
|
||||
}
|
||||
|
||||
// 详情请求
|
||||
AdminGetOrderDetailReq {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
}
|
||||
|
||||
// 详情响应
|
||||
AdminGetOrderDetailResp {
|
||||
Id int64 `json:"id"` // 订单ID
|
||||
OrderNo string `json:"order_no"` // 商户订单号
|
||||
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
PaymentPlatform string `json:"payment_platform"` // 支付方式
|
||||
PaymentScene string `json:"payment_scene"` // 支付平台
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
Status string `json:"status"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
PayTime string `json:"pay_time"` // 支付时间
|
||||
RefundTime string `json:"refund_time"` // 退款时间
|
||||
IsPromotion int64 `json:"is_promotion"` // 是否推广订单:0-否,1-是
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 创建请求
|
||||
AdminCreateOrderReq {
|
||||
OrderNo string `json:"order_no"` // 商户订单号
|
||||
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
PaymentPlatform string `json:"payment_platform"` // 支付方式
|
||||
PaymentScene string `json:"payment_scene"` // 支付平台
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
Status string `json:"status,default=pending"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
IsPromotion int64 `json:"is_promotion,default=0"` // 是否推广订单:0-否,1-是
|
||||
}
|
||||
|
||||
// 创建响应
|
||||
AdminCreateOrderResp {
|
||||
Id int64 `json:"id"` // 订单ID
|
||||
}
|
||||
|
||||
// 更新请求
|
||||
AdminUpdateOrderReq {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
OrderNo *string `json:"order_no,optional"` // 商户订单号
|
||||
PlatformOrderId *string `json:"platform_order_id,optional"` // 支付订单号
|
||||
ProductName *string `json:"product_name,optional"` // 产品名称
|
||||
PaymentPlatform *string `json:"payment_platform,optional"` // 支付方式
|
||||
PaymentScene *string `json:"payment_scene,optional"` // 支付平台
|
||||
Amount *float64 `json:"amount,optional"` // 金额
|
||||
Status *string `json:"status,optional"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
PayTime *string `json:"pay_time,optional"` // 支付时间
|
||||
RefundTime *string `json:"refund_time,optional"` // 退款时间
|
||||
IsPromotion *int64 `json:"is_promotion,optional"` // 是否推广订单:0-否,1-是
|
||||
}
|
||||
|
||||
// 更新响应
|
||||
AdminUpdateOrderResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 删除请求
|
||||
AdminDeleteOrderReq {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
}
|
||||
|
||||
// 删除响应
|
||||
AdminDeleteOrderResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 退款请求
|
||||
AdminRefundOrderReq {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
RefundAmount float64 `json:"refund_amount"` // 退款金额
|
||||
RefundReason string `json:"refund_reason"` // 退款原因
|
||||
}
|
||||
|
||||
// 退款响应
|
||||
AdminRefundOrderResp {
|
||||
Status string `json:"status"` // 退款状态
|
||||
RefundNo string `json:"refund_no"` // 退款单号
|
||||
Amount float64 `json:"amount"` // 退款金额
|
||||
}
|
||||
)
|
||||
124
app/main/api/desc/admin/platform_user.api
Normal file
124
app/main/api/desc/admin/platform_user.api
Normal file
@@ -0,0 +1,124 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "平台用户管理"
|
||||
desc: "平台用户管理"
|
||||
author: "Liangzai"
|
||||
email: "2440983361@qq.com"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
// 平台用户管理接口
|
||||
@server(
|
||||
prefix: /api/v1/admin/platform_user
|
||||
group: admin_platform_user
|
||||
jwt: JwtAuth
|
||||
)
|
||||
service main {
|
||||
// 创建平台用户
|
||||
@handler AdminCreatePlatformUser
|
||||
post /create (AdminCreatePlatformUserReq) returns (AdminCreatePlatformUserResp)
|
||||
|
||||
// 更新平台用户
|
||||
@handler AdminUpdatePlatformUser
|
||||
put /update/:id (AdminUpdatePlatformUserReq) returns (AdminUpdatePlatformUserResp)
|
||||
|
||||
// 删除平台用户
|
||||
@handler AdminDeletePlatformUser
|
||||
delete /delete/:id (AdminDeletePlatformUserReq) returns (AdminDeletePlatformUserResp)
|
||||
|
||||
// 获取平台用户分页列表
|
||||
@handler AdminGetPlatformUserList
|
||||
get /list (AdminGetPlatformUserListReq) returns (AdminGetPlatformUserListResp)
|
||||
|
||||
// 获取平台用户详情
|
||||
@handler AdminGetPlatformUserDetail
|
||||
get /detail/:id (AdminGetPlatformUserDetailReq) returns (AdminGetPlatformUserDetailResp)
|
||||
}
|
||||
|
||||
type (
|
||||
// 分页列表请求
|
||||
AdminGetPlatformUserListReq {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Mobile string `form:"mobile,optional"` // 手机号
|
||||
Nickname string `form:"nickname,optional"` // 昵称
|
||||
Inside int64 `form:"inside,optional"` // 是否内部用户 1-是 0-否
|
||||
CreateTimeStart string `form:"create_time_start,optional"` // 创建时间开始
|
||||
CreateTimeEnd string `form:"create_time_end,optional"` // 创建时间结束
|
||||
OrderBy string `form:"order_by,optional"` // 排序字段
|
||||
OrderType string `form:"order_type,optional"` // 排序类型
|
||||
}
|
||||
|
||||
// 分页列表响应
|
||||
AdminGetPlatformUserListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []PlatformUserListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
// 列表项
|
||||
PlatformUserListItem {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 详情请求
|
||||
AdminGetPlatformUserDetailReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
// 详情响应
|
||||
AdminGetPlatformUserDetailResp {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 创建请求
|
||||
AdminCreatePlatformUserReq {
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Password string `json:"password"` // 密码
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
}
|
||||
|
||||
// 创建响应
|
||||
AdminCreatePlatformUserResp {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
}
|
||||
|
||||
// 更新请求
|
||||
AdminUpdatePlatformUserReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
Mobile *string `json:"mobile,optional"` // 手机号
|
||||
Password *string `json:"password,optional"` // 密码
|
||||
Nickname *string `json:"nickname,optional"` // 昵称
|
||||
Info *string `json:"info,optional"` // 备注信息
|
||||
Inside *int64 `json:"inside,optional"` // 是否内部用户 1-是 0-否
|
||||
}
|
||||
|
||||
// 更新响应
|
||||
AdminUpdatePlatformUserResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 删除请求
|
||||
AdminDeletePlatformUserReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
// 删除响应
|
||||
AdminDeletePlatformUserResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user