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,6 +32,14 @@ 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 (
|
||||||
@@ -39,34 +48,28 @@ type (
|
|||||||
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"` // 页码
|
||||||
@@ -74,7 +77,6 @@ type (
|
|||||||
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
|
||||||
@@ -83,18 +85,15 @@ type (
|
|||||||
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
|
||||||
@@ -103,4 +102,27 @@ type (
|
|||||||
CreateTime string `json:"create_time"` // 创建时间
|
CreateTime string `json:"create_time"` // 创建时间
|
||||||
UpdateTime string `json:"update_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"` // 创建时间
|
||||||
|
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 {
|
||||||
// 创建通知
|
// 创建通知
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ 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,6 +35,10 @@ 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 (
|
||||||
@@ -57,13 +61,11 @@ type (
|
|||||||
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
|
||||||
@@ -79,13 +81,13 @@ type (
|
|||||||
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
|
||||||
@@ -102,8 +104,9 @@ type (
|
|||||||
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"` // 商户订单号
|
||||||
@@ -115,12 +118,10 @@ type (
|
|||||||
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
|
||||||
@@ -135,33 +136,38 @@ type (
|
|||||||
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,6 +92,7 @@ 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
|
||||||
@@ -176,7 +207,6 @@ type (
|
|||||||
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"`
|
||||||
@@ -193,7 +223,6 @@ type (
|
|||||||
group: agent
|
group: agent
|
||||||
jwt: JwtAuth
|
jwt: JwtAuth
|
||||||
middleware: UserAuthInterceptor
|
middleware: UserAuthInterceptor
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@handler GetAgentMembershipProductConfig
|
@handler GetAgentMembershipProductConfig
|
||||||
@@ -230,7 +259,6 @@ type (
|
|||||||
group: agent
|
group: agent
|
||||||
jwt: JwtAuth
|
jwt: JwtAuth
|
||||||
middleware: UserAuthInterceptor
|
middleware: UserAuthInterceptor
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@handler GetAgentCommission
|
@handler GetAgentCommission
|
||||||
@@ -340,7 +368,6 @@ 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
|
||||||
@@ -349,8 +376,7 @@ type (
|
|||||||
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"`
|
||||||
@@ -363,7 +389,6 @@ type (
|
|||||||
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 {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ 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,7 +21,6 @@ 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
|
||||||
@@ -69,7 +69,6 @@ type (
|
|||||||
group: query
|
group: query
|
||||||
jwt: JwtAuth
|
jwt: JwtAuth
|
||||||
middleware: UserAuthInterceptor
|
middleware: UserAuthInterceptor
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "query service"
|
@doc "query service"
|
||||||
@@ -82,7 +81,6 @@ service main {
|
|||||||
group: query
|
group: query
|
||||||
jwt: JwtAuth
|
jwt: JwtAuth
|
||||||
middleware: UserAuthInterceptor
|
middleware: UserAuthInterceptor
|
||||||
|
|
||||||
)
|
)
|
||||||
service main {
|
service main {
|
||||||
@doc "获取查询临时订单"
|
@doc "获取查询临时订单"
|
||||||
@@ -157,7 +155,6 @@ type (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type (
|
type (
|
||||||
QueryDetailByOrderIdReq {
|
QueryDetailByOrderIdReq {
|
||||||
OrderId int64 `path:"order_id"`
|
OrderId int64 `path:"order_id"`
|
||||||
@@ -185,7 +182,6 @@ type (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type (
|
type (
|
||||||
UpdateQueryDataReq {
|
UpdateQueryDataReq {
|
||||||
Id int64 `json:"id"` // 查询ID
|
Id int64 `json:"id"` // 查询ID
|
||||||
@@ -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 (
|
||||||
@@ -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,6 +82,7 @@ type (
|
|||||||
RefreshAfter int64 `json:"refreshAfter"`
|
RefreshAfter int64 `json:"refreshAfter"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: api/v1
|
prefix: api/v1
|
||||||
group: user
|
group: user
|
||||||
@@ -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"`
|
||||||
@@ -159,3 +174,4 @@ type (
|
|||||||
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