31 lines
737 B
Go
31 lines
737 B
Go
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 FLXG75FEHandler(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.NewFLXG75FELogic(r.Context(), svcCtx)
|
|
resp, err := l.FLXG75FE(&req)
|
|
if err != nil {
|
|
response.Fail(r.Context(), w, err, resp)
|
|
} else {
|
|
response.Success(r.Context(), w, resp)
|
|
}
|
|
}
|
|
}
|