v1.0
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
admin_order "ycc-server/app/main/api/internal/handler/admin_order"
|
||||
admin_platform_user "ycc-server/app/main/api/internal/handler/admin_platform_user"
|
||||
admin_product "ycc-server/app/main/api/internal/handler/admin_product"
|
||||
admin_promotion "ycc-server/app/main/api/internal/handler/admin_promotion"
|
||||
admin_query "ycc-server/app/main/api/internal/handler/admin_query"
|
||||
admin_role "ycc-server/app/main/api/internal/handler/admin_role"
|
||||
admin_role_api "ycc-server/app/main/api/internal/handler/admin_role_api"
|
||||
@@ -425,81 +424,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
rest.WithPrefix("/api/v1/admin/product"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
// 创建推广链接
|
||||
Method: http.MethodPost,
|
||||
Path: "/create",
|
||||
Handler: admin_promotion.CreatePromotionLinkHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 删除推广链接
|
||||
Method: http.MethodDelete,
|
||||
Path: "/delete/:id",
|
||||
Handler: admin_promotion.DeletePromotionLinkHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 获取推广链接详情
|
||||
Method: http.MethodGet,
|
||||
Path: "/detail/:id",
|
||||
Handler: admin_promotion.GetPromotionLinkDetailHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 获取推广链接列表
|
||||
Method: http.MethodGet,
|
||||
Path: "/list",
|
||||
Handler: admin_promotion.GetPromotionLinkListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 更新推广链接
|
||||
Method: http.MethodPut,
|
||||
Path: "/update/:id",
|
||||
Handler: admin_promotion.UpdatePromotionLinkHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/v1/admin/promotion/link"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
// 记录链接点击
|
||||
Method: http.MethodGet,
|
||||
Path: "/record/:path",
|
||||
Handler: admin_promotion.RecordLinkClickHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/v1/admin/promotion/link"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
// 获取推广历史记录
|
||||
Method: http.MethodGet,
|
||||
Path: "/history",
|
||||
Handler: admin_promotion.GetPromotionStatsHistoryHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 获取推广总统计
|
||||
Method: http.MethodGet,
|
||||
Path: "/total",
|
||||
Handler: admin_promotion.GetPromotionStatsTotalHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/v1/admin/promotion/stats"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
|
||||
@@ -693,6 +617,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/commission/list",
|
||||
Handler: agent.GetCommissionListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/conversion/rate",
|
||||
Handler: agent.GetConversionRateHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/generating_link",
|
||||
@@ -703,6 +632,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/info",
|
||||
Handler: agent.GetAgentInfoHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/invite_code/delete",
|
||||
Handler: agent.DeleteInviteCodeHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/invite_code/generate",
|
||||
@@ -718,6 +652,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/invite_link",
|
||||
Handler: agent.GetInviteLinkHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/level/privilege",
|
||||
Handler: agent.GetLevelPrivilegeHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/product_config",
|
||||
@@ -733,16 +672,31 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/rebate/list",
|
||||
Handler: agent.GetRebateListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/rebate/upgrade/list",
|
||||
Handler: agent.GetUpgradeRebateListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/revenue",
|
||||
Handler: agent.GetRevenueInfoHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/subordinate/contribution/detail",
|
||||
Handler: agent.GetSubordinateContributionDetailHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/subordinate/list",
|
||||
Handler: agent.GetSubordinateListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/team/list",
|
||||
Handler: agent.GetTeamListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/team/statistics",
|
||||
@@ -779,6 +733,16 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
rest.WithPrefix("/api/v1/agent"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/s/:shortCode",
|
||||
Handler: agent.ShortLinkRedirectHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user