This commit is contained in:
2024-10-04 23:07:49 +08:00
parent f649d32c19
commit 8c09120db6
7 changed files with 78 additions and 62 deletions

View File

@@ -2,29 +2,28 @@ package IVYZ
import (
"net/http"
"tianyuan-api/pkg/response"
"github.com/zeromicro/go-zero/rest/httpx"
"tianyuan-api/apps/api/internal/logic/IVYZ"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
xhttp "github.com/zeromicro/x/http"
)
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 {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
response.Fail(r.Context(), w, err)
return
}
l := IVYZ.NewIVYZ5733Logic(r.Context(), svcCtx)
resp, err := l.IVYZ5733(&req)
if err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
response.Fail(r.Context(), w, err)
} else {
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
response.Success(r.Context(), w, resp)
}
}
}