fix comb86pm
add flxg0687
This commit is contained in:
31
apps/api/internal/handler/FLXG/flxg0687handler.go
Normal file
31
apps/api/internal/handler/FLXG/flxg0687handler.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package FLXG
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"tianyuan-api/pkg/errs"
|
||||
"tianyuan-api/pkg/response"
|
||||
|
||||
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||
"tianyuan-api/apps/api/internal/svc"
|
||||
"tianyuan-api/apps/api/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func FLXG0687Handler(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, errs.ErrParamValidation, nil)
|
||||
return
|
||||
}
|
||||
|
||||
l := FLXG.NewFLXG0687Logic(r.Context(), svcCtx)
|
||||
resp, err := l.FLXG0687(&req)
|
||||
if err != nil {
|
||||
response.Fail(r.Context(), w, err, resp)
|
||||
} else {
|
||||
response.Success(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/COMB86P",
|
||||
Path: "/COMB86PM",
|
||||
Handler: COMB.COMB86PMHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
@@ -41,6 +41,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/FLXG0687",
|
||||
Handler: FLXG.FLXG0687Handler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/FLXG0V3B",
|
||||
|
||||
Reference in New Issue
Block a user