Compare commits
11 Commits
175af3ffff
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dce52f2564 | |||
| 9629b92a33 | |||
| a258c360c2 | |||
| c72d0a7aa6 | |||
| 0068e1053c | |||
| a2ef7bc093 | |||
| de519d073b | |||
| f4b7e6e2df | |||
| 898339fd5d | |||
| 59d26ac08e | |||
| 8dc4cb19fc |
@@ -26,9 +26,9 @@ package [模块名]
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"hm-server/app/main/api/internal/svc"
|
"tydata-server/app/main/api/internal/svc"
|
||||||
"hm-server/app/main/api/internal/types"
|
"tydata-server/app/main/api/internal/types"
|
||||||
"hm-server/common/xerr"
|
"tydata-server/common/xerr"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
项目目录结构说明:
|
项目目录结构说明:
|
||||||
```
|
```
|
||||||
hm-server/ # 项目根目录
|
tydata-server/ # 项目根目录
|
||||||
├── app/ # 应用服务目录
|
├── app/ # 应用服务目录
|
||||||
│ └── user/ # 用户服务
|
│ └── user/ # 用户服务
|
||||||
│ ├── cmd/ # 服务启动入口
|
│ ├── cmd/ # 服务启动入口
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ info (
|
|||||||
@server(
|
@server(
|
||||||
prefix: /api/v1/admin/agent
|
prefix: /api/v1/admin/agent
|
||||||
group: admin_agent
|
group: admin_agent
|
||||||
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
// 代理分页查询
|
// 代理分页查询
|
||||||
|
|||||||
131
app/main/api/desc/admin/admin_api.api
Normal file
131
app/main/api/desc/admin/admin_api.api
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
syntax = "v1"
|
||||||
|
|
||||||
|
info(
|
||||||
|
title: "Admin API管理"
|
||||||
|
desc: "管理员API管理接口"
|
||||||
|
author: "team"
|
||||||
|
version: "v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
// API列表请求
|
||||||
|
AdminGetApiListReq {
|
||||||
|
Page int64 `form:"page,default=1"`
|
||||||
|
PageSize int64 `form:"page_size,default=20"`
|
||||||
|
ApiName string `form:"api_name,optional"`
|
||||||
|
Method string `form:"method,optional"`
|
||||||
|
Status int64 `form:"status,optional"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// API列表响应
|
||||||
|
AdminGetApiListResp {
|
||||||
|
Items []AdminApiInfo `json:"items"`
|
||||||
|
Total int64 `json:"total"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// API信息
|
||||||
|
AdminApiInfo {
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
ApiName string `json:"api_name"`
|
||||||
|
ApiCode string `json:"api_code"`
|
||||||
|
Method string `json:"method"`
|
||||||
|
Url string `json:"url"`
|
||||||
|
Status int64 `json:"status"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
CreateTime string `json:"create_time"`
|
||||||
|
UpdateTime string `json:"update_time"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// API详情请求
|
||||||
|
AdminGetApiDetailReq {
|
||||||
|
Id int64 `path:"id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// API详情响应
|
||||||
|
AdminGetApiDetailResp {
|
||||||
|
AdminApiInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建API请求
|
||||||
|
AdminCreateApiReq {
|
||||||
|
ApiName string `json:"api_name"`
|
||||||
|
ApiCode string `json:"api_code"`
|
||||||
|
Method string `json:"method"`
|
||||||
|
Url string `json:"url"`
|
||||||
|
Status int64 `json:"status,default=1"`
|
||||||
|
Description string `json:"description,optional"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建API响应
|
||||||
|
AdminCreateApiResp {
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新API请求
|
||||||
|
AdminUpdateApiReq {
|
||||||
|
Id int64 `path:"id"`
|
||||||
|
ApiName string `json:"api_name"`
|
||||||
|
ApiCode string `json:"api_code"`
|
||||||
|
Method string `json:"method"`
|
||||||
|
Url string `json:"url"`
|
||||||
|
Status int64 `json:"status"`
|
||||||
|
Description string `json:"description,optional"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新API响应
|
||||||
|
AdminUpdateApiResp {
|
||||||
|
Success bool `json:"success"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除API请求
|
||||||
|
AdminDeleteApiReq {
|
||||||
|
Id int64 `path:"id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除API响应
|
||||||
|
AdminDeleteApiResp {
|
||||||
|
Success bool `json:"success"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量更新API状态请求
|
||||||
|
AdminBatchUpdateApiStatusReq {
|
||||||
|
Ids []int64 `json:"ids"`
|
||||||
|
Status int64 `json:"status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量更新API状态响应
|
||||||
|
AdminBatchUpdateApiStatusResp {
|
||||||
|
Success bool `json:"success"`
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
@server (
|
||||||
|
prefix: api/v1
|
||||||
|
group: admin_api
|
||||||
|
middleware: AdminAuthInterceptor
|
||||||
|
)
|
||||||
|
service main {
|
||||||
|
// 获取API列表
|
||||||
|
@handler AdminGetApiList
|
||||||
|
get /admin/api/list (AdminGetApiListReq) returns (AdminGetApiListResp)
|
||||||
|
|
||||||
|
// 获取API详情
|
||||||
|
@handler AdminGetApiDetail
|
||||||
|
get /admin/api/detail/:id (AdminGetApiDetailReq) returns (AdminGetApiDetailResp)
|
||||||
|
|
||||||
|
// 创建API
|
||||||
|
@handler AdminCreateApi
|
||||||
|
post /admin/api/create (AdminCreateApiReq) returns (AdminCreateApiResp)
|
||||||
|
|
||||||
|
// 更新API
|
||||||
|
@handler AdminUpdateApi
|
||||||
|
put /admin/api/update/:id (AdminUpdateApiReq) returns (AdminUpdateApiResp)
|
||||||
|
|
||||||
|
// 删除API
|
||||||
|
@handler AdminDeleteApi
|
||||||
|
delete /admin/api/delete/:id (AdminDeleteApiReq) returns (AdminDeleteApiResp)
|
||||||
|
|
||||||
|
// 批量更新API状态
|
||||||
|
@handler AdminBatchUpdateApiStatus
|
||||||
|
put /admin/api/batch-update-status (AdminBatchUpdateApiStatusReq) returns (AdminBatchUpdateApiStatusResp)
|
||||||
|
}
|
||||||
@@ -7,9 +7,10 @@ info (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// 功能管理接口
|
// 功能管理接口
|
||||||
@server(
|
@server (
|
||||||
prefix: /api/v1/admin/feature
|
prefix: /api/v1/admin/feature
|
||||||
group: admin_feature
|
group: admin_feature
|
||||||
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
// 创建功能
|
// 创建功能
|
||||||
@@ -31,76 +32,97 @@ service main {
|
|||||||
// 获取功能详情
|
// 获取功能详情
|
||||||
@handler AdminGetFeatureDetail
|
@handler AdminGetFeatureDetail
|
||||||
get /detail/:id (AdminGetFeatureDetailReq) returns (AdminGetFeatureDetailResp)
|
get /detail/:id (AdminGetFeatureDetailReq) returns (AdminGetFeatureDetailResp)
|
||||||
|
|
||||||
|
// 配置功能示例数据
|
||||||
|
@handler AdminConfigFeatureExample
|
||||||
|
post /config-example (AdminConfigFeatureExampleReq) returns (AdminConfigFeatureExampleResp)
|
||||||
|
|
||||||
|
// 查看功能示例数据
|
||||||
|
@handler AdminGetFeatureExample
|
||||||
|
get /example/:feature_id (AdminGetFeatureExampleReq) returns (AdminGetFeatureExampleResp)
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
// 创建功能请求
|
// 创建功能请求
|
||||||
AdminCreateFeatureReq {
|
AdminCreateFeatureReq {
|
||||||
ApiId string `json:"api_id"` // API标识
|
ApiId string `json:"api_id"` // API标识
|
||||||
Name string `json:"name"` // 描述
|
Name string `json:"name"` // 描述
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建功能响应
|
// 创建功能响应
|
||||||
AdminCreateFeatureResp {
|
AdminCreateFeatureResp {
|
||||||
Id int64 `json:"id"` // 功能ID
|
Id int64 `json:"id"` // 功能ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新功能请求
|
// 更新功能请求
|
||||||
AdminUpdateFeatureReq {
|
AdminUpdateFeatureReq {
|
||||||
Id int64 `path:"id"` // 功能ID
|
Id int64 `path:"id"` // 功能ID
|
||||||
ApiId *string `json:"api_id,optional"` // API标识
|
ApiId *string `json:"api_id,optional"` // API标识
|
||||||
Name *string `json:"name,optional"` // 描述
|
Name *string `json:"name,optional"` // 描述
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新功能响应
|
// 更新功能响应
|
||||||
AdminUpdateFeatureResp {
|
AdminUpdateFeatureResp {
|
||||||
Success bool `json:"success"` // 是否成功
|
Success bool `json:"success"` // 是否成功
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除功能请求
|
// 删除功能请求
|
||||||
AdminDeleteFeatureReq {
|
AdminDeleteFeatureReq {
|
||||||
Id int64 `path:"id"` // 功能ID
|
Id int64 `path:"id"` // 功能ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除功能响应
|
// 删除功能响应
|
||||||
AdminDeleteFeatureResp {
|
AdminDeleteFeatureResp {
|
||||||
Success bool `json:"success"` // 是否成功
|
Success bool `json:"success"` // 是否成功
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取功能列表请求
|
// 获取功能列表请求
|
||||||
AdminGetFeatureListReq {
|
AdminGetFeatureListReq {
|
||||||
Page int64 `form:"page"` // 页码
|
Page int64 `form:"page"` // 页码
|
||||||
PageSize int64 `form:"pageSize"` // 每页数量
|
PageSize int64 `form:"pageSize"` // 每页数量
|
||||||
ApiId *string `form:"api_id,optional"` // API标识
|
ApiId *string `form:"api_id,optional"` // API标识
|
||||||
Name *string `form:"name,optional"` // 描述
|
Name *string `form:"name,optional"` // 描述
|
||||||
}
|
}
|
||||||
|
|
||||||
// 功能列表项
|
// 功能列表项
|
||||||
FeatureListItem {
|
FeatureListItem {
|
||||||
Id int64 `json:"id"` // 功能ID
|
Id int64 `json:"id"` // 功能ID
|
||||||
ApiId string `json:"api_id"` // API标识
|
ApiId string `json:"api_id"` // API标识
|
||||||
Name string `json:"name"` // 描述
|
Name string `json:"name"` // 描述
|
||||||
CreateTime string `json:"create_time"` // 创建时间
|
CreateTime string `json:"create_time"` // 创建时间
|
||||||
UpdateTime string `json:"update_time"` // 更新时间
|
UpdateTime string `json:"update_time"` // 更新时间
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取功能列表响应
|
// 获取功能列表响应
|
||||||
AdminGetFeatureListResp {
|
AdminGetFeatureListResp {
|
||||||
Total int64 `json:"total"` // 总数
|
Total int64 `json:"total"` // 总数
|
||||||
Items []FeatureListItem `json:"items"` // 列表数据
|
Items []FeatureListItem `json:"items"` // 列表数据
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取功能详情请求
|
// 获取功能详情请求
|
||||||
AdminGetFeatureDetailReq {
|
AdminGetFeatureDetailReq {
|
||||||
Id int64 `path:"id"` // 功能ID
|
Id int64 `path:"id"` // 功能ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取功能详情响应
|
// 获取功能详情响应
|
||||||
AdminGetFeatureDetailResp {
|
AdminGetFeatureDetailResp {
|
||||||
Id int64 `json:"id"` // 功能ID
|
Id int64 `json:"id"` // 功能ID
|
||||||
ApiId string `json:"api_id"` // API标识
|
ApiId string `json:"api_id"` // API标识
|
||||||
Name string `json:"name"` // 描述
|
Name string `json:"name"` // 描述
|
||||||
|
CreateTime string `json:"create_time"` // 创建时间
|
||||||
|
UpdateTime string `json:"update_time"` // 更新时间
|
||||||
|
}
|
||||||
|
// 配置功能示例数据请求
|
||||||
|
AdminConfigFeatureExampleReq {
|
||||||
|
FeatureId int64 `json:"feature_id"` // 功能ID
|
||||||
|
Data string `json:"data"` // 示例数据JSON
|
||||||
|
}
|
||||||
|
// 配置功能示例数据响应
|
||||||
|
AdminConfigFeatureExampleResp {
|
||||||
|
Success bool `json:"success"` // 是否成功
|
||||||
|
}
|
||||||
|
// 查看功能示例数据请求
|
||||||
|
AdminGetFeatureExampleReq {
|
||||||
|
FeatureId int64 `path:"feature_id"` // 功能ID
|
||||||
|
}
|
||||||
|
// 查看功能示例数据响应
|
||||||
|
AdminGetFeatureExampleResp {
|
||||||
|
Id int64 `json:"id"` // 示例数据ID
|
||||||
|
FeatureId int64 `json:"feature_id"` // 功能ID
|
||||||
|
ApiId string `json:"api_id"` // API标识
|
||||||
|
Data string `json:"data"` // 示例数据JSON
|
||||||
CreateTime string `json:"create_time"` // 创建时间
|
CreateTime string `json:"create_time"` // 创建时间
|
||||||
UpdateTime string `json:"update_time"` // 更新时间
|
UpdateTime string `json:"update_time"` // 更新时间
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ info (
|
|||||||
@server(
|
@server(
|
||||||
prefix: /api/v1/admin/product
|
prefix: /api/v1/admin/product
|
||||||
group: admin_product
|
group: admin_product
|
||||||
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
// 创建产品
|
// 创建产品
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ info (
|
|||||||
@server (
|
@server (
|
||||||
prefix: api/v1/admin/query
|
prefix: api/v1/admin/query
|
||||||
group: admin_query
|
group: admin_query
|
||||||
jwt: JwtAuth
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "获取查询详情"
|
@doc "获取查询详情"
|
||||||
|
|||||||
103
app/main/api/desc/admin/admin_role_api.api
Normal file
103
app/main/api/desc/admin/admin_role_api.api
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
syntax = "v1"
|
||||||
|
|
||||||
|
info(
|
||||||
|
title: "Admin 角色API权限管理"
|
||||||
|
desc: "管理员角色API权限管理接口"
|
||||||
|
author: "team"
|
||||||
|
version: "v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
// 获取角色API权限列表请求
|
||||||
|
AdminGetRoleApiListReq {
|
||||||
|
RoleId int64 `path:"role_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取角色API权限列表响应
|
||||||
|
AdminGetRoleApiListResp {
|
||||||
|
Items []AdminRoleApiInfo `json:"items"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 角色API权限信息
|
||||||
|
AdminRoleApiInfo {
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
RoleId int64 `json:"role_id"`
|
||||||
|
ApiId int64 `json:"api_id"`
|
||||||
|
ApiName string `json:"api_name"`
|
||||||
|
ApiCode string `json:"api_code"`
|
||||||
|
Method string `json:"method"`
|
||||||
|
Url string `json:"url"`
|
||||||
|
Status int64 `json:"status"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分配角色API权限请求
|
||||||
|
AdminAssignRoleApiReq {
|
||||||
|
RoleId int64 `json:"role_id"`
|
||||||
|
ApiIds []int64 `json:"api_ids"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分配角色API权限响应
|
||||||
|
AdminAssignRoleApiResp {
|
||||||
|
Success bool `json:"success"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 移除角色API权限请求
|
||||||
|
AdminRemoveRoleApiReq {
|
||||||
|
RoleId int64 `json:"role_id"`
|
||||||
|
ApiIds []int64 `json:"api_ids"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 移除角色API权限响应
|
||||||
|
AdminRemoveRoleApiResp {
|
||||||
|
Success bool `json:"success"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新角色API权限请求
|
||||||
|
AdminUpdateRoleApiReq {
|
||||||
|
RoleId int64 `json:"role_id"`
|
||||||
|
ApiIds []int64 `json:"api_ids"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新角色API权限响应
|
||||||
|
AdminUpdateRoleApiResp {
|
||||||
|
Success bool `json:"success"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所有API列表(用于权限分配)
|
||||||
|
AdminGetAllApiListReq {
|
||||||
|
Status int64 `form:"status,optional,default=1"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所有API列表响应
|
||||||
|
AdminGetAllApiListResp {
|
||||||
|
Items []AdminRoleApiInfo `json:"items"`
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
@server (
|
||||||
|
prefix: api/v1
|
||||||
|
group: admin_role_api
|
||||||
|
middleware: AdminAuthInterceptor
|
||||||
|
)
|
||||||
|
service main {
|
||||||
|
// 获取角色API权限列表
|
||||||
|
@handler AdminGetRoleApiList
|
||||||
|
get /admin/role/:role_id/api/list (AdminGetRoleApiListReq) returns (AdminGetRoleApiListResp)
|
||||||
|
|
||||||
|
// 分配角色API权限
|
||||||
|
@handler AdminAssignRoleApi
|
||||||
|
post /admin/role/api/assign (AdminAssignRoleApiReq) returns (AdminAssignRoleApiResp)
|
||||||
|
|
||||||
|
// 移除角色API权限
|
||||||
|
@handler AdminRemoveRoleApi
|
||||||
|
post /admin/role/api/remove (AdminRemoveRoleApiReq) returns (AdminRemoveRoleApiResp)
|
||||||
|
|
||||||
|
// 更新角色API权限
|
||||||
|
@handler AdminUpdateRoleApi
|
||||||
|
put /admin/role/api/update (AdminUpdateRoleApiReq) returns (AdminUpdateRoleApiResp)
|
||||||
|
|
||||||
|
// 获取所有API列表(用于权限分配)
|
||||||
|
@handler AdminGetAllApiList
|
||||||
|
get /admin/api/all (AdminGetAllApiListReq) returns (AdminGetAllApiListResp)
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ info (
|
|||||||
@server (
|
@server (
|
||||||
prefix: api/v1/admin/user
|
prefix: api/v1/admin/user
|
||||||
group: admin_user
|
group: admin_user
|
||||||
jwt: JwtAuth
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "获取用户列表"
|
@doc "获取用户列表"
|
||||||
@@ -35,6 +35,10 @@ service main {
|
|||||||
@doc "用户信息"
|
@doc "用户信息"
|
||||||
@handler AdminUserInfo
|
@handler AdminUserInfo
|
||||||
get /info (AdminUserInfoReq) returns (AdminUserInfoResp)
|
get /info (AdminUserInfoReq) returns (AdminUserInfoResp)
|
||||||
|
|
||||||
|
@doc "重置管理员密码"
|
||||||
|
@handler AdminResetPassword
|
||||||
|
put /reset-password/:id (AdminResetPasswordReq) returns (AdminResetPasswordResp)
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@@ -126,4 +130,15 @@ type (
|
|||||||
RealName string `json:"real_name"` // 真实姓名
|
RealName string `json:"real_name"` // 真实姓名
|
||||||
Roles []string `json:"roles"` // 角色编码列表
|
Roles []string `json:"roles"` // 角色编码列表
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重置密码请求
|
||||||
|
AdminResetPasswordReq {
|
||||||
|
Id int64 `path:"id"` // 用户ID
|
||||||
|
Password string `json:"password"` // 新密码
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重置密码响应
|
||||||
|
AdminResetPasswordResp {
|
||||||
|
Success bool `json:"success"` // 是否成功
|
||||||
|
}
|
||||||
)
|
)
|
||||||
@@ -9,7 +9,7 @@ info (
|
|||||||
@server (
|
@server (
|
||||||
prefix: api/v1/admin/menu
|
prefix: api/v1/admin/menu
|
||||||
group: admin_menu
|
group: admin_menu
|
||||||
jwt: JwtAuth
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "获取菜单列表"
|
@doc "获取菜单列表"
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ type (
|
|||||||
@server(
|
@server(
|
||||||
prefix: /api/v1/admin/notification
|
prefix: /api/v1/admin/notification
|
||||||
group: admin_notification
|
group: admin_notification
|
||||||
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
// 创建通知
|
// 创建通知
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ info (
|
|||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1/admin/order
|
prefix: api/v1/admin/order
|
||||||
group: admin_order
|
group: admin_order
|
||||||
jwt: JwtAuth
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "获取订单列表"
|
@doc "获取订单列表"
|
||||||
@@ -35,133 +35,139 @@ service main {
|
|||||||
@doc "订单退款"
|
@doc "订单退款"
|
||||||
@handler AdminRefundOrder
|
@handler AdminRefundOrder
|
||||||
post /refund/:id (AdminRefundOrderReq) returns (AdminRefundOrderResp)
|
post /refund/:id (AdminRefundOrderReq) returns (AdminRefundOrderResp)
|
||||||
|
|
||||||
|
@doc "重新执行代理处理"
|
||||||
|
@handler AdminRetryAgentProcess
|
||||||
|
post /retry-agent-process/:id (AdminRetryAgentProcessReq) returns (AdminRetryAgentProcessResp)
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
// 列表请求
|
// 列表请求
|
||||||
AdminGetOrderListReq {
|
AdminGetOrderListReq {
|
||||||
Page int64 `form:"page,default=1"` // 页码
|
Page int64 `form:"page,default=1"` // 页码
|
||||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||||
OrderNo string `form:"order_no,optional"` // 商户订单号
|
OrderNo string `form:"order_no,optional"` // 商户订单号
|
||||||
PlatformOrderId string `form:"platform_order_id,optional"` // 支付订单号
|
PlatformOrderId string `form:"platform_order_id,optional"` // 支付订单号
|
||||||
ProductName string `form:"product_name,optional"` // 产品名称
|
ProductName string `form:"product_name,optional"` // 产品名称
|
||||||
PaymentPlatform string `form:"payment_platform,optional"` // 支付方式
|
PaymentPlatform string `form:"payment_platform,optional"` // 支付方式
|
||||||
PaymentScene string `form:"payment_scene,optional"` // 支付平台
|
PaymentScene string `form:"payment_scene,optional"` // 支付平台
|
||||||
Amount float64 `form:"amount,optional"` // 金额
|
Amount float64 `form:"amount,optional"` // 金额
|
||||||
Status string `form:"status,optional"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
Status string `form:"status,optional"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||||
IsPromotion int64 `form:"is_promotion,optional,default=-1"` // 是否推广订单:0-否,1-是
|
IsPromotion int64 `form:"is_promotion,optional,default=-1"` // 是否推广订单:0-否,1-是
|
||||||
CreateTimeStart string `form:"create_time_start,optional"` // 创建时间开始
|
CreateTimeStart string `form:"create_time_start,optional"` // 创建时间开始
|
||||||
CreateTimeEnd string `form:"create_time_end,optional"` // 创建时间结束
|
CreateTimeEnd string `form:"create_time_end,optional"` // 创建时间结束
|
||||||
PayTimeStart string `form:"pay_time_start,optional"` // 支付时间开始
|
PayTimeStart string `form:"pay_time_start,optional"` // 支付时间开始
|
||||||
PayTimeEnd string `form:"pay_time_end,optional"` // 支付时间结束
|
PayTimeEnd string `form:"pay_time_end,optional"` // 支付时间结束
|
||||||
RefundTimeStart string `form:"refund_time_start,optional"` // 退款时间开始
|
RefundTimeStart string `form:"refund_time_start,optional"` // 退款时间开始
|
||||||
RefundTimeEnd string `form:"refund_time_end,optional"` // 退款时间结束
|
RefundTimeEnd string `form:"refund_time_end,optional"` // 退款时间结束
|
||||||
}
|
}
|
||||||
|
|
||||||
// 列表响应
|
// 列表响应
|
||||||
AdminGetOrderListResp {
|
AdminGetOrderListResp {
|
||||||
Total int64 `json:"total"` // 总数
|
Total int64 `json:"total"` // 总数
|
||||||
Items []OrderListItem `json:"items"` // 列表
|
Items []OrderListItem `json:"items"` // 列表
|
||||||
}
|
}
|
||||||
|
|
||||||
// 列表项
|
// 列表项
|
||||||
OrderListItem {
|
OrderListItem {
|
||||||
Id int64 `json:"id"` // 订单ID
|
Id int64 `json:"id"` // 订单ID
|
||||||
OrderNo string `json:"order_no"` // 商户订单号
|
OrderNo string `json:"order_no"` // 商户订单号
|
||||||
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
||||||
ProductName string `json:"product_name"` // 产品名称
|
ProductName string `json:"product_name"` // 产品名称
|
||||||
PaymentPlatform string `json:"payment_platform"` // 支付方式
|
PaymentPlatform string `json:"payment_platform"` // 支付方式
|
||||||
PaymentScene string `json:"payment_scene"` // 支付平台
|
PaymentScene string `json:"payment_scene"` // 支付平台
|
||||||
Amount float64 `json:"amount"` // 金额
|
Amount float64 `json:"amount"` // 金额
|
||||||
Status string `json:"status"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
Status string `json:"status"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||||
QueryState string `json:"query_state"` // 查询状态:pending-待查询,success-查询成功,failed-查询失败 processing-查询中
|
QueryState string `json:"query_state"` // 查询状态:pending-待查询,success-查询成功,failed-查询失败 processing-查询中
|
||||||
CreateTime string `json:"create_time"` // 创建时间
|
CreateTime string `json:"create_time"` // 创建时间
|
||||||
PayTime string `json:"pay_time"` // 支付时间
|
PayTime string `json:"pay_time"` // 支付时间
|
||||||
RefundTime string `json:"refund_time"` // 退款时间
|
RefundTime string `json:"refund_time"` // 退款时间
|
||||||
IsPromotion int64 `json:"is_promotion"` // 是否推广订单:0-否,1-是
|
IsPromotion int64 `json:"is_promotion"` // 是否推广订单:0-否,1-是
|
||||||
|
IsAgentOrder bool `json:"is_agent_order"` // 是否是代理订单
|
||||||
|
AgentProcessStatus string `json:"agent_process_status"` // 代理事务处理状态:not_agent-非代理订单,success-处理成功,failed-处理失败,pending-待处理
|
||||||
}
|
}
|
||||||
|
|
||||||
// 详情请求
|
// 详情请求
|
||||||
AdminGetOrderDetailReq {
|
AdminGetOrderDetailReq {
|
||||||
Id int64 `path:"id"` // 订单ID
|
Id int64 `path:"id"` // 订单ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// 详情响应
|
// 详情响应
|
||||||
AdminGetOrderDetailResp {
|
AdminGetOrderDetailResp {
|
||||||
Id int64 `json:"id"` // 订单ID
|
Id int64 `json:"id"` // 订单ID
|
||||||
OrderNo string `json:"order_no"` // 商户订单号
|
OrderNo string `json:"order_no"` // 商户订单号
|
||||||
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
||||||
ProductName string `json:"product_name"` // 产品名称
|
ProductName string `json:"product_name"` // 产品名称
|
||||||
PaymentPlatform string `json:"payment_platform"` // 支付方式
|
PaymentPlatform string `json:"payment_platform"` // 支付方式
|
||||||
PaymentScene string `json:"payment_scene"` // 支付平台
|
PaymentScene string `json:"payment_scene"` // 支付平台
|
||||||
Amount float64 `json:"amount"` // 金额
|
Amount float64 `json:"amount"` // 金额
|
||||||
Status string `json:"status"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
Status string `json:"status"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||||
QueryState string `json:"query_state"` // 查询状态:pending-待查询,success-查询成功,failed-查询失败 processing-查询中
|
QueryState string `json:"query_state"` // 查询状态:pending-待查询,success-查询成功,failed-查询失败 processing-查询中
|
||||||
CreateTime string `json:"create_time"` // 创建时间
|
CreateTime string `json:"create_time"` // 创建时间
|
||||||
PayTime string `json:"pay_time"` // 支付时间
|
PayTime string `json:"pay_time"` // 支付时间
|
||||||
RefundTime string `json:"refund_time"` // 退款时间
|
RefundTime string `json:"refund_time"` // 退款时间
|
||||||
IsPromotion int64 `json:"is_promotion"` // 是否推广订单:0-否,1-是
|
IsPromotion int64 `json:"is_promotion"` // 是否推广订单:0-否,1-是
|
||||||
UpdateTime string `json:"update_time"` // 更新时间
|
UpdateTime string `json:"update_time"` // 更新时间
|
||||||
|
IsAgentOrder bool `json:"is_agent_order"` // 是否是代理订单
|
||||||
|
AgentProcessStatus string `json:"agent_process_status"` // 代理事务处理状态:not_agent-非代理订单,success-处理成功,failed-处理失败,pending-待处理
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建请求
|
// 创建请求
|
||||||
AdminCreateOrderReq {
|
AdminCreateOrderReq {
|
||||||
OrderNo string `json:"order_no"` // 商户订单号
|
OrderNo string `json:"order_no"` // 商户订单号
|
||||||
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
||||||
ProductName string `json:"product_name"` // 产品名称
|
ProductName string `json:"product_name"` // 产品名称
|
||||||
PaymentPlatform string `json:"payment_platform"` // 支付方式
|
PaymentPlatform string `json:"payment_platform"` // 支付方式
|
||||||
PaymentScene string `json:"payment_scene"` // 支付平台
|
PaymentScene string `json:"payment_scene"` // 支付平台
|
||||||
Amount float64 `json:"amount"` // 金额
|
Amount float64 `json:"amount"` // 金额
|
||||||
Status string `json:"status,default=pending"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
Status string `json:"status,default=pending"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||||
IsPromotion int64 `json:"is_promotion,default=0"` // 是否推广订单:0-否,1-是
|
IsPromotion int64 `json:"is_promotion,default=0"` // 是否推广订单:0-否,1-是
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建响应
|
// 创建响应
|
||||||
AdminCreateOrderResp {
|
AdminCreateOrderResp {
|
||||||
Id int64 `json:"id"` // 订单ID
|
Id int64 `json:"id"` // 订单ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新请求
|
// 更新请求
|
||||||
AdminUpdateOrderReq {
|
AdminUpdateOrderReq {
|
||||||
Id int64 `path:"id"` // 订单ID
|
Id int64 `path:"id"` // 订单ID
|
||||||
OrderNo *string `json:"order_no,optional"` // 商户订单号
|
OrderNo *string `json:"order_no,optional"` // 商户订单号
|
||||||
PlatformOrderId *string `json:"platform_order_id,optional"` // 支付订单号
|
PlatformOrderId *string `json:"platform_order_id,optional"` // 支付订单号
|
||||||
ProductName *string `json:"product_name,optional"` // 产品名称
|
ProductName *string `json:"product_name,optional"` // 产品名称
|
||||||
PaymentPlatform *string `json:"payment_platform,optional"` // 支付方式
|
PaymentPlatform *string `json:"payment_platform,optional"` // 支付方式
|
||||||
PaymentScene *string `json:"payment_scene,optional"` // 支付平台
|
PaymentScene *string `json:"payment_scene,optional"` // 支付平台
|
||||||
Amount *float64 `json:"amount,optional"` // 金额
|
Amount *float64 `json:"amount,optional"` // 金额
|
||||||
Status *string `json:"status,optional"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
Status *string `json:"status,optional"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||||
PayTime *string `json:"pay_time,optional"` // 支付时间
|
PayTime *string `json:"pay_time,optional"` // 支付时间
|
||||||
RefundTime *string `json:"refund_time,optional"` // 退款时间
|
RefundTime *string `json:"refund_time,optional"` // 退款时间
|
||||||
IsPromotion *int64 `json:"is_promotion,optional"` // 是否推广订单:0-否,1-是
|
IsPromotion *int64 `json:"is_promotion,optional"` // 是否推广订单:0-否,1-是
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新响应
|
// 更新响应
|
||||||
AdminUpdateOrderResp {
|
AdminUpdateOrderResp {
|
||||||
Success bool `json:"success"` // 是否成功
|
Success bool `json:"success"` // 是否成功
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除请求
|
// 删除请求
|
||||||
AdminDeleteOrderReq {
|
AdminDeleteOrderReq {
|
||||||
Id int64 `path:"id"` // 订单ID
|
Id int64 `path:"id"` // 订单ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除响应
|
// 删除响应
|
||||||
AdminDeleteOrderResp {
|
AdminDeleteOrderResp {
|
||||||
Success bool `json:"success"` // 是否成功
|
Success bool `json:"success"` // 是否成功
|
||||||
}
|
}
|
||||||
|
|
||||||
// 退款请求
|
// 退款请求
|
||||||
AdminRefundOrderReq {
|
AdminRefundOrderReq {
|
||||||
Id int64 `path:"id"` // 订单ID
|
Id int64 `path:"id"` // 订单ID
|
||||||
RefundAmount float64 `json:"refund_amount"` // 退款金额
|
RefundAmount float64 `json:"refund_amount"` // 退款金额
|
||||||
RefundReason string `json:"refund_reason"` // 退款原因
|
RefundReason string `json:"refund_reason"` // 退款原因
|
||||||
}
|
}
|
||||||
|
|
||||||
// 退款响应
|
// 退款响应
|
||||||
AdminRefundOrderResp {
|
AdminRefundOrderResp {
|
||||||
Status string `json:"status"` // 退款状态
|
Status string `json:"status"` // 退款状态
|
||||||
RefundNo string `json:"refund_no"` // 退款单号
|
RefundNo string `json:"refund_no"` // 退款单号
|
||||||
Amount float64 `json:"amount"` // 退款金额
|
Amount float64 `json:"amount"` // 退款金额
|
||||||
|
}
|
||||||
|
// 重新执行代理处理请求
|
||||||
|
AdminRetryAgentProcessReq {
|
||||||
|
Id int64 `path:"id"` // 订单ID
|
||||||
|
}
|
||||||
|
// 重新执行代理处理响应
|
||||||
|
AdminRetryAgentProcessResp {
|
||||||
|
Status string `json:"status"` // 执行状态:success-成功,already_processed-已处理,failed-失败
|
||||||
|
Message string `json:"message"` // 执行结果消息
|
||||||
|
ProcessedAt string `json:"processed_at"` // 处理时间
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -10,7 +10,7 @@ info (
|
|||||||
@server(
|
@server(
|
||||||
prefix: /api/v1/admin/platform_user
|
prefix: /api/v1/admin/platform_user
|
||||||
group: admin_platform_user
|
group: admin_platform_user
|
||||||
jwt: JwtAuth
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
// 创建平台用户
|
// 创建平台用户
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ info (
|
|||||||
@server (
|
@server (
|
||||||
prefix: api/v1/admin/promotion/link
|
prefix: api/v1/admin/promotion/link
|
||||||
group: admin_promotion
|
group: admin_promotion
|
||||||
jwt: JwtAuth
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "获取推广链接列表"
|
@doc "获取推广链接列表"
|
||||||
@@ -115,6 +115,7 @@ type (
|
|||||||
@server (
|
@server (
|
||||||
prefix: api/v1/admin/promotion/link
|
prefix: api/v1/admin/promotion/link
|
||||||
group: admin_promotion
|
group: admin_promotion
|
||||||
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "记录链接点击"
|
@doc "记录链接点击"
|
||||||
@@ -136,7 +137,7 @@ type (
|
|||||||
@server (
|
@server (
|
||||||
prefix: api/v1/admin/promotion/stats
|
prefix: api/v1/admin/promotion/stats
|
||||||
group: admin_promotion
|
group: admin_promotion
|
||||||
jwt: JwtAuth
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "获取推广历史记录"
|
@doc "获取推广历史记录"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ info (
|
|||||||
@server (
|
@server (
|
||||||
prefix: api/v1/admin/role
|
prefix: api/v1/admin/role
|
||||||
group: admin_role
|
group: admin_role
|
||||||
jwt: JwtAuth
|
middleware: AdminAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "获取角色列表"
|
@doc "获取角色列表"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ info (
|
|||||||
desc: "代理服务接口"
|
desc: "代理服务接口"
|
||||||
version: "v1"
|
version: "v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1/agent
|
prefix: api/v1/agent
|
||||||
group: agent
|
group: agent
|
||||||
@@ -14,14 +15,42 @@ service main {
|
|||||||
@handler GetAgentPromotionQrcode
|
@handler GetAgentPromotionQrcode
|
||||||
get /promotion/qrcode (GetAgentPromotionQrcodeReq)
|
get /promotion/qrcode (GetAgentPromotionQrcodeReq)
|
||||||
|
|
||||||
|
// 获取会员开通信息
|
||||||
|
@handler GetMembershipInfo
|
||||||
|
get /membership/info returns (GetMembershipInfoResp)
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
GetAgentPromotionQrcodeReq{
|
GetAgentPromotionQrcodeReq {
|
||||||
QrcodeType string `form:"qrcode_type"`
|
QrcodeType string `form:"qrcode_type"`
|
||||||
QrcodeUrl string `form:"qrcode_url"`
|
QrcodeUrl string `form:"qrcode_url"`
|
||||||
|
}
|
||||||
|
// 会员配置信息
|
||||||
|
MembershipConfigInfo {
|
||||||
|
Id int64 `json:"id"` // 主键
|
||||||
|
LevelName string `json:"level_name"` // 会员级别名称
|
||||||
|
Price float64 `json:"price"` // 会员年费
|
||||||
|
ReportCommission float64 `json:"report_commission"` // 直推报告收益
|
||||||
|
LowerActivityReward float64 `json:"lower_activity_reward"` // 下级活跃奖励金额
|
||||||
|
NewActivityReward float64 `json:"new_activity_reward"` // 新增活跃奖励金额
|
||||||
|
LowerStandardCount int64 `json:"lower_standard_count"` // 活跃下级达标个数
|
||||||
|
NewLowerStandardCount int64 `json:"new_lower_standard_count"` // 新增活跃下级达标个数
|
||||||
|
LowerWithdrawRewardRatio float64 `json:"lower_withdraw_reward_ratio"` // 下级提现奖励比例
|
||||||
|
LowerConvertVipReward float64 `json:"lower_convert_vip_reward"` // 下级转化VIP奖励
|
||||||
|
LowerConvertSvipReward float64 `json:"lower_convert_svip_reward"` // 下级转化SVIP奖励
|
||||||
|
ExemptionAmount float64 `json:"exemption_amount"` // 免审核金额
|
||||||
|
PriceIncreaseMax float64 `json:"price_increase_max"` // 提价最高金额
|
||||||
|
PriceRatio float64 `json:"price_ratio"` // 提价区间收取比例
|
||||||
|
PriceIncreaseAmount float64 `json:"price_increase_amount"` // 在原本成本上加价的金额
|
||||||
|
}
|
||||||
|
// 获取会员开通信息响应
|
||||||
|
GetMembershipInfoResp {
|
||||||
|
NormalConfig MembershipConfigInfo `json:"normal_config"` // 普通代理配置
|
||||||
|
VipConfig MembershipConfigInfo `json:"vip_config"` // VIP会员配置
|
||||||
|
SvipConfig MembershipConfigInfo `json:"svip_config"` // SVIP会员配置
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// 代理服务基本类型定义
|
// 代理服务基本类型定义
|
||||||
type AgentProductConfig {
|
type AgentProductConfig {
|
||||||
ProductID int64 `json:"product_id"`
|
ProductID int64 `json:"product_id"`
|
||||||
@@ -49,6 +78,7 @@ type ProductConfig {
|
|||||||
PriceRangeMin float64 `json:"price_range_min"`
|
PriceRangeMin float64 `json:"price_range_min"`
|
||||||
PriceRangeMax float64 `json:"price_range_max"`
|
PriceRangeMax float64 `json:"price_range_max"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1/agent
|
prefix: api/v1/agent
|
||||||
group: agent
|
group: agent
|
||||||
@@ -62,10 +92,11 @@ service main {
|
|||||||
@handler GetAgentRevenueInfo
|
@handler GetAgentRevenueInfo
|
||||||
get /revenue (GetAgentRevenueInfoReq) returns (GetAgentRevenueInfoResp)
|
get /revenue (GetAgentRevenueInfoReq) returns (GetAgentRevenueInfoResp)
|
||||||
}
|
}
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1/agent
|
prefix: api/v1/agent
|
||||||
group: agent
|
group: agent
|
||||||
jwt: JwtAuth
|
jwt: JwtAuth
|
||||||
middleware: UserAuthInterceptor
|
middleware: UserAuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@@ -95,14 +126,14 @@ service main {
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
AgentInfoResp {
|
AgentInfoResp {
|
||||||
status int64 `json:"status"` // 0=待审核,1=审核通过,2=审核未通过,3=未申请
|
status int64 `json:"status"` // 0=待审核,1=审核通过,2=审核未通过,3=未申请
|
||||||
isAgent bool `json:"is_agent"`
|
isAgent bool `json:"is_agent"`
|
||||||
agentID int64 `json:"agent_id"`
|
agentID int64 `json:"agent_id"`
|
||||||
level string `json:"level"`
|
level string `json:"level"`
|
||||||
region string `json:"region"`
|
region string `json:"region"`
|
||||||
mobile string `json:"mobile"`
|
mobile string `json:"mobile"`
|
||||||
expiryTime string `json:"expiry_time"`
|
expiryTime string `json:"expiry_time"`
|
||||||
isRealName bool `json:"is_real_name"`
|
isRealName bool `json:"is_real_name"`
|
||||||
}
|
}
|
||||||
// 查询代理申请状态响应
|
// 查询代理申请状态响应
|
||||||
AgentAuditStatusResp {
|
AgentAuditStatusResp {
|
||||||
@@ -124,64 +155,63 @@ type (
|
|||||||
PageSize int64 `form:"page_size"` // 每页数据量
|
PageSize int64 `form:"page_size"` // 每页数据量
|
||||||
}
|
}
|
||||||
GetAgentSubordinateListResp {
|
GetAgentSubordinateListResp {
|
||||||
Total int64 `json:"total"` // 总记录数
|
Total int64 `json:"total"` // 总记录数
|
||||||
List []AgentSubordinateList `json:"list"` // 查询列表
|
List []AgentSubordinateList `json:"list"` // 查询列表
|
||||||
}
|
}
|
||||||
AgentSubordinateList {
|
AgentSubordinateList {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Mobile string `json:"mobile"`
|
Mobile string `json:"mobile"`
|
||||||
CreateTime string `json:"create_time"`
|
CreateTime string `json:"create_time"`
|
||||||
LevelName string `json:"level_name"`
|
LevelName string `json:"level_name"`
|
||||||
TotalOrders int64 `json:"total_orders"` // 总单量
|
TotalOrders int64 `json:"total_orders"` // 总单量
|
||||||
TotalEarnings float64 `json:"total_earnings"` // 总金额
|
TotalEarnings float64 `json:"total_earnings"` // 总金额
|
||||||
TotalContribution float64 `json:"total_contribution"` // 总贡献
|
TotalContribution float64 `json:"total_contribution"` // 总贡献
|
||||||
}
|
}
|
||||||
GetAgentSubordinateContributionDetailReq {
|
GetAgentSubordinateContributionDetailReq {
|
||||||
Page int64 `form:"page"` // 页码
|
Page int64 `form:"page"` // 页码
|
||||||
PageSize int64 `form:"page_size"` // 每页数据量
|
PageSize int64 `form:"page_size"` // 每页数据量
|
||||||
SubordinateID int64 `form:"subordinate_id"` // 下级ID
|
SubordinateID int64 `form:"subordinate_id"` // 下级ID
|
||||||
}
|
}
|
||||||
GetAgentSubordinateContributionDetailResp {
|
GetAgentSubordinateContributionDetailResp {
|
||||||
Mobile string `json:"mobile"`
|
Mobile string `json:"mobile"`
|
||||||
Total int64 `json:"total"` // 总记录数
|
Total int64 `json:"total"` // 总记录数
|
||||||
CreateTime string `json:"create_time"`
|
CreateTime string `json:"create_time"`
|
||||||
TotalEarnings float64 `json:"total_earnings"` // 总金额
|
TotalEarnings float64 `json:"total_earnings"` // 总金额
|
||||||
TotalContribution float64 `json:"total_contribution"` // 总贡献
|
TotalContribution float64 `json:"total_contribution"` // 总贡献
|
||||||
TotalOrders int64 `json:"total_orders"` // 总单量
|
TotalOrders int64 `json:"total_orders"` // 总单量
|
||||||
LevelName string `json:"level_name"` // 等级名称
|
LevelName string `json:"level_name"` // 等级名称
|
||||||
List []AgentSubordinateContributionDetail `json:"list"` // 查询列表
|
List []AgentSubordinateContributionDetail `json:"list"` // 查询列表
|
||||||
Stats AgentSubordinateContributionStats `json:"stats"` // 统计数据
|
Stats AgentSubordinateContributionStats `json:"stats"` // 统计数据
|
||||||
}
|
}
|
||||||
AgentSubordinateContributionDetail {
|
AgentSubordinateContributionDetail {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
CreateTime string `json:"create_time"`
|
CreateTime string `json:"create_time"`
|
||||||
Amount float64 `json:"amount"`
|
Amount float64 `json:"amount"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
}
|
}
|
||||||
AgentSubordinateContributionStats {
|
AgentSubordinateContributionStats {
|
||||||
CostCount int64 `json:"cost_count"` // 成本扣除次数
|
CostCount int64 `json:"cost_count"` // 成本扣除次数
|
||||||
CostAmount float64 `json:"cost_amount"` // 成本扣除总额
|
CostAmount float64 `json:"cost_amount"` // 成本扣除总额
|
||||||
PricingCount int64 `json:"pricing_count"` // 定价扣除次数
|
PricingCount int64 `json:"pricing_count"` // 定价扣除次数
|
||||||
PricingAmount float64 `json:"pricing_amount"` // 定价扣除总额
|
PricingAmount float64 `json:"pricing_amount"` // 定价扣除总额
|
||||||
DescendantPromotionCount int64 `json:"descendant_promotion_count"` // 下级推广次数
|
DescendantPromotionCount int64 `json:"descendant_promotion_count"` // 下级推广次数
|
||||||
DescendantPromotionAmount float64 `json:"descendant_promotion_amount"` // 下级推广总额
|
DescendantPromotionAmount float64 `json:"descendant_promotion_amount"` // 下级推广总额
|
||||||
DescendantUpgradeVipCount int64 `json:"descendant_upgrade_vip_count"` // 下级升级VIP次数
|
DescendantUpgradeVipCount int64 `json:"descendant_upgrade_vip_count"` // 下级升级VIP次数
|
||||||
DescendantUpgradeVipAmount float64 `json:"descendant_upgrade_vip_amount"` // 下级升级VIP总额
|
DescendantUpgradeVipAmount float64 `json:"descendant_upgrade_vip_amount"` // 下级升级VIP总额
|
||||||
DescendantUpgradeSvipCount int64 `json:"descendant_upgrade_svip_count"` // 下级升级SVIP次数
|
DescendantUpgradeSvipCount int64 `json:"descendant_upgrade_svip_count"` // 下级升级SVIP次数
|
||||||
DescendantUpgradeSvipAmount float64 `json:"descendant_upgrade_svip_amount"` // 下级升级SVIP总额
|
DescendantUpgradeSvipAmount float64 `json:"descendant_upgrade_svip_amount"` // 下级升级SVIP总额
|
||||||
DescendantStayActiveCount int64 `json:"descendant_stay_active_count"` // 下级保持活跃次数
|
DescendantStayActiveCount int64 `json:"descendant_stay_active_count"` // 下级保持活跃次数
|
||||||
DescendantStayActiveAmount float64 `json:"descendant_stay_active_amount"` // 下级保持活跃总额
|
DescendantStayActiveAmount float64 `json:"descendant_stay_active_amount"` // 下级保持活跃总额
|
||||||
DescendantNewActiveCount int64 `json:"descendant_new_active_count"` // 下级新增活跃次数
|
DescendantNewActiveCount int64 `json:"descendant_new_active_count"` // 下级新增活跃次数
|
||||||
DescendantNewActiveAmount float64 `json:"descendant_new_active_amount"` // 下级新增活跃总额
|
DescendantNewActiveAmount float64 `json:"descendant_new_active_amount"` // 下级新增活跃总额
|
||||||
DescendantWithdrawCount int64 `json:"descendant_withdraw_count"` // 下级提现次数
|
DescendantWithdrawCount int64 `json:"descendant_withdraw_count"` // 下级提现次数
|
||||||
DescendantWithdrawAmount float64 `json:"descendant_withdraw_amount"` // 下级提现总额
|
DescendantWithdrawAmount float64 `json:"descendant_withdraw_amount"` // 下级提现总额
|
||||||
}
|
}
|
||||||
|
|
||||||
AgentRealNameReq {
|
AgentRealNameReq {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
IDCard string `json:"id_card"`
|
IDCard string `json:"id_card"`
|
||||||
Mobile string `json:"mobile"`
|
Mobile string `json:"mobile"`
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
}
|
}
|
||||||
AgentRealNameResp {
|
AgentRealNameResp {
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
@@ -189,11 +219,10 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1/agent
|
prefix: api/v1/agent
|
||||||
group: agent
|
group: agent
|
||||||
jwt: JwtAuth
|
jwt: JwtAuth
|
||||||
middleware: UserAuthInterceptor
|
middleware: UserAuthInterceptor
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@handler GetAgentMembershipProductConfig
|
@handler GetAgentMembershipProductConfig
|
||||||
@@ -226,11 +255,10 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1/agent
|
prefix: api/v1/agent
|
||||||
group: agent
|
group: agent
|
||||||
jwt: JwtAuth
|
jwt: JwtAuth
|
||||||
middleware: UserAuthInterceptor
|
middleware: UserAuthInterceptor
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@handler GetAgentCommission
|
@handler GetAgentCommission
|
||||||
@@ -340,17 +368,15 @@ type (
|
|||||||
Status int64 `json:"status"` // 1申请中 2成功 3失败
|
Status int64 `json:"status"` // 1申请中 2成功 3失败
|
||||||
failMsg string `json:"fail_msg"`
|
failMsg string `json:"fail_msg"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开通代理会员请求参数
|
// 开通代理会员请求参数
|
||||||
AgentActivateMembershipReq {
|
AgentActivateMembershipReq {
|
||||||
Type string `json:"type,oneof=VIP SVIP"` // 会员类型:vip/svip
|
Type string `json:"type,oneof=VIP SVIP"` // 会员类型:vip/svip
|
||||||
}
|
}
|
||||||
// 开通代理会员响应
|
// 开通代理会员响应
|
||||||
AgentActivateMembershipResp {
|
AgentActivateMembershipResp {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
}
|
|
||||||
GetWithdrawalTaxExemptionReq {
|
|
||||||
}
|
}
|
||||||
|
GetWithdrawalTaxExemptionReq {}
|
||||||
GetWithdrawalTaxExemptionResp {
|
GetWithdrawalTaxExemptionResp {
|
||||||
TotalExemptionAmount float64 `json:"total_exemption_amount"`
|
TotalExemptionAmount float64 `json:"total_exemption_amount"`
|
||||||
UsedExemptionAmount float64 `json:"used_exemption_amount"`
|
UsedExemptionAmount float64 `json:"used_exemption_amount"`
|
||||||
@@ -360,10 +386,9 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1/agent
|
prefix: api/v1/agent
|
||||||
group: agent
|
group: agent
|
||||||
middleware: AuthInterceptor
|
middleware: AuthInterceptor
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
// 提交代理申请
|
// 提交代理申请
|
||||||
@@ -373,7 +398,6 @@ service main {
|
|||||||
// 获取推广标识数据
|
// 获取推广标识数据
|
||||||
@handler GetLinkData
|
@handler GetLinkData
|
||||||
get /link (GetLinkDataReq) returns (GetLinkDataResp)
|
get /link (GetLinkDataReq) returns (GetLinkDataResp)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@@ -384,7 +408,7 @@ type (
|
|||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
Ancestor string `json:"ancestor,optional"`
|
Ancestor string `json:"ancestor,optional"`
|
||||||
}
|
}
|
||||||
AgentApplyResp{
|
AgentApplyResp {
|
||||||
AccessToken string `json:"accessToken"`
|
AccessToken string `json:"accessToken"`
|
||||||
AccessExpire int64 `json:"accessExpire"`
|
AccessExpire int64 `json:"accessExpire"`
|
||||||
RefreshAfter int64 `json:"refreshAfter"`
|
RefreshAfter int64 `json:"refreshAfter"`
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ type Product {
|
|||||||
@server (
|
@server (
|
||||||
prefix: api/v1/product
|
prefix: api/v1/product
|
||||||
group: product
|
group: product
|
||||||
jwt: JwtAuth
|
|
||||||
middleware: UserAuthInterceptor
|
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
|
|||||||
@@ -9,9 +9,10 @@ info (
|
|||||||
//============================> query v1 <============================
|
//============================> query v1 <============================
|
||||||
// 查询基本类型定义
|
// 查询基本类型定义
|
||||||
type Query {
|
type Query {
|
||||||
Id int64 `json:"id"` // 主键ID
|
Id int64 `json:"id"` // 主键ID
|
||||||
OrderId int64 `json:"order_id"` // 订单ID
|
OrderId int64 `json:"order_id"` // 订单ID
|
||||||
UserId int64 `json:"user_id"` // 用户ID
|
UserId int64 `json:"user_id"` // 用户ID
|
||||||
|
Product string `json:"product"` // 产品ID
|
||||||
ProductName string `json:"product_name"` // 产品ID
|
ProductName string `json:"product_name"` // 产品ID
|
||||||
QueryParams map[string]interface{} `json:"query_params"`
|
QueryParams map[string]interface{} `json:"query_params"`
|
||||||
QueryData []QueryItem `json:"query_data"`
|
QueryData []QueryItem `json:"query_data"`
|
||||||
@@ -20,15 +21,14 @@ type Query {
|
|||||||
QueryState string `json:"query_state"` // 查询状态
|
QueryState string `json:"query_state"` // 查询状态
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type QueryItem {
|
type QueryItem {
|
||||||
Feature interface{} `json:"feature"`
|
Feature interface{} `json:"feature"`
|
||||||
Data interface{} `json:"data"` // 这里可以是 map 或 具体的 struct
|
Data interface{} `json:"data"` // 这里可以是 map 或 具体的 struct
|
||||||
}
|
}
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1
|
prefix: api/v1
|
||||||
group: query
|
group: query
|
||||||
middleware: AuthInterceptor
|
middleware: AuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@@ -65,11 +65,10 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1
|
prefix: api/v1
|
||||||
group: query
|
group: query
|
||||||
jwt: JwtAuth
|
jwt: JwtAuth
|
||||||
middleware: UserAuthInterceptor
|
middleware: UserAuthInterceptor
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "query service"
|
@doc "query service"
|
||||||
@@ -78,11 +77,10 @@ service main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1
|
prefix: api/v1
|
||||||
group: query
|
group: query
|
||||||
jwt: JwtAuth
|
jwt: JwtAuth
|
||||||
middleware: UserAuthInterceptor
|
middleware: UserAuthInterceptor
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "获取查询临时订单"
|
@doc "获取查询临时订单"
|
||||||
@@ -116,7 +114,7 @@ service main {
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
QueryGenerateShareLinkReq {
|
QueryGenerateShareLinkReq {
|
||||||
OrderId *int64 `json:"order_id,optional"`
|
OrderId *int64 `json:"order_id,optional"`
|
||||||
OrderNo *string `json:"order_no,optional"`
|
OrderNo *string `json:"order_no,optional"`
|
||||||
}
|
}
|
||||||
QueryGenerateShareLinkResp {
|
QueryGenerateShareLinkResp {
|
||||||
@@ -139,12 +137,12 @@ type (
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
QueryListReq {
|
QueryListReq {
|
||||||
Page int64 `form:"page"` // 页码
|
Page int64 `form:"page"` // 页码
|
||||||
PageSize int64 `form:"page_size"` // 每页数据量
|
PageSize int64 `form:"page_size"` // 每页数据量
|
||||||
}
|
}
|
||||||
QueryListResp {
|
QueryListResp {
|
||||||
Total int64 `json:"total"` // 总记录数
|
Total int64 `json:"total"` // 总记录数
|
||||||
List []Query `json:"list"` // 查询列表
|
List []Query `json:"list"` // 查询列表
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -157,7 +155,6 @@ type (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type (
|
type (
|
||||||
QueryDetailByOrderIdReq {
|
QueryDetailByOrderIdReq {
|
||||||
OrderId int64 `path:"order_id"`
|
OrderId int64 `path:"order_id"`
|
||||||
@@ -185,10 +182,9 @@ type (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type (
|
type (
|
||||||
UpdateQueryDataReq {
|
UpdateQueryDataReq {
|
||||||
Id int64 `json:"id"` // 查询ID
|
Id int64 `json:"id"` // 查询ID
|
||||||
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
|
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
|
||||||
}
|
}
|
||||||
UpdateQueryDataResp {
|
UpdateQueryDataResp {
|
||||||
@@ -212,8 +208,8 @@ service main {
|
|||||||
@doc "查询示例"
|
@doc "查询示例"
|
||||||
@handler queryExample
|
@handler queryExample
|
||||||
get /query/example (QueryExampleReq) returns (QueryExampleResp)
|
get /query/example (QueryExampleReq) returns (QueryExampleResp)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
QueryShareDetailReq {
|
QueryShareDetailReq {
|
||||||
Id string `path:"id"`
|
Id string `path:"id"`
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ service main {
|
|||||||
@doc "wechat h5 auth"
|
@doc "wechat h5 auth"
|
||||||
@handler wxH5Auth
|
@handler wxH5Auth
|
||||||
post /user/wxh5Auth (WXH5AuthReq) returns (WXH5AuthResp)
|
post /user/wxh5Auth (WXH5AuthReq) returns (WXH5AuthResp)
|
||||||
|
|
||||||
|
@handler getSignature
|
||||||
|
post /wechat/getSignature (GetSignatureReq) returns (GetSignatureResp)
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@@ -48,7 +51,7 @@ type (
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
WXMiniAuthReq {
|
WXMiniAuthReq {
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
}
|
}
|
||||||
WXMiniAuthResp {
|
WXMiniAuthResp {
|
||||||
AccessToken string `json:"accessToken"`
|
AccessToken string `json:"accessToken"`
|
||||||
@@ -57,6 +60,18 @@ type (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
GetSignatureReq {
|
||||||
|
Url string `json:"url"`
|
||||||
|
}
|
||||||
|
GetSignatureResp {
|
||||||
|
AppId string `json:"appId"`
|
||||||
|
Timestamp int64 `json:"timestamp"`
|
||||||
|
NonceStr string `json:"nonceStr"`
|
||||||
|
Signature string `json:"signature"`
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
WXH5AuthReq {
|
WXH5AuthReq {
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
@@ -67,9 +82,10 @@ type (
|
|||||||
RefreshAfter int64 `json:"refreshAfter"`
|
RefreshAfter int64 `json:"refreshAfter"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1
|
prefix: api/v1
|
||||||
group: user
|
group: user
|
||||||
middleware: AuthInterceptor
|
middleware: AuthInterceptor
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@@ -101,7 +117,6 @@ type (
|
|||||||
UserInfoResp {
|
UserInfoResp {
|
||||||
UserInfo User `json:"userInfo"`
|
UserInfo User `json:"userInfo"`
|
||||||
}
|
}
|
||||||
|
|
||||||
BindMobileReq {
|
BindMobileReq {
|
||||||
Mobile string `json:"mobile" validate:"required,mobile"`
|
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||||
Code string `json:"code" validate:"required"`
|
Code string `json:"code" validate:"required"`
|
||||||
@@ -143,19 +158,20 @@ service main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Notification {
|
type Notification {
|
||||||
Title string `json:"title"` // 通知标题
|
Title string `json:"title"` // 通知标题
|
||||||
Content string `json:"content"` // 通知内容 (富文本)
|
Content string `json:"content"` // 通知内容 (富文本)
|
||||||
NotificationPage string `json:"notificationPage"` // 通知页面
|
NotificationPage string `json:"notificationPage"` // 通知页面
|
||||||
StartDate string `json:"startDate"` // 通知开始日期,格式 "YYYY-MM-DD"
|
StartDate string `json:"startDate"` // 通知开始日期,格式 "YYYY-MM-DD"
|
||||||
EndDate string `json:"endDate"` // 通知结束日期,格式 "YYYY-MM-DD"
|
EndDate string `json:"endDate"` // 通知结束日期,格式 "YYYY-MM-DD"
|
||||||
StartTime string `json:"startTime"` // 每天通知开始时间,格式 "HH:MM:SS"
|
StartTime string `json:"startTime"` // 每天通知开始时间,格式 "HH:MM:SS"
|
||||||
EndTime string `json:"endTime"` // 每天通知结束时间,格式 "HH:MM:SS"
|
EndTime string `json:"endTime"` // 每天通知结束时间,格式 "HH:MM:SS"
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
// 获取通知响应体(分页)
|
// 获取通知响应体(分页)
|
||||||
GetNotificationsResp {
|
GetNotificationsResp {
|
||||||
Notifications []Notification `json:"notifications"` // 通知列表
|
Notifications []Notification `json:"notifications"` // 通知列表
|
||||||
Total int64 `json:"total"` // 总记录数
|
Total int64 `json:"total"` // 总记录数
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -27,3 +27,5 @@ import "./admin/admin_product.api"
|
|||||||
import "./admin/admin_feature.api"
|
import "./admin/admin_feature.api"
|
||||||
import "./admin/admin_query.api"
|
import "./admin/admin_query.api"
|
||||||
import "./admin/admin_agent.api"
|
import "./admin/admin_agent.api"
|
||||||
|
import "./admin/admin_api.api"
|
||||||
|
import "./admin/admin_role_api.api"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
Name: main
|
Name: main
|
||||||
Host: 0.0.0.0
|
Host: 0.0.0.0
|
||||||
Port: 8888
|
Port: 8888
|
||||||
DataSource: "hm:3fgWpwELC21tIYTL@tcp(127.0.0.1:21001)/hm?charset=utf8mb4&parseTime=True&loc=Local"
|
DataSource: "tydata:5vg67b3UNHu8@tcp(127.0.0.1:21001)/tydata?charset=utf8mb4&parseTime=True&loc=Local"
|
||||||
CacheRedis:
|
CacheRedis:
|
||||||
- Host: "127.0.0.1:21002"
|
- Host: "127.0.0.1:21002"
|
||||||
Pass: "sjdZG6mcS9RTcfW3" # Redis 密码,如果未设置则留空
|
Pass: "3m3WsgyCKWqz" # Redis 密码,如果未设置则留空
|
||||||
Type: "node" # 单节点模式
|
Type: "node" # 单节点模式
|
||||||
JwtAuth:
|
JwtAuth:
|
||||||
AccessSecret: "WUvoIwL-FK0qnlxhvxR9tV6SjfOpeJMpKmY2QvT99lA"
|
AccessSecret: "WUvoIwL-FK0qnlxhvxR9tV6SjfOpeJMpKmY2QvT99lA"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ VerifyCode:
|
|||||||
AccessKeyID: "LTAI5tKGB3TVJbMHSoZN3yr9"
|
AccessKeyID: "LTAI5tKGB3TVJbMHSoZN3yr9"
|
||||||
AccessKeySecret: "OCQ30GWp4yENMjmfOAaagksE18bp65"
|
AccessKeySecret: "OCQ30GWp4yENMjmfOAaagksE18bp65"
|
||||||
EndpointURL: "dysmsapi.aliyuncs.com"
|
EndpointURL: "dysmsapi.aliyuncs.com"
|
||||||
SignName: "天远数据"
|
SignName: "天远查"
|
||||||
TemplateCode: "SMS_302641455"
|
TemplateCode: "SMS_302641455"
|
||||||
ValidTime: 300
|
ValidTime: 300
|
||||||
Encrypt:
|
Encrypt:
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentCommissionDeductionListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentCommissionDeductionListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentCommissionListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentCommissionListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentLinkListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentLinkListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentMembershipConfigListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentMembershipConfigListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentMembershipRechargeOrderListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentMembershipRechargeOrderListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentPlatformDeductionListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentPlatformDeductionListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentProductionConfigListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentProductionConfigListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentRewardListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentRewardListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetAgentWithdrawalListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetAgentWithdrawalListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminUpdateAgentMembershipConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminUpdateAgentMembershipConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_agent
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_agent"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_agent"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminUpdateAgentProductionConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminUpdateAgentProductionConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminBatchUpdateApiStatusHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminBatchUpdateApiStatusReq
|
||||||
|
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_api.NewAdminBatchUpdateApiStatusLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminBatchUpdateApiStatus(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminCreateApiHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminCreateApiReq
|
||||||
|
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_api.NewAdminCreateApiLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminCreateApi(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminDeleteApiHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminDeleteApiReq
|
||||||
|
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_api.NewAdminDeleteApiLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminDeleteApi(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminGetApiDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminGetApiDetailReq
|
||||||
|
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_api.NewAdminGetApiDetailLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminGetApiDetail(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminGetApiListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminGetApiListReq
|
||||||
|
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_api.NewAdminGetApiListLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminGetApiList(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminUpdateApiHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminUpdateApiReq
|
||||||
|
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_api.NewAdminUpdateApiLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminUpdateApi(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,12 +3,13 @@ package admin_auth
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_auth"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_auth"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminLoginHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminLoginHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_feature
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_feature"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminConfigFeatureExampleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminConfigFeatureExampleReq
|
||||||
|
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_feature.NewAdminConfigFeatureExampleLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminConfigFeatureExample(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,12 +3,13 @@ package admin_feature
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_feature"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_feature"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminCreateFeatureHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminCreateFeatureHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_feature
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_feature"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_feature"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminDeleteFeatureHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminDeleteFeatureHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_feature
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_feature"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_feature"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetFeatureDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetFeatureDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_feature
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_feature"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminGetFeatureExampleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminGetFeatureExampleReq
|
||||||
|
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_feature.NewAdminGetFeatureExampleLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminGetFeatureExample(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,12 +3,13 @@ package admin_feature
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_feature"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_feature"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetFeatureListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetFeatureListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_feature
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_feature"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_feature"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminUpdateFeatureHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminUpdateFeatureHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_menu
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_menu"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_menu"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateMenuHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func CreateMenuHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_menu
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_menu"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_menu"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func DeleteMenuHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func DeleteMenuHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_menu
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_menu"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_menu"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetMenuAllHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func GetMenuAllHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_menu
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_menu"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_menu"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetMenuDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func GetMenuDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_menu
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_menu"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_menu"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetMenuListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func GetMenuListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_menu
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_menu"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_menu"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func UpdateMenuHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func UpdateMenuHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_notification
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_notification"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_notification"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminCreateNotificationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminCreateNotificationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_notification
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_notification"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_notification"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminDeleteNotificationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminDeleteNotificationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_notification
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_notification"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_notification"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetNotificationDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetNotificationDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_notification
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_notification"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_notification"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetNotificationListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetNotificationListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_notification
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_notification"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_notification"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminUpdateNotificationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminUpdateNotificationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_order
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_order"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_order"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminCreateOrderHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminCreateOrderHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_order
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_order"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_order"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminDeleteOrderHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminDeleteOrderHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_order
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_order"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_order"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetOrderDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetOrderDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_order
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_order"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_order"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetOrderListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetOrderListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_order
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_order"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_order"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminRefundOrderHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminRefundOrderHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package admin_order
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_order"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminRetryAgentProcessHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminRetryAgentProcessReq
|
||||||
|
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_order.NewAdminRetryAgentProcessLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminRetryAgentProcess(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,12 +3,13 @@ package admin_order
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_order"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_order"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminUpdateOrderHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminUpdateOrderHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_platform_user
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_platform_user"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_platform_user"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminCreatePlatformUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminCreatePlatformUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_platform_user
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_platform_user"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_platform_user"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminDeletePlatformUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminDeletePlatformUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_platform_user
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_platform_user"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_platform_user"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetPlatformUserDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetPlatformUserDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_platform_user
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_platform_user"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_platform_user"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetPlatformUserListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetPlatformUserListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_platform_user
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_platform_user"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_platform_user"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminUpdatePlatformUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminUpdatePlatformUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_product
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_product"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_product"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminCreateProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminCreateProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_product
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_product"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_product"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminDeleteProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminDeleteProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_product
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_product"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_product"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetProductDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetProductDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_product
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_product"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_product"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetProductFeatureListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetProductFeatureListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_product
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_product"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_product"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_product
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_product"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_product"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminUpdateProductFeaturesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminUpdateProductFeaturesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_product
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_product"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_product"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminUpdateProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminUpdateProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_promotion
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_promotion"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_promotion"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreatePromotionLinkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func CreatePromotionLinkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ package admin_promotion
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"hm-server/app/main/api/internal/logic/admin_promotion"
|
"tydata-server/app/main/api/internal/logic/admin_promotion"
|
||||||
"hm-server/app/main/api/internal/svc"
|
"tydata-server/app/main/api/internal/svc"
|
||||||
"hm-server/app/main/api/internal/types"
|
"tydata-server/app/main/api/internal/types"
|
||||||
"hm-server/common/result"
|
"tydata-server/common/result"
|
||||||
"hm-server/pkg/lzkit/validator"
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_promotion
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_promotion"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_promotion"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetPromotionLinkDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func GetPromotionLinkDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_promotion
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_promotion"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_promotion"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetPromotionLinkListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func GetPromotionLinkListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_promotion
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_promotion"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_promotion"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetPromotionStatsHistoryHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func GetPromotionStatsHistoryHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_promotion
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_promotion"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_promotion"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetPromotionStatsTotalHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func GetPromotionStatsTotalHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_promotion
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_promotion"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_promotion"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func RecordLinkClickHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func RecordLinkClickHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ package admin_promotion
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"hm-server/app/main/api/internal/logic/admin_promotion"
|
"tydata-server/app/main/api/internal/logic/admin_promotion"
|
||||||
"hm-server/app/main/api/internal/svc"
|
"tydata-server/app/main/api/internal/svc"
|
||||||
"hm-server/app/main/api/internal/types"
|
"tydata-server/app/main/api/internal/types"
|
||||||
"hm-server/common/result"
|
"tydata-server/common/result"
|
||||||
"hm-server/pkg/lzkit/validator"
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_query
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_query"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_query"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetQueryCleanupConfigListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetQueryCleanupConfigListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_query
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_query"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_query"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetQueryCleanupDetailListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetQueryCleanupDetailListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_query
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_query"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_query"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetQueryCleanupLogListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetQueryCleanupLogListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_query
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_query"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_query"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminGetQueryDetailByOrderIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminGetQueryDetailByOrderIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_query
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_query"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_query"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func AdminUpdateQueryCleanupConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func AdminUpdateQueryCleanupConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_role
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_role"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_role"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateRoleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func CreateRoleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_role
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_role"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_role"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func DeleteRoleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func DeleteRoleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_role
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_role"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_role"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetRoleDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func GetRoleDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_role
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_role"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_role"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetRoleListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func GetRoleListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package admin_role
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_role"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/rest/httpx"
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
"hm-server/app/main/api/internal/logic/admin_role"
|
|
||||||
"hm-server/app/main/api/internal/svc"
|
|
||||||
"hm-server/app/main/api/internal/types"
|
|
||||||
"hm-server/common/result"
|
|
||||||
"hm-server/pkg/lzkit/validator"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func UpdateRoleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
func UpdateRoleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_role_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_role_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminAssignRoleApiHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminAssignRoleApiReq
|
||||||
|
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_role_api.NewAdminAssignRoleApiLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminAssignRoleApi(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_role_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_role_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminGetAllApiListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminGetAllApiListReq
|
||||||
|
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_role_api.NewAdminGetAllApiListLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminGetAllApiList(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_role_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_role_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminGetRoleApiListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminGetRoleApiListReq
|
||||||
|
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_role_api.NewAdminGetRoleApiListLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminGetRoleApiList(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package admin_role_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"tydata-server/app/main/api/internal/logic/admin_role_api"
|
||||||
|
"tydata-server/app/main/api/internal/svc"
|
||||||
|
"tydata-server/app/main/api/internal/types"
|
||||||
|
"tydata-server/common/result"
|
||||||
|
"tydata-server/pkg/lzkit/validator"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AdminRemoveRoleApiHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.AdminRemoveRoleApiReq
|
||||||
|
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_role_api.NewAdminRemoveRoleApiLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.AdminRemoveRoleApi(&req)
|
||||||
|
result.HttpResult(r, w, resp, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user