2024-10-02 00:57:17 +08:00
|
|
|
package FLXG
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
2024-10-12 21:35:35 +08:00
|
|
|
"tianyuan-api/pkg/response"
|
2024-10-02 00:57:17 +08:00
|
|
|
|
|
|
|
"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"
|
|
|
|
|
|
|
|
xhttp "github.com/zeromicro/x/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func FLXG3D56Handler(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 {
|
|
|
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
l := FLXG.NewFLXG3D56Logic(r.Context(), svcCtx)
|
|
|
|
resp, err := l.FLXG3D56(&req)
|
2024-10-13 01:21:13 +08:00
|
|
|
ctx := r.Context()
|
2024-10-02 00:57:17 +08:00
|
|
|
if err != nil {
|
2024-10-13 01:21:13 +08:00
|
|
|
r = r.WithContext(ctx)
|
|
|
|
response.Fail(ctx, w, err)
|
2024-10-02 00:57:17 +08:00
|
|
|
} else {
|
2024-10-13 01:21:13 +08:00
|
|
|
r = r.WithContext(ctx)
|
|
|
|
response.Success(ctx, w, resp)
|
2024-10-02 00:57:17 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|