新增新个人和企业司法
This commit is contained in:
30
apps/api/internal/handler/FLXG/flxg0v4bhandler.go
Normal file
30
apps/api/internal/handler/FLXG/flxg0v4bhandler.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package FLXG
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"tianyuan-api/pkg/errs"
|
||||
"tianyuan-api/pkg/response"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||
"tianyuan-api/apps/api/internal/svc"
|
||||
"tianyuan-api/apps/api/internal/types"
|
||||
)
|
||||
|
||||
func FLXG0V4BHandler(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.NewFLXG0V4BLogic(r.Context(), svcCtx)
|
||||
resp, err := l.FLXG0V4B(&req)
|
||||
if err != nil {
|
||||
response.Fail(r.Context(), w, err, resp)
|
||||
} else {
|
||||
response.Success(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user