This commit is contained in:
2024-10-12 20:41:55 +08:00
parent 8c09120db6
commit 597e4f1b89
75 changed files with 5009 additions and 823 deletions

View File

@@ -1,6 +1,7 @@
package IVYZ
import (
xhttp "github.com/zeromicro/x/http"
"net/http"
"tianyuan-api/pkg/response"
@@ -14,10 +15,9 @@ func IVYZ5733Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.Request
if err := httpx.Parse(r, &req); err != nil {
response.Fail(r.Context(), w, err)
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
return
}
l := IVYZ.NewIVYZ5733Logic(r.Context(), svcCtx)
resp, err := l.IVYZ5733(&req)
if err != nil {

View File

@@ -19,7 +19,7 @@ import (
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
[]rest.Middleware{serverCtx.ApiAuthInterceptor, serverCtx.ApiMqsInterceptor},
[]rest.Route{
{
Method: http.MethodPost,
@@ -78,7 +78,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
[]rest.Middleware{serverCtx.ApiAuthInterceptor, serverCtx.ApiMqsInterceptor},
[]rest.Route{
{
Method: http.MethodPost,
@@ -117,7 +117,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
[]rest.Middleware{serverCtx.ApiAuthInterceptor, serverCtx.ApiMqsInterceptor},
[]rest.Route{
{
Method: http.MethodPost,
@@ -134,21 +134,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/JRZQ8203",
Handler: JRZQ.JRZQ8203Handler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/JRZQCEE8",
Handler: JRZQ.JRZQCEE8Handler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/JRZQDCBE",
Handler: JRZQ.JRZQDCBEHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/JRZQFEF8",
Handler: JRZQ.JRZQFEF8Handler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1"),
@@ -156,7 +146,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
[]rest.Middleware{serverCtx.ApiAuthInterceptor, serverCtx.ApiMqsInterceptor},
[]rest.Route{
{
Method: http.MethodPost,
@@ -168,11 +158,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/QYGL45BD",
Handler: QYGL.QYGL45BDHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/QYGL51BC",
Handler: QYGL.QYGL51BCHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/QYGL6F2D",
@@ -195,7 +180,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
[]rest.Middleware{serverCtx.ApiAuthInterceptor, serverCtx.ApiMqsInterceptor},
[]rest.Route{
{
Method: http.MethodPost,