This commit is contained in:
2025-07-28 01:46:39 +08:00
parent b03129667a
commit 357639462a
219 changed files with 21634 additions and 8138 deletions

View File

@@ -43,31 +43,29 @@ func (r *CertificationRoutes) Register(router *http.GinRouter) {
authGroup := certificationGroup.Group("")
authGroup.Use(r.auth.Handle())
{
authGroup.GET("/user", r.handler.GetUserCertifications) // 获取用户认证列表
authGroup.GET("", r.handler.ListCertifications) // 查询认证列表(管理员)
authGroup.GET("/statistics", r.handler.GetCertificationStatistics) // 获取认证统计
authGroup.GET("", r.handler.ListCertifications) // 查询认证列表(管理员)
// 1. 获取认证详情
authGroup.GET("/:id", r.handler.GetCertification)
authGroup.GET("/details", r.handler.GetCertification)
// 2. 提交企业信息
authGroup.POST("/:id/enterprise-info", r.handler.SubmitEnterpriseInfo)
authGroup.POST("/enterprise-info", r.handler.SubmitEnterpriseInfo)
// 合同管理
authGroup.POST("/apply-contract", r.handler.ApplyContract) // 申请合同签署
// 3. 申请合同签署
authGroup.POST("/apply-contract", r.handler.ApplyContract)
// 重试操作
authGroup.POST("/retry", r.handler.RetryOperation) // 重试操作
// 前端确认是否完成认证
authGroup.POST("/confirm-auth", r.handler.ConfirmAuth)
// 前端确认是否完成签署
authGroup.POST("/confirm-sign", r.handler.ConfirmSign)
// 管理员操作
authGroup.POST("/force-transition", r.handler.ForceTransitionStatus) // 强制状态转换
authGroup.GET("/monitoring", r.handler.GetSystemMonitoring) // 获取系统监控数据
}
// 回调路由(不需要认证,但需要验证签名)
callbackGroup := certificationGroup.Group("/callbacks")
{
callbackGroup.POST("", r.handler.HandleEsignCallback) // e签宝回调统一处理企业认证和合同签署回调
callbackGroup.POST("/esign", r.handler.HandleEsignCallback) // e签宝回调统一处理企业认证和合同签署回调
}
}
@@ -87,7 +85,7 @@ func (r *CertificationRoutes) GetRoutes() []RouteInfo {
{Method: "POST", Path: "/api/v1/certifications/retry", Handler: "RetryOperation", Auth: true},
{Method: "POST", Path: "/api/v1/certifications/force-transition", Handler: "ForceTransitionStatus", Auth: true},
{Method: "GET", Path: "/api/v1/certifications/monitoring", Handler: "GetSystemMonitoring", Auth: true},
{Method: "POST", Path: "/api/v1/certifications/callbacks", Handler: "HandleEsignCallback", Auth: false},
{Method: "POST", Path: "/api/v1/certifications/callbacks/esign", Handler: "HandleEsignCallback", Auth: false},
}
}