后台面板上线
This commit is contained in:
42
app/main/api/desc/admin/admin_query.api
Normal file
42
app/main/api/desc/admin/admin_query.api
Normal file
@@ -0,0 +1,42 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "查询服务"
|
||||
desc: "查询服务"
|
||||
author: "Liangzai"
|
||||
email: "2440983361@qq.com"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1/admin/query
|
||||
group: admin_query
|
||||
jwt: JwtAuth
|
||||
)
|
||||
service main {
|
||||
@doc "获取查询详情"
|
||||
@handler AdminGetQueryDetailByOrderId
|
||||
get /detail/:order_id (AdminGetQueryDetailByOrderIdReq) returns (AdminGetQueryDetailByOrderIdResp)
|
||||
}
|
||||
|
||||
type AdminGetQueryDetailByOrderIdReq {
|
||||
OrderId int64 `path:"order_id"`
|
||||
}
|
||||
|
||||
type AdminGetQueryDetailByOrderIdResp {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
UserId int64 `json:"user_id"` // 用户ID
|
||||
ProductName string `json:"product_name"` // 产品ID
|
||||
QueryParams map[string]interface{} `json:"query_params"`
|
||||
QueryData []AdminQueryItem `json:"query_data"`
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
QueryState string `json:"query_state"` // 查询状态
|
||||
}
|
||||
|
||||
type AdminQueryItem {
|
||||
Feature interface{} `json:"feature"`
|
||||
Data interface{} `json:"data"` // 这里可以是 map 或 具体的 struct
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ type (
|
||||
PaymentScene string `json:"payment_scene"` // 支付平台
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
Status string `json:"status"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
QueryState string `json:"query_state"` // 查询状态:pending-待查询,success-查询成功,failed-查询失败 processing-查询中
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
PayTime string `json:"pay_time"` // 支付时间
|
||||
RefundTime string `json:"refund_time"` // 退款时间
|
||||
@@ -97,6 +98,7 @@ type (
|
||||
PaymentScene string `json:"payment_scene"` // 支付平台
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
Status string `json:"status"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
QueryState string `json:"query_state"` // 查询状态:pending-待查询,success-查询成功,failed-查询失败 processing-查询中
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
PayTime string `json:"pay_time"` // 支付时间
|
||||
RefundTime string `json:"refund_time"` // 退款时间
|
||||
|
||||
@@ -22,3 +22,4 @@ import "./admin/platform_user.api"
|
||||
import "./admin/notification.api"
|
||||
import "./admin/admin_product.api"
|
||||
import "./admin/admin_feature.api"
|
||||
import "./admin/admin_query.api"
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package admin_query
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"tyc-server/app/main/api/internal/logic/admin_query"
|
||||
"tyc-server/app/main/api/internal/svc"
|
||||
"tyc-server/app/main/api/internal/types"
|
||||
"tyc-server/common/result"
|
||||
"tyc-server/pkg/lzkit/validator"
|
||||
)
|
||||
|
||||
func AdminGetQueryDetailByOrderIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.AdminGetQueryDetailByOrderIdReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
result.ParamErrorResult(r, w, err)
|
||||
return
|
||||
}
|
||||
if err := validator.Validate(req); err != nil {
|
||||
result.ParamValidateErrorResult(r, w, err)
|
||||
return
|
||||
}
|
||||
l := admin_query.NewAdminGetQueryDetailByOrderIdLogic(r.Context(), svcCtx)
|
||||
resp, err := l.AdminGetQueryDetailByOrderId(&req)
|
||||
result.HttpResult(r, w, resp, err)
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
admin_platform_user "tyc-server/app/main/api/internal/handler/admin_platform_user"
|
||||
admin_product "tyc-server/app/main/api/internal/handler/admin_product"
|
||||
admin_promotion "tyc-server/app/main/api/internal/handler/admin_promotion"
|
||||
admin_query "tyc-server/app/main/api/internal/handler/admin_query"
|
||||
admin_role "tyc-server/app/main/api/internal/handler/admin_role"
|
||||
admin_user "tyc-server/app/main/api/internal/handler/admin_user"
|
||||
auth "tyc-server/app/main/api/internal/handler/auth"
|
||||
@@ -327,6 +328,19 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
rest.WithPrefix("/api/v1/admin/promotion/stats"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
// 获取查询详情
|
||||
Method: http.MethodGet,
|
||||
Path: "/detail/:order_id",
|
||||
Handler: admin_query.AdminGetQueryDetailByOrderIdHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
|
||||
rest.WithPrefix("/api/v1/admin/query"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
|
||||
@@ -45,6 +45,17 @@ func (l *AdminGetOrderDetailLogic) AdminGetOrderDetail(req *types.AdminGetOrderD
|
||||
isPromotion = 1
|
||||
}
|
||||
|
||||
// 获取查询状态
|
||||
var queryState string
|
||||
builder := l.svcCtx.QueryModel.SelectBuilder().Where("order_id = ?", order.Id).Columns("query_state")
|
||||
queries, err := l.svcCtx.QueryModel.FindAll(l.ctx, builder, "")
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetOrderDetail, 查询查询状态失败 err: %v", err)
|
||||
}
|
||||
if len(queries) > 0 {
|
||||
queryState = queries[0].QueryState
|
||||
}
|
||||
|
||||
// 构建响应
|
||||
resp = &types.AdminGetOrderDetailResp{
|
||||
Id: order.Id,
|
||||
@@ -58,6 +69,7 @@ func (l *AdminGetOrderDetailLogic) AdminGetOrderDetail(req *types.AdminGetOrderD
|
||||
CreateTime: order.CreateTime.Format("2006-01-02 15:04:05"),
|
||||
UpdateTime: order.UpdateTime.Format("2006-01-02 15:04:05"),
|
||||
IsPromotion: isPromotion,
|
||||
QueryState: queryState,
|
||||
}
|
||||
|
||||
// 处理可选字段
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"tyc-server/app/main/model"
|
||||
"tyc-server/common/xerr"
|
||||
|
||||
"github.com/Masterminds/squirrel"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"github.com/zeromicro/go-zero/core/mr"
|
||||
@@ -97,22 +98,49 @@ func (l *AdminGetOrderListLogic) AdminGetOrderList(req *types.AdminGetOrderListR
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 并发获取产品信息
|
||||
// 并发获取产品信息和查询状态
|
||||
productMap := make(map[int64]string)
|
||||
queryStateMap := make(map[int64]string)
|
||||
var mu sync.Mutex
|
||||
|
||||
// 批量获取查询状态
|
||||
if len(orders) > 0 {
|
||||
orderIds := make([]int64, 0, len(orders))
|
||||
for _, order := range orders {
|
||||
orderIds = append(orderIds, order.Id)
|
||||
}
|
||||
builder := l.svcCtx.QueryModel.SelectBuilder().
|
||||
Where(squirrel.Eq{"order_id": orderIds}).
|
||||
Columns("order_id", "query_state")
|
||||
queries, err := l.svcCtx.QueryModel.FindAll(l.ctx, builder, "")
|
||||
if err != nil && !errors.Is(err, model.ErrNotFound) {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetOrderList, 批量查询查询状态失败 err: %v", err)
|
||||
}
|
||||
for _, query := range queries {
|
||||
queryStateMap[query.OrderId] = query.QueryState
|
||||
}
|
||||
}
|
||||
|
||||
// 并发获取产品信息
|
||||
err = mr.MapReduceVoid(func(source chan<- interface{}) {
|
||||
for _, order := range orders {
|
||||
source <- order.ProductId
|
||||
source <- order
|
||||
}
|
||||
}, func(item interface{}, writer mr.Writer[struct{}], cancel func(error)) {
|
||||
productId := item.(int64)
|
||||
product, err := l.svcCtx.ProductModel.FindOne(l.ctx, productId)
|
||||
if err != nil {
|
||||
order := item.(*model.Order)
|
||||
|
||||
// 获取产品信息
|
||||
product, err := l.svcCtx.ProductModel.FindOne(l.ctx, order.ProductId)
|
||||
if err != nil && !errors.Is(err, model.ErrNotFound) {
|
||||
cancel(errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetOrderList, 查询产品信息失败 err: %v", err))
|
||||
return
|
||||
}
|
||||
mu.Lock()
|
||||
productMap[product.Id] = product.ProductName
|
||||
if product != nil {
|
||||
productMap[product.Id] = product.ProductName
|
||||
} else {
|
||||
productMap[order.ProductId] = "" // 产品不存在时设置为空字符串
|
||||
}
|
||||
mu.Unlock()
|
||||
writer.Write(struct{}{})
|
||||
}, func(pipe <-chan struct{}, cancel func(error)) {
|
||||
@@ -140,6 +168,7 @@ func (l *AdminGetOrderListLogic) AdminGetOrderList(req *types.AdminGetOrderListR
|
||||
Amount: order.Amount,
|
||||
Status: order.Status,
|
||||
CreateTime: order.CreateTime.Format("2006-01-02 15:04:05"),
|
||||
QueryState: queryStateMap[order.Id],
|
||||
}
|
||||
if order.PayTime.Valid {
|
||||
item.PayTime = order.PayTime.Time.Format("2006-01-02 15:04:05")
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
package admin_query
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"tyc-server/app/main/api/internal/svc"
|
||||
"tyc-server/app/main/api/internal/types"
|
||||
"tyc-server/common/xerr"
|
||||
"tyc-server/pkg/lzkit/crypto"
|
||||
"tyc-server/pkg/lzkit/lzUtils"
|
||||
|
||||
"github.com/jinzhu/copier"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type AdminGetQueryDetailByOrderIdLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewAdminGetQueryDetailByOrderIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AdminGetQueryDetailByOrderIdLogic {
|
||||
return &AdminGetQueryDetailByOrderIdLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *AdminGetQueryDetailByOrderIdLogic) AdminGetQueryDetailByOrderId(req *types.AdminGetQueryDetailByOrderIdReq) (resp *types.AdminGetQueryDetailByOrderIdResp, err error) {
|
||||
|
||||
// 获取报告信息
|
||||
queryModel, err := l.svcCtx.QueryModel.FindOneByOrderId(l.ctx, req.OrderId)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "报告查询, 查找报告错误: %+v", err)
|
||||
}
|
||||
|
||||
var query types.AdminGetQueryDetailByOrderIdResp
|
||||
query.CreateTime = queryModel.CreateTime.Format("2006-01-02 15:04:05")
|
||||
query.UpdateTime = queryModel.UpdateTime.Format("2006-01-02 15:04:05")
|
||||
|
||||
// 解密查询数据
|
||||
secretKey := l.svcCtx.Config.Encrypt.SecretKey
|
||||
key, decodeErr := hex.DecodeString(secretKey)
|
||||
if decodeErr != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "报告查询, 获取AES解密解药失败, %+v", err)
|
||||
}
|
||||
processParamsErr := ProcessQueryParams(queryModel.QueryParams, &query.QueryParams, key)
|
||||
if processParamsErr != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "报告查询, 报告参数处理失败: %v", processParamsErr)
|
||||
}
|
||||
processErr := ProcessQueryData(queryModel.QueryData, &query.QueryData, key)
|
||||
if processErr != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "报告查询, 报告结果处理失败: %v", processErr)
|
||||
}
|
||||
updateFeatureAndProductFeatureErr := l.UpdateFeatureAndProductFeature(queryModel.ProductId, &query.QueryData)
|
||||
if updateFeatureAndProductFeatureErr != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "报告查询, 报告结果处理失败: %v", updateFeatureAndProductFeatureErr)
|
||||
}
|
||||
// 复制报告数据
|
||||
err = copier.Copy(&query, queryModel)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "报告查询, 报告结构体复制失败, %v", err)
|
||||
}
|
||||
product, err := l.svcCtx.ProductModel.FindOne(l.ctx, queryModel.ProductId)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "报告查询, 获取商品信息失败, %v", err)
|
||||
}
|
||||
query.ProductName = product.ProductName
|
||||
return &types.AdminGetQueryDetailByOrderIdResp{
|
||||
Id: query.Id,
|
||||
OrderId: query.OrderId,
|
||||
UserId: query.UserId,
|
||||
ProductName: query.ProductName,
|
||||
QueryParams: query.QueryParams,
|
||||
QueryData: query.QueryData,
|
||||
CreateTime: query.CreateTime,
|
||||
UpdateTime: query.UpdateTime,
|
||||
QueryState: query.QueryState,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ProcessQueryData 解密和反序列化 QueryData
|
||||
func ProcessQueryData(queryData sql.NullString, target *[]types.AdminQueryItem, key []byte) error {
|
||||
queryDataStr := lzUtils.NullStringToString(queryData)
|
||||
if queryDataStr == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 解密数据
|
||||
decryptedData, decryptErr := crypto.AesDecrypt(queryDataStr, key)
|
||||
if decryptErr != nil {
|
||||
return decryptErr
|
||||
}
|
||||
|
||||
// 解析 JSON 数组
|
||||
var decryptedArray []map[string]interface{}
|
||||
unmarshalErr := json.Unmarshal(decryptedData, &decryptedArray)
|
||||
if unmarshalErr != nil {
|
||||
return unmarshalErr
|
||||
}
|
||||
|
||||
// 确保 target 具有正确的长度
|
||||
if len(*target) == 0 {
|
||||
*target = make([]types.AdminQueryItem, len(decryptedArray))
|
||||
}
|
||||
|
||||
// 填充解密后的数据到 target
|
||||
for i := 0; i < len(decryptedArray); i++ {
|
||||
// 直接填充解密数据到 Data 字段
|
||||
(*target)[i].Data = decryptedArray[i]
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ProcessQueryParams解密和反序列化 QueryParams
|
||||
func ProcessQueryParams(QueryParams string, target *map[string]interface{}, key []byte) error {
|
||||
// 解密 QueryParams
|
||||
decryptedData, decryptErr := crypto.AesDecrypt(QueryParams, key)
|
||||
if decryptErr != nil {
|
||||
return decryptErr
|
||||
}
|
||||
|
||||
// 反序列化解密后的数据
|
||||
unmarshalErr := json.Unmarshal(decryptedData, target)
|
||||
if unmarshalErr != nil {
|
||||
return unmarshalErr
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *AdminGetQueryDetailByOrderIdLogic) UpdateFeatureAndProductFeature(productID int64, target *[]types.AdminQueryItem) error {
|
||||
// 遍历 target 数组,使用倒序遍历,以便删除元素时不影响索引
|
||||
for i := len(*target) - 1; i >= 0; i-- {
|
||||
queryItem := &(*target)[i]
|
||||
|
||||
// 确保 Data 为 map 类型
|
||||
data, ok := queryItem.Data.(map[string]interface{})
|
||||
if !ok {
|
||||
return fmt.Errorf("queryItem.Data 必须是 map[string]interface{} 类型")
|
||||
}
|
||||
|
||||
// 从 Data 中获取 apiID
|
||||
apiID, ok := data["apiID"].(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("queryItem.Data 中的 apiID 必须是字符串类型")
|
||||
}
|
||||
|
||||
// 查询 Feature
|
||||
feature, err := l.svcCtx.FeatureModel.FindOneByApiId(l.ctx, apiID)
|
||||
if err != nil {
|
||||
// 如果 Feature 查不到,也要删除当前 QueryItem
|
||||
*target = append((*target)[:i], (*target)[i+1:]...)
|
||||
continue
|
||||
}
|
||||
|
||||
// 查询 ProductFeatureModel
|
||||
builder := l.svcCtx.ProductFeatureModel.SelectBuilder().Where("product_id = ?", productID)
|
||||
productFeatures, err := l.svcCtx.ProductFeatureModel.FindAll(l.ctx, builder, "")
|
||||
if err != nil {
|
||||
return fmt.Errorf("查询 ProductFeatureModel 错误: %v", err)
|
||||
}
|
||||
|
||||
// 遍历 productFeatures,找到与 feature.ID 关联且 enable == 1 的项
|
||||
var featureData map[string]interface{}
|
||||
sort := 0
|
||||
for _, pf := range productFeatures {
|
||||
if pf.FeatureId == feature.Id { // 确保和 Feature 关联
|
||||
sort = int(pf.Sort)
|
||||
break // 找到第一个符合条件的就退出循环
|
||||
}
|
||||
}
|
||||
featureData = map[string]interface{}{
|
||||
"featureName": feature.Name,
|
||||
"sort": sort,
|
||||
}
|
||||
|
||||
// 更新 queryItem 的 Feature 字段(不是数组)
|
||||
queryItem.Feature = featureData
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
15
app/main/api/internal/types/adminauth.go
Normal file
15
app/main/api/internal/types/adminauth.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type AdminLoginReq struct {
|
||||
Username string `json:"username" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Captcha bool `json:"captcha" validate:"required"`
|
||||
}
|
||||
|
||||
type AdminLoginResp struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
AccessExpire int64 `json:"access_expire"`
|
||||
RefreshAfter int64 `json:"refresh_after"`
|
||||
Roles []string `json:"roles"`
|
||||
}
|
||||
53
app/main/api/internal/types/adminfeature.go
Normal file
53
app/main/api/internal/types/adminfeature.go
Normal file
@@ -0,0 +1,53 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type AdminCreateFeatureReq struct {
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
}
|
||||
|
||||
type AdminCreateFeatureResp struct {
|
||||
Id int64 `json:"id"` // 功能ID
|
||||
}
|
||||
|
||||
type AdminDeleteFeatureReq struct {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
}
|
||||
|
||||
type AdminDeleteFeatureResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminGetFeatureDetailReq struct {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
}
|
||||
|
||||
type AdminGetFeatureDetailResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetFeatureListReq struct {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
ApiId *string `form:"api_id,optional"` // API标识
|
||||
Name *string `form:"name,optional"` // 描述
|
||||
}
|
||||
|
||||
type AdminGetFeatureListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []FeatureListItem `json:"items"` // 列表数据
|
||||
}
|
||||
|
||||
type AdminUpdateFeatureReq struct {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
ApiId *string `json:"api_id,optional"` // API标识
|
||||
Name *string `json:"name,optional"` // 描述
|
||||
}
|
||||
|
||||
type AdminUpdateFeatureResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
97
app/main/api/internal/types/adminmenu.go
Normal file
97
app/main/api/internal/types/adminmenu.go
Normal file
@@ -0,0 +1,97 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type CreateMenuReq struct {
|
||||
Pid int64 `json:"pid,optional"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path,optional"` // 路由路径
|
||||
Component string `json:"component,optional"` // 组件路径
|
||||
Redirect string `json:"redirect,optional"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status,optional,default=1"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort,optional"` // 排序
|
||||
}
|
||||
|
||||
type CreateMenuResp struct {
|
||||
Id int64 `json:"id"` // 菜单ID
|
||||
}
|
||||
|
||||
type DeleteMenuReq struct {
|
||||
Id int64 `path:"id"` // 菜单ID
|
||||
}
|
||||
|
||||
type DeleteMenuResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type GetMenuAllReq struct {
|
||||
}
|
||||
|
||||
type GetMenuAllResp struct {
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
Redirect string `json:"redirect,omitempty"`
|
||||
Component string `json:"component,omitempty"`
|
||||
Sort int64 `json:"sort"`
|
||||
Meta map[string]interface{} `json:"meta"`
|
||||
Children []GetMenuAllResp `json:"children"`
|
||||
}
|
||||
|
||||
type GetMenuDetailReq struct {
|
||||
Id int64 `path:"id"` // 菜单ID
|
||||
}
|
||||
|
||||
type GetMenuDetailResp struct {
|
||||
Id int64 `json:"id"` // 菜单ID
|
||||
Pid int64 `json:"pid"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path"` // 路由路径
|
||||
Component string `json:"component"` // 组件路径
|
||||
Redirect string `json:"redirect"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
UpdateTime string `json:"updateTime"` // 更新时间
|
||||
}
|
||||
|
||||
type GetMenuListReq struct {
|
||||
Name string `form:"name,optional"` // 菜单名称
|
||||
Path string `form:"path,optional"` // 路由路径
|
||||
Status int64 `form:"status,optional,default=-1"` // 状态:0-禁用,1-启用
|
||||
Type string `form:"type,optional"` // 类型
|
||||
}
|
||||
|
||||
type MenuListItem struct {
|
||||
Id int64 `json:"id"` // 菜单ID
|
||||
Pid int64 `json:"pid"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path"` // 路由路径
|
||||
Component string `json:"component"` // 组件路径
|
||||
Redirect string `json:"redirect"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
Children []MenuListItem `json:"children"` // 子菜单
|
||||
}
|
||||
|
||||
type UpdateMenuReq struct {
|
||||
Id int64 `path:"id"` // 菜单ID
|
||||
Pid int64 `json:"pid,optional"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path,optional"` // 路由路径
|
||||
Component string `json:"component,optional"` // 组件路径
|
||||
Redirect string `json:"redirect,optional"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort,optional"` // 排序
|
||||
}
|
||||
|
||||
type UpdateMenuResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
74
app/main/api/internal/types/adminnotification.go
Normal file
74
app/main/api/internal/types/adminnotification.go
Normal file
@@ -0,0 +1,74 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type AdminCreateNotificationReq struct {
|
||||
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-禁用
|
||||
}
|
||||
|
||||
type AdminCreateNotificationResp struct {
|
||||
Id int64 `json:"id"` // 通知ID
|
||||
}
|
||||
|
||||
type AdminDeleteNotificationReq struct {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
}
|
||||
|
||||
type AdminDeleteNotificationResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminGetNotificationDetailReq struct {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
}
|
||||
|
||||
type AdminGetNotificationDetailResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetNotificationListReq struct {
|
||||
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"` // 结束日期范围(可选)
|
||||
}
|
||||
|
||||
type AdminGetNotificationListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []NotificationListItem `json:"items"` // 列表数据
|
||||
}
|
||||
|
||||
type AdminUpdateNotificationReq struct {
|
||||
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"` // 状态
|
||||
}
|
||||
|
||||
type AdminUpdateNotificationResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
100
app/main/api/internal/types/adminorder.go
Normal file
100
app/main/api/internal/types/adminorder.go
Normal file
@@ -0,0 +1,100 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type AdminCreateOrderReq struct {
|
||||
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-是
|
||||
}
|
||||
|
||||
type AdminCreateOrderResp struct {
|
||||
Id int64 `json:"id"` // 订单ID
|
||||
}
|
||||
|
||||
type AdminDeleteOrderReq struct {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
}
|
||||
|
||||
type AdminDeleteOrderResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminGetOrderDetailReq struct {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
}
|
||||
|
||||
type AdminGetOrderDetailResp struct {
|
||||
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-支付失败
|
||||
QueryState string `json:"query_state"` // 查询状态:pending-待查询,success-查询成功,failed-查询失败 processing-查询中
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetOrderListReq struct {
|
||||
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"` // 退款时间结束
|
||||
}
|
||||
|
||||
type AdminGetOrderListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []OrderListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type AdminRefundOrderReq struct {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
RefundAmount float64 `json:"refund_amount"` // 退款金额
|
||||
RefundReason string `json:"refund_reason"` // 退款原因
|
||||
}
|
||||
|
||||
type AdminRefundOrderResp struct {
|
||||
Status string `json:"status"` // 退款状态
|
||||
RefundNo string `json:"refund_no"` // 退款单号
|
||||
Amount float64 `json:"amount"` // 退款金额
|
||||
}
|
||||
|
||||
type AdminUpdateOrderReq struct {
|
||||
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-是
|
||||
}
|
||||
|
||||
type AdminUpdateOrderResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
66
app/main/api/internal/types/adminplatformuser.go
Normal file
66
app/main/api/internal/types/adminplatformuser.go
Normal file
@@ -0,0 +1,66 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type AdminCreatePlatformUserReq struct {
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Password string `json:"password"` // 密码
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
}
|
||||
|
||||
type AdminCreatePlatformUserResp struct {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminDeletePlatformUserReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminDeletePlatformUserResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminGetPlatformUserDetailReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminGetPlatformUserDetailResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetPlatformUserListReq struct {
|
||||
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"` // 排序类型
|
||||
}
|
||||
|
||||
type AdminGetPlatformUserListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []PlatformUserListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type AdminUpdatePlatformUserReq struct {
|
||||
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-否
|
||||
}
|
||||
|
||||
type AdminUpdatePlatformUserResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
91
app/main/api/internal/types/adminproduct.go
Normal file
91
app/main/api/internal/types/adminproduct.go
Normal file
@@ -0,0 +1,91 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type AdminCreateProductReq struct {
|
||||
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"` // 售价
|
||||
}
|
||||
|
||||
type AdminCreateProductResp struct {
|
||||
Id int64 `json:"id"` // 产品ID
|
||||
}
|
||||
|
||||
type AdminDeleteProductReq struct {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
}
|
||||
|
||||
type AdminDeleteProductResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminGetProductDetailReq struct {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
}
|
||||
|
||||
type AdminGetProductDetailResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetProductFeatureListReq struct {
|
||||
ProductId int64 `path:"product_id"` // 产品ID
|
||||
}
|
||||
|
||||
type AdminGetProductFeatureListResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetProductListReq struct {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
ProductName *string `form:"product_name,optional"` // 服务名
|
||||
ProductEn *string `form:"product_en,optional"` // 英文名
|
||||
}
|
||||
|
||||
type AdminGetProductListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []ProductListItem `json:"items"` // 列表数据
|
||||
}
|
||||
|
||||
type AdminUpdateProductFeaturesReq struct {
|
||||
ProductId int64 `path:"product_id"` // 产品ID
|
||||
Features []ProductFeatureItem `json:"features"` // 功能列表
|
||||
}
|
||||
|
||||
type AdminUpdateProductFeaturesResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminUpdateProductReq struct {
|
||||
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"` // 售价
|
||||
}
|
||||
|
||||
type AdminUpdateProductResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
90
app/main/api/internal/types/adminpromotion.go
Normal file
90
app/main/api/internal/types/adminpromotion.go
Normal file
@@ -0,0 +1,90 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type CreatePromotionLinkReq struct {
|
||||
Name string `json:"name"` // 链接名称
|
||||
}
|
||||
|
||||
type CreatePromotionLinkResp struct {
|
||||
Id int64 `json:"id"` // 链接ID
|
||||
Url string `json:"url"` // 生成的推广链接URL
|
||||
}
|
||||
|
||||
type DeletePromotionLinkReq struct {
|
||||
Id int64 `path:"id"` // 链接ID
|
||||
}
|
||||
|
||||
type DeletePromotionLinkResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type GetPromotionLinkDetailReq struct {
|
||||
Id int64 `path:"id"` // 链接ID
|
||||
}
|
||||
|
||||
type GetPromotionLinkDetailResp struct {
|
||||
Name string `json:"name"` // 链接名称
|
||||
Url string `json:"url"` // 推广链接URL
|
||||
ClickCount int64 `json:"click_count"` // 点击数
|
||||
PayCount int64 `json:"pay_count"` // 付费次数
|
||||
PayAmount string `json:"pay_amount"` // 付费金额
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
LastClickTime string `json:"last_click_time,optional"` // 最后点击时间
|
||||
LastPayTime string `json:"last_pay_time,optional"` // 最后付费时间
|
||||
}
|
||||
|
||||
type GetPromotionLinkListReq struct {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Name string `form:"name,optional"` // 链接名称
|
||||
Url string `form:"url,optional"` // 推广链接URL
|
||||
}
|
||||
|
||||
type GetPromotionLinkListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []PromotionLinkItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type GetPromotionStatsHistoryReq struct {
|
||||
StartDate string `form:"start_date"` // 开始日期,格式:YYYY-MM-DD
|
||||
EndDate string `form:"end_date"` // 结束日期,格式:YYYY-MM-DD
|
||||
}
|
||||
|
||||
type GetPromotionStatsTotalReq struct {
|
||||
}
|
||||
|
||||
type GetPromotionStatsTotalResp struct {
|
||||
TodayPayAmount float64 `json:"today_pay_amount"` // 今日金额
|
||||
TodayClickCount int64 `json:"today_click_count"` // 今日点击数
|
||||
TodayPayCount int64 `json:"today_pay_count"` // 今日付费次数
|
||||
TotalPayAmount float64 `json:"total_pay_amount"` // 总金额
|
||||
TotalClickCount int64 `json:"total_click_count"` // 总点击数
|
||||
TotalPayCount int64 `json:"total_pay_count"` // 总付费次数
|
||||
}
|
||||
|
||||
type PromotionStatsHistoryItem struct {
|
||||
Id int64 `json:"id"` // 记录ID
|
||||
LinkId int64 `json:"link_id"` // 链接ID
|
||||
PayAmount float64 `json:"pay_amount"` // 金额
|
||||
ClickCount int64 `json:"click_count"` // 点击数
|
||||
PayCount int64 `json:"pay_count"` // 付费次数
|
||||
StatsDate string `json:"stats_date"` // 统计日期
|
||||
}
|
||||
|
||||
type RecordLinkClickReq struct {
|
||||
Path string `path:"path"` // 链接路径
|
||||
}
|
||||
|
||||
type RecordLinkClickResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type UpdatePromotionLinkReq struct {
|
||||
Id int64 `path:"id"` // 链接ID
|
||||
Name *string `json:"name,optional"` // 链接名称
|
||||
}
|
||||
|
||||
type UpdatePromotionLinkResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
18
app/main/api/internal/types/adminquery.go
Normal file
18
app/main/api/internal/types/adminquery.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type AdminGetQueryDetailByOrderIdReq struct {
|
||||
OrderId int64 `path:"order_id"`
|
||||
}
|
||||
|
||||
type AdminGetQueryDetailByOrderIdResp struct {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
UserId int64 `json:"user_id"` // 用户ID
|
||||
ProductName string `json:"product_name"` // 产品ID
|
||||
QueryParams map[string]interface{} `json:"query_params"`
|
||||
QueryData []AdminQueryItem `json:"query_data"`
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
QueryState string `json:"query_state"` // 查询状态
|
||||
}
|
||||
66
app/main/api/internal/types/adminrole.go
Normal file
66
app/main/api/internal/types/adminrole.go
Normal file
@@ -0,0 +1,66 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type CreateRoleReq struct {
|
||||
RoleName string `json:"role_name"` // 角色名称
|
||||
RoleCode string `json:"role_code"` // 角色编码
|
||||
Description string `json:"description"` // 角色描述
|
||||
Status int64 `json:"status,default=1"` // 状态:0-禁用,1-启用
|
||||
Sort int64 `json:"sort,default=0"` // 排序
|
||||
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
type CreateRoleResp struct {
|
||||
Id int64 `json:"id"` // 角色ID
|
||||
}
|
||||
|
||||
type DeleteRoleReq struct {
|
||||
Id int64 `path:"id"` // 角色ID
|
||||
}
|
||||
|
||||
type DeleteRoleResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type GetRoleDetailReq struct {
|
||||
Id int64 `path:"id"` // 角色ID
|
||||
}
|
||||
|
||||
type GetRoleDetailResp struct {
|
||||
Id int64 `json:"id"` // 角色ID
|
||||
RoleName string `json:"role_name"` // 角色名称
|
||||
RoleCode string `json:"role_code"` // 角色编码
|
||||
Description string `json:"description"` // 角色描述
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
type GetRoleListReq struct {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Name string `form:"name,optional"` // 角色名称
|
||||
Code string `form:"code,optional"` // 角色编码
|
||||
Status int64 `form:"status,optional,default=-1"` // 状态:0-禁用,1-启用
|
||||
}
|
||||
|
||||
type GetRoleListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []RoleListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type UpdateRoleReq struct {
|
||||
Id int64 `path:"id"` // 角色ID
|
||||
RoleName *string `json:"role_name,optional"` // 角色名称
|
||||
RoleCode *string `json:"role_code,optional"` // 角色编码
|
||||
Description *string `json:"description,optional"` // 角色描述
|
||||
Status *int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
Sort *int64 `json:"sort,optional"` // 排序
|
||||
MenuIds []int64 `json:"menu_ids,optional"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
type UpdateRoleResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
69
app/main/api/internal/types/adminuser.go
Normal file
69
app/main/api/internal/types/adminuser.go
Normal file
@@ -0,0 +1,69 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type AdminCreateUserReq struct {
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status,default=1"` // 状态:0-禁用,1-启用
|
||||
RoleIds []int64 `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
type AdminCreateUserResp struct {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminDeleteUserReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminDeleteUserResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminGetUserDetailReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminGetUserDetailResp struct {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
RoleIds []int64 `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
type AdminGetUserListReq struct {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Username string `form:"username,optional"` // 用户名
|
||||
RealName string `form:"real_name,optional"` // 真实姓名
|
||||
Status int64 `form:"status,optional,default=-1"` // 状态:0-禁用,1-启用
|
||||
}
|
||||
|
||||
type AdminGetUserListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []AdminUserListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type AdminUpdateUserReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
Username *string `json:"username,optional"` // 用户名
|
||||
RealName *string `json:"real_name,optional"` // 真实姓名
|
||||
Status *int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
RoleIds []int64 `json:"role_ids,optional"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
type AdminUpdateUserResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminUserInfoReq struct {
|
||||
}
|
||||
|
||||
type AdminUserInfoResp struct {
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Roles []string `json:"roles"` // 角色编码列表
|
||||
}
|
||||
7
app/main/api/internal/types/auth.go
Normal file
7
app/main/api/internal/types/auth.go
Normal file
@@ -0,0 +1,7 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type SendSmsReq struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
ActionType string `json:"actionType" validate:"required,oneof=login register query"`
|
||||
}
|
||||
7
app/main/api/internal/types/notification.go
Normal file
7
app/main/api/internal/types/notification.go
Normal file
@@ -0,0 +1,7 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type GetNotificationsResp struct {
|
||||
Notifications []Notification `json:"notifications"` // 通知列表
|
||||
Total int64 `json:"total"` // 总记录数
|
||||
}
|
||||
18
app/main/api/internal/types/pay.go
Normal file
18
app/main/api/internal/types/pay.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type IapCallbackReq struct {
|
||||
OrderID int64 `json:"order_id" validate:"required"`
|
||||
TransactionReceipt string `json:"transaction_receipt" validate:"required"`
|
||||
}
|
||||
|
||||
type PaymentReq struct {
|
||||
Id string `json:"id"`
|
||||
PayMethod string `json:"pay_method"`
|
||||
}
|
||||
|
||||
type PaymentResp struct {
|
||||
PrepayData interface{} `json:"prepay_data"`
|
||||
PrepayId string `json:"prepay_id"`
|
||||
OrderID int64 `json:"order_id"`
|
||||
}
|
||||
22
app/main/api/internal/types/product.go
Normal file
22
app/main/api/internal/types/product.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type GetProductByEnRequest struct {
|
||||
ProductEn string `path:"product_en"`
|
||||
}
|
||||
|
||||
type GetProductByIDRequest struct {
|
||||
Id int64 `path:"id"`
|
||||
}
|
||||
|
||||
type GetProductRenderListRequest struct {
|
||||
Module string `path:"module"`
|
||||
}
|
||||
|
||||
type GetProductRenderListResponse struct {
|
||||
Product []Product
|
||||
}
|
||||
|
||||
type ProductResponse struct {
|
||||
Product
|
||||
}
|
||||
@@ -1,209 +1,89 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type MarriageReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
type HomeServiceReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
type QueryDetailByOrderIdReq struct {
|
||||
OrderId int64 `path:"order_id"`
|
||||
}
|
||||
|
||||
// RiskAssessment 查询请求结构
|
||||
type RiskAssessmentReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
type QueryDetailByOrderIdResp struct {
|
||||
Query
|
||||
}
|
||||
|
||||
// CompanyInfo 查询请求结构
|
||||
type CompanyInfoReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
type QueryDetailByOrderNoReq struct {
|
||||
OrderNo string `path:"order_no"`
|
||||
}
|
||||
|
||||
// RentalInfo 查询请求结构
|
||||
type RentalInfoReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
type QueryDetailByOrderNoResp struct {
|
||||
Query
|
||||
}
|
||||
|
||||
// PreLoanBackgroundCheck 查询请求结构
|
||||
type PreLoanBackgroundCheckReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
type QueryDetailReq struct {
|
||||
Id int64 `path:"id"`
|
||||
}
|
||||
|
||||
// BackgroundCheck 查询请求结构
|
||||
type BackgroundCheckReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
type EntLawsuitReq struct {
|
||||
EntName string `json:"ent_name" validate:"required,name"`
|
||||
EntCode string `json:"ent_code" validate:"required,USCI"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
type TocPhoneThreeElements struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
type TocPhoneTwoElements struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
type TocIDCardTwoElements struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
}
|
||||
type TocDualMarriage struct {
|
||||
NameMan string `json:"name_man" validate:"required,name"`
|
||||
IDCardMan string `json:"id_card_man" validate:"required,idCard"`
|
||||
NameWoman string `json:"name_woman" validate:"required,name"`
|
||||
IDCardWoman string `json:"id_card_woman" validate:"required,idCard"`
|
||||
}
|
||||
type TocPersonVehicleVerification struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
CarType string `json:"car_type" validate:"required"`
|
||||
CarLicense string `json:"car_license" validate:"required"`
|
||||
}
|
||||
type TocCarVin struct {
|
||||
VinCode string `json:"vin_code" validate:"required"`
|
||||
}
|
||||
type TocCarVinDrivingPermit struct {
|
||||
VinCode string `json:"vin_code" validate:"required"`
|
||||
CarDrivingPermit string `json:"car_driving_permit" validate:"required"`
|
||||
}
|
||||
type TocCarVinLicense struct {
|
||||
VinCode string `json:"vin_code" validate:"required"`
|
||||
CarLicense string `json:"car_license" validate:"required"`
|
||||
type QueryDetailResp struct {
|
||||
Query
|
||||
}
|
||||
|
||||
// 银行卡黑名单
|
||||
type TocBankCardBlacklist struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
type QueryExampleReq struct {
|
||||
Feature string `form:"feature"`
|
||||
}
|
||||
|
||||
// 手机号码风险
|
||||
type TocPhoneNumberRisk struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
type QueryExampleResp struct {
|
||||
Query
|
||||
}
|
||||
|
||||
// 手机二次卡
|
||||
type TocPhoneSecondaryCard struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
StartDate string `json:"start_date" validate:"required"`
|
||||
type QueryListReq struct {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"page_size"` // 每页数据量
|
||||
}
|
||||
|
||||
// 出境限制查询
|
||||
type TocExitRestriction struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
type QueryListResp struct {
|
||||
Total int64 `json:"total"` // 总记录数
|
||||
List []Query `json:"list"` // 查询列表
|
||||
}
|
||||
|
||||
// 手机月消费档次查询
|
||||
type TocMonthlyMobileConsumptionLevel struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
type QueryProvisionalOrderReq struct {
|
||||
Id string `path:"id"`
|
||||
}
|
||||
|
||||
// 学历信息验证
|
||||
type TocEducationVerification struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
CertificateNumber string `json:"certificate_number" validate:"required"`
|
||||
type QueryProvisionalOrderResp struct {
|
||||
QueryParams map[string]interface{} `json:"query_params"`
|
||||
Product Product `json:"product"`
|
||||
}
|
||||
|
||||
// 反诈反赌风险核验
|
||||
type TocFraudGamblingCheck struct {
|
||||
Mobile string `json:"mobile,omitempty" validate:"omitempty,mobile"`
|
||||
BankCard string `json:"bank_card,omitempty" validate:"omitempty,bankCard"`
|
||||
IDCard string `json:"id_card,omitempty" validate:"omitempty,idCard"`
|
||||
type QueryRetryReq struct {
|
||||
Id int64 `path:"id"`
|
||||
}
|
||||
|
||||
// 手机号反赌反诈风险查询
|
||||
type TocMobileDrugFraudRiskCheck struct {
|
||||
Mobile string `json:"mobile,omitempty" validate:"omitempty,mobile"`
|
||||
BankCard string `json:"bank_card,omitempty" validate:"omitempty,bankCard"`
|
||||
IDCard string `json:"id_card,omitempty" validate:"omitempty,idCard"`
|
||||
type QueryRetryResp struct {
|
||||
}
|
||||
|
||||
// 手机号空号检测
|
||||
type TocMobileNumberValidation struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
type QueryServiceReq struct {
|
||||
Product string `path:"product"`
|
||||
Data string `json:"data" validate:"required"`
|
||||
}
|
||||
|
||||
// 银行卡归属地查询
|
||||
type TocBankCardLocation struct {
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
type QueryServiceResp struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// 银行卡姓名二要素验证
|
||||
type TocBankCardNameElementVerification struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
type QuerySingleTestReq struct {
|
||||
Params map[string]interface{} `json:"params"`
|
||||
Api string `json:"api"`
|
||||
}
|
||||
|
||||
// 银行卡号码二要素验证
|
||||
type TocBankCardIDElementVerification struct {
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
type QuerySingleTestResp struct {
|
||||
Data interface{} `json:"data"`
|
||||
Api string `json:"api"`
|
||||
}
|
||||
|
||||
// 银行卡三要素综合验证
|
||||
type TocBankCardThreeElementsVerification struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
type UpdateQueryDataReq struct {
|
||||
Id int64 `json:"id"` // 查询ID
|
||||
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
|
||||
}
|
||||
|
||||
// 高风险特殊手机号
|
||||
type TocMobileRiskAssessment struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
// 手机归属地
|
||||
type TocMobileLocation struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
// 身份证归属地
|
||||
type TocIDCardLocation struct {
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
}
|
||||
|
||||
// 偿贷压力
|
||||
type TocDebtRepayStress struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
// 学历信息查询
|
||||
type TocEducationInfo struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
}
|
||||
|
||||
// 人企关系加强版
|
||||
type TocPersonEnterprisePro struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
type UpdateQueryDataResp struct {
|
||||
Id int64 `json:"id"`
|
||||
UpdatedAt string `json:"updated_at"` // 更新时间
|
||||
}
|
||||
|
||||
@@ -1,73 +1,209 @@
|
||||
package types
|
||||
|
||||
type WestDexServiceRequestParams struct {
|
||||
FieldMapping map[string]string
|
||||
ApiID string
|
||||
type MarriageReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
type HomeServiceReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
var WestDexParams = map[string][]WestDexServiceRequestParams{
|
||||
"marriage": {
|
||||
{FieldMapping: G09SC02FieldMapping, ApiID: "G09SC02"}, // 单人婚姻
|
||||
{FieldMapping: G27BJ05FieldMapping, ApiID: "G27BJ05"}, // 借贷意向
|
||||
{FieldMapping: G28BJ05FieldMapping, ApiID: "G28BJ05"}, // 借贷行为
|
||||
{FieldMapping: G26BJ05FieldMapping, ApiID: "G26BJ05"}, // 特殊名单
|
||||
{FieldMapping: G34BJ03FieldMapping, ApiID: "G34BJ03"}, // 个人不良
|
||||
{FieldMapping: G35SC01FieldMapping, ApiID: "G35SC01"}, // 个人涉诉
|
||||
{FieldMapping: G05HZ01FieldMapping, ApiID: "G05HZ01"}, // 股东人企关系
|
||||
|
||||
},
|
||||
"backgroundcheck": {
|
||||
{FieldMapping: G09SC02FieldMapping, ApiID: "G09SC02"}, // 单人婚姻
|
||||
{FieldMapping: G27BJ05FieldMapping, ApiID: "G27BJ05"}, // 借贷意向
|
||||
{FieldMapping: G28BJ05FieldMapping, ApiID: "G28BJ05"}, // 借贷行为
|
||||
{FieldMapping: G26BJ05FieldMapping, ApiID: "G26BJ05"}, // 特殊名单
|
||||
{FieldMapping: G05HZ01FieldMapping, ApiID: "G05HZ01"}, // 股东人企关系
|
||||
{FieldMapping: G34BJ03FieldMapping, ApiID: "G34BJ03"}, // 个人不良
|
||||
{FieldMapping: G35SC01FieldMapping, ApiID: "G35SC01"}, // 个人涉诉
|
||||
},
|
||||
"companyinfo": {
|
||||
{FieldMapping: G09SC02FieldMapping, ApiID: "G09SC02"}, // 单人婚姻
|
||||
{FieldMapping: G27BJ05FieldMapping, ApiID: "G27BJ05"}, // 借贷意向
|
||||
{FieldMapping: G28BJ05FieldMapping, ApiID: "G28BJ05"}, // 借贷行为
|
||||
{FieldMapping: G26BJ05FieldMapping, ApiID: "G26BJ05"}, // 特殊名单
|
||||
{FieldMapping: G05HZ01FieldMapping, ApiID: "G05HZ01"}, // 股东人企关系
|
||||
{FieldMapping: G34BJ03FieldMapping, ApiID: "G34BJ03"}, // 个人不良
|
||||
{FieldMapping: G35SC01FieldMapping, ApiID: "G35SC01"}, // 个人涉诉
|
||||
},
|
||||
"homeservice": {
|
||||
{FieldMapping: G09SC02FieldMapping, ApiID: "G09SC02"}, // 单人婚姻
|
||||
{FieldMapping: G27BJ05FieldMapping, ApiID: "G27BJ05"}, // 借贷意向
|
||||
{FieldMapping: G28BJ05FieldMapping, ApiID: "G28BJ05"}, // 借贷行为
|
||||
{FieldMapping: G26BJ05FieldMapping, ApiID: "G26BJ05"}, // 特殊名单
|
||||
{FieldMapping: G05HZ01FieldMapping, ApiID: "G05HZ01"}, // 股东人企关系
|
||||
{FieldMapping: G34BJ03FieldMapping, ApiID: "G34BJ03"}, // 个人不良
|
||||
{FieldMapping: G35SC01FieldMapping, ApiID: "G35SC01"}, // 个人涉诉
|
||||
},
|
||||
"preloanbackgroundcheck": {
|
||||
{FieldMapping: G09SC02FieldMapping, ApiID: "G09SC02"}, // 单人婚姻
|
||||
{FieldMapping: G27BJ05FieldMapping, ApiID: "G27BJ05"}, // 借贷意向
|
||||
{FieldMapping: G28BJ05FieldMapping, ApiID: "G28BJ05"}, // 借贷行为
|
||||
{FieldMapping: G26BJ05FieldMapping, ApiID: "G26BJ05"}, // 特殊名单
|
||||
{FieldMapping: G05HZ01FieldMapping, ApiID: "G05HZ01"}, // 股东人企关系
|
||||
{FieldMapping: G34BJ03FieldMapping, ApiID: "G34BJ03"}, // 个人不良
|
||||
{FieldMapping: G35SC01FieldMapping, ApiID: "G35SC01"}, // 个人涉诉
|
||||
},
|
||||
"rentalinfo": {
|
||||
{FieldMapping: G09SC02FieldMapping, ApiID: "G09SC02"}, // 单人婚姻
|
||||
{FieldMapping: G27BJ05FieldMapping, ApiID: "G27BJ05"}, // 借贷意向
|
||||
{FieldMapping: G28BJ05FieldMapping, ApiID: "G28BJ05"}, // 借贷行为
|
||||
{FieldMapping: G26BJ05FieldMapping, ApiID: "G26BJ05"}, // 特殊名单
|
||||
{FieldMapping: G05HZ01FieldMapping, ApiID: "G05HZ01"}, // 股东人企关系
|
||||
{FieldMapping: G34BJ03FieldMapping, ApiID: "G34BJ03"}, // 个人不良
|
||||
{FieldMapping: G35SC01FieldMapping, ApiID: "G35SC01"}, // 个人涉诉
|
||||
},
|
||||
"riskassessment": {
|
||||
{FieldMapping: G09SC02FieldMapping, ApiID: "G09SC02"}, // 单人婚姻
|
||||
{FieldMapping: G27BJ05FieldMapping, ApiID: "G27BJ05"}, // 借贷意向
|
||||
{FieldMapping: G28BJ05FieldMapping, ApiID: "G28BJ05"}, // 借贷行为
|
||||
{FieldMapping: G26BJ05FieldMapping, ApiID: "G26BJ05"}, // 特殊名单
|
||||
{FieldMapping: G05HZ01FieldMapping, ApiID: "G05HZ01"}, // 股东人企关系
|
||||
{FieldMapping: G34BJ03FieldMapping, ApiID: "G34BJ03"}, // 个人不良
|
||||
{FieldMapping: G35SC01FieldMapping, ApiID: "G35SC01"}, // 个人涉诉
|
||||
},
|
||||
// RiskAssessment 查询请求结构
|
||||
type RiskAssessmentReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
// CompanyInfo 查询请求结构
|
||||
type CompanyInfoReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
// RentalInfo 查询请求结构
|
||||
type RentalInfoReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
// PreLoanBackgroundCheck 查询请求结构
|
||||
type PreLoanBackgroundCheckReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
// BackgroundCheck 查询请求结构
|
||||
type BackgroundCheckReq struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
type EntLawsuitReq struct {
|
||||
EntName string `json:"ent_name" validate:"required,name"`
|
||||
EntCode string `json:"ent_code" validate:"required,USCI"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
type TocPhoneThreeElements struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
type TocPhoneTwoElements struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
type TocIDCardTwoElements struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
}
|
||||
type TocDualMarriage struct {
|
||||
NameMan string `json:"name_man" validate:"required,name"`
|
||||
IDCardMan string `json:"id_card_man" validate:"required,idCard"`
|
||||
NameWoman string `json:"name_woman" validate:"required,name"`
|
||||
IDCardWoman string `json:"id_card_woman" validate:"required,idCard"`
|
||||
}
|
||||
type TocPersonVehicleVerification struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
CarType string `json:"car_type" validate:"required"`
|
||||
CarLicense string `json:"car_license" validate:"required"`
|
||||
}
|
||||
type TocCarVin struct {
|
||||
VinCode string `json:"vin_code" validate:"required"`
|
||||
}
|
||||
type TocCarVinDrivingPermit struct {
|
||||
VinCode string `json:"vin_code" validate:"required"`
|
||||
CarDrivingPermit string `json:"car_driving_permit" validate:"required"`
|
||||
}
|
||||
type TocCarVinLicense struct {
|
||||
VinCode string `json:"vin_code" validate:"required"`
|
||||
CarLicense string `json:"car_license" validate:"required"`
|
||||
}
|
||||
|
||||
// 银行卡黑名单
|
||||
type TocBankCardBlacklist struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
}
|
||||
|
||||
// 手机号码风险
|
||||
type TocPhoneNumberRisk struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
// 手机二次卡
|
||||
type TocPhoneSecondaryCard struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
StartDate string `json:"start_date" validate:"required"`
|
||||
}
|
||||
|
||||
// 出境限制查询
|
||||
type TocExitRestriction struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
}
|
||||
|
||||
// 手机月消费档次查询
|
||||
type TocMonthlyMobileConsumptionLevel struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
// 学历信息验证
|
||||
type TocEducationVerification struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
CertificateNumber string `json:"certificate_number" validate:"required"`
|
||||
}
|
||||
|
||||
// 反诈反赌风险核验
|
||||
type TocFraudGamblingCheck struct {
|
||||
Mobile string `json:"mobile,omitempty" validate:"omitempty,mobile"`
|
||||
BankCard string `json:"bank_card,omitempty" validate:"omitempty,bankCard"`
|
||||
IDCard string `json:"id_card,omitempty" validate:"omitempty,idCard"`
|
||||
}
|
||||
|
||||
// 手机号反赌反诈风险查询
|
||||
type TocMobileDrugFraudRiskCheck struct {
|
||||
Mobile string `json:"mobile,omitempty" validate:"omitempty,mobile"`
|
||||
BankCard string `json:"bank_card,omitempty" validate:"omitempty,bankCard"`
|
||||
IDCard string `json:"id_card,omitempty" validate:"omitempty,idCard"`
|
||||
}
|
||||
|
||||
// 手机号空号检测
|
||||
type TocMobileNumberValidation struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
// 银行卡归属地查询
|
||||
type TocBankCardLocation struct {
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
}
|
||||
|
||||
// 银行卡姓名二要素验证
|
||||
type TocBankCardNameElementVerification struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
}
|
||||
|
||||
// 银行卡号码二要素验证
|
||||
type TocBankCardIDElementVerification struct {
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
}
|
||||
|
||||
// 银行卡三要素综合验证
|
||||
type TocBankCardThreeElementsVerification struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
BankCard string `json:"bank_card" validate:"required"`
|
||||
}
|
||||
|
||||
// 高风险特殊手机号
|
||||
type TocMobileRiskAssessment struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
// 手机归属地
|
||||
type TocMobileLocation struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
// 身份证归属地
|
||||
type TocIDCardLocation struct {
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
}
|
||||
|
||||
// 偿贷压力
|
||||
type TocDebtRepayStress struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
// 学历信息查询
|
||||
type TocEducationInfo struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
}
|
||||
|
||||
// 人企关系加强版
|
||||
type TocPersonEnterprisePro struct {
|
||||
Name string `json:"name" validate:"required,name"`
|
||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
}
|
||||
|
||||
@@ -1,457 +1,9 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type AdminCreateFeatureReq struct {
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
}
|
||||
|
||||
type AdminCreateFeatureResp struct {
|
||||
Id int64 `json:"id"` // 功能ID
|
||||
}
|
||||
|
||||
type AdminCreateNotificationReq struct {
|
||||
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-禁用
|
||||
}
|
||||
|
||||
type AdminCreateNotificationResp struct {
|
||||
Id int64 `json:"id"` // 通知ID
|
||||
}
|
||||
|
||||
type AdminCreateOrderReq struct {
|
||||
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-是
|
||||
}
|
||||
|
||||
type AdminCreateOrderResp struct {
|
||||
Id int64 `json:"id"` // 订单ID
|
||||
}
|
||||
|
||||
type AdminCreatePlatformUserReq struct {
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Password string `json:"password"` // 密码
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
}
|
||||
|
||||
type AdminCreatePlatformUserResp struct {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminCreateProductReq struct {
|
||||
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"` // 售价
|
||||
}
|
||||
|
||||
type AdminCreateProductResp struct {
|
||||
Id int64 `json:"id"` // 产品ID
|
||||
}
|
||||
|
||||
type AdminCreateUserReq struct {
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status,default=1"` // 状态:0-禁用,1-启用
|
||||
RoleIds []int64 `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
type AdminCreateUserResp struct {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminDeleteFeatureReq struct {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
}
|
||||
|
||||
type AdminDeleteFeatureResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminDeleteNotificationReq struct {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
}
|
||||
|
||||
type AdminDeleteNotificationResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminDeleteOrderReq struct {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
}
|
||||
|
||||
type AdminDeleteOrderResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminDeletePlatformUserReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminDeletePlatformUserResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminDeleteProductReq struct {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
}
|
||||
|
||||
type AdminDeleteProductResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminDeleteUserReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminDeleteUserResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminGetFeatureDetailReq struct {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
}
|
||||
|
||||
type AdminGetFeatureDetailResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetFeatureListReq struct {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
ApiId *string `form:"api_id,optional"` // API标识
|
||||
Name *string `form:"name,optional"` // 描述
|
||||
}
|
||||
|
||||
type AdminGetFeatureListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []FeatureListItem `json:"items"` // 列表数据
|
||||
}
|
||||
|
||||
type AdminGetNotificationDetailReq struct {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
}
|
||||
|
||||
type AdminGetNotificationDetailResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetNotificationListReq struct {
|
||||
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"` // 结束日期范围(可选)
|
||||
}
|
||||
|
||||
type AdminGetNotificationListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []NotificationListItem `json:"items"` // 列表数据
|
||||
}
|
||||
|
||||
type AdminGetOrderDetailReq struct {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
}
|
||||
|
||||
type AdminGetOrderDetailResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetOrderListReq struct {
|
||||
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"` // 退款时间结束
|
||||
}
|
||||
|
||||
type AdminGetOrderListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []OrderListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type AdminGetPlatformUserDetailReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminGetPlatformUserDetailResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetPlatformUserListReq struct {
|
||||
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"` // 排序类型
|
||||
}
|
||||
|
||||
type AdminGetPlatformUserListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []PlatformUserListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type AdminGetProductDetailReq struct {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
}
|
||||
|
||||
type AdminGetProductDetailResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetProductFeatureListReq struct {
|
||||
ProductId int64 `path:"product_id"` // 产品ID
|
||||
}
|
||||
|
||||
type AdminGetProductFeatureListResp struct {
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminGetProductListReq struct {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
ProductName *string `form:"product_name,optional"` // 服务名
|
||||
ProductEn *string `form:"product_en,optional"` // 英文名
|
||||
}
|
||||
|
||||
type AdminGetProductListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []ProductListItem `json:"items"` // 列表数据
|
||||
}
|
||||
|
||||
type AdminGetUserDetailReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
type AdminGetUserDetailResp struct {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
RoleIds []int64 `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
type AdminGetUserListReq struct {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Username string `form:"username,optional"` // 用户名
|
||||
RealName string `form:"real_name,optional"` // 真实姓名
|
||||
Status int64 `form:"status,optional,default=-1"` // 状态:0-禁用,1-启用
|
||||
}
|
||||
|
||||
type AdminGetUserListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []AdminUserListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type AdminLoginReq struct {
|
||||
Username string `json:"username" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Captcha bool `json:"captcha" validate:"required"`
|
||||
}
|
||||
|
||||
type AdminLoginResp struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
AccessExpire int64 `json:"access_expire"`
|
||||
RefreshAfter int64 `json:"refresh_after"`
|
||||
Roles []string `json:"roles"`
|
||||
}
|
||||
|
||||
type AdminRefundOrderReq struct {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
RefundAmount float64 `json:"refund_amount"` // 退款金额
|
||||
RefundReason string `json:"refund_reason"` // 退款原因
|
||||
}
|
||||
|
||||
type AdminRefundOrderResp struct {
|
||||
Status string `json:"status"` // 退款状态
|
||||
RefundNo string `json:"refund_no"` // 退款单号
|
||||
Amount float64 `json:"amount"` // 退款金额
|
||||
}
|
||||
|
||||
type AdminUpdateFeatureReq struct {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
ApiId *string `json:"api_id,optional"` // API标识
|
||||
Name *string `json:"name,optional"` // 描述
|
||||
}
|
||||
|
||||
type AdminUpdateFeatureResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminUpdateNotificationReq struct {
|
||||
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"` // 状态
|
||||
}
|
||||
|
||||
type AdminUpdateNotificationResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminUpdateOrderReq struct {
|
||||
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-是
|
||||
}
|
||||
|
||||
type AdminUpdateOrderResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminUpdatePlatformUserReq struct {
|
||||
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-否
|
||||
}
|
||||
|
||||
type AdminUpdatePlatformUserResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminUpdateProductFeaturesReq struct {
|
||||
ProductId int64 `path:"product_id"` // 产品ID
|
||||
Features []ProductFeatureItem `json:"features"` // 功能列表
|
||||
}
|
||||
|
||||
type AdminUpdateProductFeaturesResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminUpdateProductReq struct {
|
||||
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"` // 售价
|
||||
}
|
||||
|
||||
type AdminUpdateProductResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminUpdateUserReq struct {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
Username *string `json:"username,optional"` // 用户名
|
||||
RealName *string `json:"real_name,optional"` // 真实姓名
|
||||
Status *int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
RoleIds []int64 `json:"role_ids,optional"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
type AdminUpdateUserResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type AdminUserInfoReq struct {
|
||||
}
|
||||
|
||||
type AdminUserInfoResp struct {
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Roles []string `json:"roles"` // 角色编码列表
|
||||
type AdminQueryItem struct {
|
||||
Feature interface{} `json:"feature"`
|
||||
Data interface{} `json:"data"` // 这里可以是 map 或 具体的 struct
|
||||
}
|
||||
|
||||
type AdminUserListItem struct {
|
||||
@@ -463,68 +15,6 @@ type AdminUserListItem struct {
|
||||
RoleIds []int64 `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
type CreateMenuReq struct {
|
||||
Pid int64 `json:"pid,optional"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path,optional"` // 路由路径
|
||||
Component string `json:"component,optional"` // 组件路径
|
||||
Redirect string `json:"redirect,optional"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status,optional,default=1"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort,optional"` // 排序
|
||||
}
|
||||
|
||||
type CreateMenuResp struct {
|
||||
Id int64 `json:"id"` // 菜单ID
|
||||
}
|
||||
|
||||
type CreatePromotionLinkReq struct {
|
||||
Name string `json:"name"` // 链接名称
|
||||
}
|
||||
|
||||
type CreatePromotionLinkResp struct {
|
||||
Id int64 `json:"id"` // 链接ID
|
||||
Url string `json:"url"` // 生成的推广链接URL
|
||||
}
|
||||
|
||||
type CreateRoleReq struct {
|
||||
RoleName string `json:"role_name"` // 角色名称
|
||||
RoleCode string `json:"role_code"` // 角色编码
|
||||
Description string `json:"description"` // 角色描述
|
||||
Status int64 `json:"status,default=1"` // 状态:0-禁用,1-启用
|
||||
Sort int64 `json:"sort,default=0"` // 排序
|
||||
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
type CreateRoleResp struct {
|
||||
Id int64 `json:"id"` // 角色ID
|
||||
}
|
||||
|
||||
type DeleteMenuReq struct {
|
||||
Id int64 `path:"id"` // 菜单ID
|
||||
}
|
||||
|
||||
type DeleteMenuResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type DeletePromotionLinkReq struct {
|
||||
Id int64 `path:"id"` // 链接ID
|
||||
}
|
||||
|
||||
type DeletePromotionLinkResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type DeleteRoleReq struct {
|
||||
Id int64 `path:"id"` // 角色ID
|
||||
}
|
||||
|
||||
type DeleteRoleResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type Feature struct {
|
||||
ID int64 `json:"id"` // 功能ID
|
||||
ApiID string `json:"api_id"` // API标识
|
||||
@@ -539,182 +29,6 @@ type FeatureListItem struct {
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
type GetMenuAllReq struct {
|
||||
}
|
||||
|
||||
type GetMenuAllResp struct {
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
Redirect string `json:"redirect,omitempty"`
|
||||
Component string `json:"component,omitempty"`
|
||||
Sort int64 `json:"sort"`
|
||||
Meta map[string]interface{} `json:"meta"`
|
||||
Children []GetMenuAllResp `json:"children"`
|
||||
}
|
||||
|
||||
type GetMenuDetailReq struct {
|
||||
Id int64 `path:"id"` // 菜单ID
|
||||
}
|
||||
|
||||
type GetMenuDetailResp struct {
|
||||
Id int64 `json:"id"` // 菜单ID
|
||||
Pid int64 `json:"pid"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path"` // 路由路径
|
||||
Component string `json:"component"` // 组件路径
|
||||
Redirect string `json:"redirect"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
UpdateTime string `json:"updateTime"` // 更新时间
|
||||
}
|
||||
|
||||
type GetMenuListReq struct {
|
||||
Name string `form:"name,optional"` // 菜单名称
|
||||
Path string `form:"path,optional"` // 路由路径
|
||||
Status int64 `form:"status,optional,default=-1"` // 状态:0-禁用,1-启用
|
||||
Type string `form:"type,optional"` // 类型
|
||||
}
|
||||
|
||||
type GetNotificationsResp struct {
|
||||
Notifications []Notification `json:"notifications"` // 通知列表
|
||||
Total int64 `json:"total"` // 总记录数
|
||||
}
|
||||
|
||||
type GetProductByEnRequest struct {
|
||||
ProductEn string `path:"product_en"`
|
||||
}
|
||||
|
||||
type GetProductByIDRequest struct {
|
||||
Id int64 `path:"id"`
|
||||
}
|
||||
|
||||
type GetProductRenderListRequest struct {
|
||||
Module string `path:"module"`
|
||||
}
|
||||
|
||||
type GetProductRenderListResponse struct {
|
||||
Product []Product
|
||||
}
|
||||
|
||||
type GetPromotionLinkDetailReq struct {
|
||||
Id int64 `path:"id"` // 链接ID
|
||||
}
|
||||
|
||||
type GetPromotionLinkDetailResp struct {
|
||||
Name string `json:"name"` // 链接名称
|
||||
Url string `json:"url"` // 推广链接URL
|
||||
ClickCount int64 `json:"click_count"` // 点击数
|
||||
PayCount int64 `json:"pay_count"` // 付费次数
|
||||
PayAmount string `json:"pay_amount"` // 付费金额
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
LastClickTime string `json:"last_click_time,optional"` // 最后点击时间
|
||||
LastPayTime string `json:"last_pay_time,optional"` // 最后付费时间
|
||||
}
|
||||
|
||||
type GetPromotionLinkListReq struct {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Name string `form:"name,optional"` // 链接名称
|
||||
Url string `form:"url,optional"` // 推广链接URL
|
||||
}
|
||||
|
||||
type GetPromotionLinkListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []PromotionLinkItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type GetPromotionStatsHistoryReq struct {
|
||||
StartDate string `form:"start_date"` // 开始日期,格式:YYYY-MM-DD
|
||||
EndDate string `form:"end_date"` // 结束日期,格式:YYYY-MM-DD
|
||||
}
|
||||
|
||||
type GetPromotionStatsTotalReq struct {
|
||||
}
|
||||
|
||||
type GetPromotionStatsTotalResp struct {
|
||||
TodayPayAmount float64 `json:"today_pay_amount"` // 今日金额
|
||||
TodayClickCount int64 `json:"today_click_count"` // 今日点击数
|
||||
TodayPayCount int64 `json:"today_pay_count"` // 今日付费次数
|
||||
TotalPayAmount float64 `json:"total_pay_amount"` // 总金额
|
||||
TotalClickCount int64 `json:"total_click_count"` // 总点击数
|
||||
TotalPayCount int64 `json:"total_pay_count"` // 总付费次数
|
||||
}
|
||||
|
||||
type GetRoleDetailReq struct {
|
||||
Id int64 `path:"id"` // 角色ID
|
||||
}
|
||||
|
||||
type GetRoleDetailResp struct {
|
||||
Id int64 `json:"id"` // 角色ID
|
||||
RoleName string `json:"role_name"` // 角色名称
|
||||
RoleCode string `json:"role_code"` // 角色编码
|
||||
Description string `json:"description"` // 角色描述
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
type GetRoleListReq struct {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Name string `form:"name,optional"` // 角色名称
|
||||
Code string `form:"code,optional"` // 角色编码
|
||||
Status int64 `form:"status,optional,default=-1"` // 状态:0-禁用,1-启用
|
||||
}
|
||||
|
||||
type GetRoleListResp struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []RoleListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type IapCallbackReq struct {
|
||||
OrderID int64 `json:"order_id" validate:"required"`
|
||||
TransactionReceipt string `json:"transaction_receipt" validate:"required"`
|
||||
}
|
||||
|
||||
type MenuListItem struct {
|
||||
Id int64 `json:"id"` // 菜单ID
|
||||
Pid int64 `json:"pid"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path"` // 路由路径
|
||||
Component string `json:"component"` // 组件路径
|
||||
Redirect string `json:"redirect"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
Children []MenuListItem `json:"children"` // 子菜单
|
||||
}
|
||||
|
||||
type MobileCodeLoginReq struct {
|
||||
Mobile string `json:"mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
type MobileCodeLoginResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type MobileLoginReq struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
}
|
||||
|
||||
type MobileLoginResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type Notification struct {
|
||||
Title string `json:"title"` // 通知标题
|
||||
Content string `json:"content"` // 通知内容 (富文本)
|
||||
@@ -748,23 +62,13 @@ type OrderListItem struct {
|
||||
PaymentScene string `json:"payment_scene"` // 支付平台
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
Status string `json:"status"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
QueryState string `json:"query_state"` // 查询状态:pending-待查询,success-查询成功,failed-查询失败 processing-查询中
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
PayTime string `json:"pay_time"` // 支付时间
|
||||
RefundTime string `json:"refund_time"` // 退款时间
|
||||
IsPromotion int64 `json:"is_promotion"` // 是否推广订单:0-否,1-是
|
||||
}
|
||||
|
||||
type PaymentReq struct {
|
||||
Id string `json:"id"`
|
||||
PayMethod string `json:"pay_method"`
|
||||
}
|
||||
|
||||
type PaymentResp struct {
|
||||
PrepayData interface{} `json:"prepay_data"`
|
||||
PrepayId string `json:"prepay_id"`
|
||||
OrderID int64 `json:"order_id"`
|
||||
}
|
||||
|
||||
type PlatformUserListItem struct {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
@@ -803,10 +107,6 @@ type ProductListItem struct {
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
type ProductResponse struct {
|
||||
Product
|
||||
}
|
||||
|
||||
type PromotionLinkItem struct {
|
||||
Id int64 `json:"id"` // 链接ID
|
||||
Name string `json:"name"` // 链接名称
|
||||
@@ -819,15 +119,6 @@ type PromotionLinkItem struct {
|
||||
LastPayTime string `json:"last_pay_time,optional"` // 最后付费时间
|
||||
}
|
||||
|
||||
type PromotionStatsHistoryItem struct {
|
||||
Id int64 `json:"id"` // 记录ID
|
||||
LinkId int64 `json:"link_id"` // 链接ID
|
||||
PayAmount float64 `json:"pay_amount"` // 金额
|
||||
ClickCount int64 `json:"click_count"` // 点击数
|
||||
PayCount int64 `json:"pay_count"` // 付费次数
|
||||
StatsDate string `json:"stats_date"` // 统计日期
|
||||
}
|
||||
|
||||
type Query struct {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
@@ -840,62 +131,11 @@ type Query struct {
|
||||
QueryState string `json:"query_state"` // 查询状态
|
||||
}
|
||||
|
||||
type QueryDetailByOrderIdReq struct {
|
||||
OrderId int64 `path:"order_id"`
|
||||
}
|
||||
|
||||
type QueryDetailByOrderIdResp struct {
|
||||
Query
|
||||
}
|
||||
|
||||
type QueryDetailByOrderNoReq struct {
|
||||
OrderNo string `path:"order_no"`
|
||||
}
|
||||
|
||||
type QueryDetailByOrderNoResp struct {
|
||||
Query
|
||||
}
|
||||
|
||||
type QueryDetailReq struct {
|
||||
Id int64 `path:"id"`
|
||||
}
|
||||
|
||||
type QueryDetailResp struct {
|
||||
Query
|
||||
}
|
||||
|
||||
type QueryExampleReq struct {
|
||||
Feature string `form:"feature"`
|
||||
}
|
||||
|
||||
type QueryExampleResp struct {
|
||||
Query
|
||||
}
|
||||
|
||||
type QueryItem struct {
|
||||
Feature interface{} `json:"feature"`
|
||||
Data interface{} `json:"data"` // 这里可以是 map 或 具体的 struct
|
||||
}
|
||||
|
||||
type QueryListReq struct {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"page_size"` // 每页数据量
|
||||
}
|
||||
|
||||
type QueryListResp struct {
|
||||
Total int64 `json:"total"` // 总记录数
|
||||
List []Query `json:"list"` // 查询列表
|
||||
}
|
||||
|
||||
type QueryProvisionalOrderReq struct {
|
||||
Id string `path:"id"`
|
||||
}
|
||||
|
||||
type QueryProvisionalOrderResp struct {
|
||||
QueryParams map[string]interface{} `json:"query_params"`
|
||||
Product Product `json:"product"`
|
||||
}
|
||||
|
||||
type QueryReq struct {
|
||||
Data string `json:"data" validate:"required"`
|
||||
}
|
||||
@@ -904,52 +144,6 @@ type QueryResp struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
type QueryRetryReq struct {
|
||||
Id int64 `path:"id"`
|
||||
}
|
||||
|
||||
type QueryRetryResp struct {
|
||||
}
|
||||
|
||||
type QueryServiceReq struct {
|
||||
Product string `path:"product"`
|
||||
Data string `json:"data" validate:"required"`
|
||||
}
|
||||
|
||||
type QueryServiceResp struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
type QuerySingleTestReq struct {
|
||||
Params map[string]interface{} `json:"params"`
|
||||
Api string `json:"api"`
|
||||
}
|
||||
|
||||
type QuerySingleTestResp struct {
|
||||
Data interface{} `json:"data"`
|
||||
Api string `json:"api"`
|
||||
}
|
||||
|
||||
type RecordLinkClickReq struct {
|
||||
Path string `path:"path"` // 链接路径
|
||||
}
|
||||
|
||||
type RecordLinkClickResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type RegisterReq struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Password string `json:"password" validate:"required,min=11,max=11,password"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
type RegisterResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type RoleListItem struct {
|
||||
Id int64 `json:"id"` // 角色ID
|
||||
RoleName string `json:"role_name"` // 角色名称
|
||||
@@ -961,87 +155,8 @@ type RoleListItem struct {
|
||||
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
type UpdateMenuReq struct {
|
||||
Id int64 `path:"id"` // 菜单ID
|
||||
Pid int64 `json:"pid,optional"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path,optional"` // 路由路径
|
||||
Component string `json:"component,optional"` // 组件路径
|
||||
Redirect string `json:"redirect,optional"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort,optional"` // 排序
|
||||
}
|
||||
|
||||
type UpdateMenuResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type UpdatePromotionLinkReq struct {
|
||||
Id int64 `path:"id"` // 链接ID
|
||||
Name *string `json:"name,optional"` // 链接名称
|
||||
}
|
||||
|
||||
type UpdatePromotionLinkResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type UpdateQueryDataReq struct {
|
||||
Id int64 `json:"id"` // 查询ID
|
||||
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
|
||||
}
|
||||
|
||||
type UpdateQueryDataResp struct {
|
||||
Id int64 `json:"id"`
|
||||
UpdatedAt string `json:"updated_at"` // 更新时间
|
||||
}
|
||||
|
||||
type UpdateRoleReq struct {
|
||||
Id int64 `path:"id"` // 角色ID
|
||||
RoleName *string `json:"role_name,optional"` // 角色名称
|
||||
RoleCode *string `json:"role_code,optional"` // 角色编码
|
||||
Description *string `json:"description,optional"` // 角色描述
|
||||
Status *int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
Sort *int64 `json:"sort,optional"` // 排序
|
||||
MenuIds []int64 `json:"menu_ids,optional"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
type UpdateRoleResp struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
type User struct {
|
||||
Id int64 `json:"id"`
|
||||
Mobile string `json:"mobile"`
|
||||
NickName string `json:"nickName"`
|
||||
}
|
||||
|
||||
type UserInfoResp struct {
|
||||
UserInfo User `json:"userInfo"`
|
||||
}
|
||||
|
||||
type WXH5AuthReq struct {
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
type WXH5AuthResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type WXMiniAuthReq struct {
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
type WXMiniAuthResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type SendSmsReq struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
ActionType string `json:"actionType" validate:"required,oneof=login register query"`
|
||||
}
|
||||
|
||||
60
app/main/api/internal/types/user.go
Normal file
60
app/main/api/internal/types/user.go
Normal file
@@ -0,0 +1,60 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type MobileCodeLoginReq struct {
|
||||
Mobile string `json:"mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
type MobileCodeLoginResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type MobileLoginReq struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
}
|
||||
|
||||
type MobileLoginResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type RegisterReq struct {
|
||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||
Password string `json:"password" validate:"required,min=11,max=11,password"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
type RegisterResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type UserInfoResp struct {
|
||||
UserInfo User `json:"userInfo"`
|
||||
}
|
||||
|
||||
type WXH5AuthReq struct {
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
type WXH5AuthResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
|
||||
type WXMiniAuthReq struct {
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
type WXMiniAuthResp struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
}
|
||||
Reference in New Issue
Block a user