新增提现实名认证

This commit is contained in:
2025-06-03 16:03:25 +08:00
parent 21a88b42f8
commit cb936ad30a
13 changed files with 627 additions and 12 deletions

View File

@@ -0,0 +1,29 @@
package agent
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"tydata-server/app/user/cmd/api/internal/logic/agent"
"tydata-server/app/user/cmd/api/internal/svc"
"tydata-server/app/user/cmd/api/internal/types"
"tydata-server/common/result"
"tydata-server/pkg/lzkit/validator"
)
func AgentRealNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AgentRealNameReq
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 := agent.NewAgentRealNameLogic(r.Context(), svcCtx)
resp, err := l.AgentRealName(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@@ -40,6 +40,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/product_config",
Handler: agent.GetAgentProductConfigHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/real_name",
Handler: agent.AgentRealNameHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/subordinate/contribution/detail",