This commit is contained in:
2024-10-15 17:19:23 +08:00
parent 8f903b457f
commit c76451788c
42 changed files with 1600 additions and 237 deletions

View File

@@ -0,0 +1,31 @@
package YYSY
import (
"net/http"
"tianyuan-api/pkg/response"
"github.com/zeromicro/go-zero/rest/httpx"
"tianyuan-api/apps/api/internal/logic/YYSY"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
xhttp "github.com/zeromicro/x/http"
)
func YYSY4B21Handler(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 := YYSY.NewYYSY4B21Logic(r.Context(), svcCtx)
resp, err := l.YYSY4B21(&req)
if err != nil {
response.Fail(r.Context(), w, err)
} else {
response.Success(r.Context(), w, resp)
}
}
}

View File

@@ -187,6 +187,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/YYSY09CD",
Handler: YYSY.YYSY09CDHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/YYSY4B21",
Handler: YYSY.YYSY4B21Handler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/YYSY4B37",