fix ivyz9a2b

This commit is contained in:
2025-05-21 20:45:14 +08:00
parent f9faac5155
commit f1ee00d841
3 changed files with 10 additions and 8 deletions

View File

@@ -2,27 +2,29 @@ package IVYZ
import (
"net/http"
"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"
"tianyuan-api/pkg/errs"
"tianyuan-api/pkg/response"
"github.com/zeromicro/go-zero/rest/httpx"
)
func IVYZ9A2BHandler(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 {
httpx.ErrorCtx(r.Context(), w, err)
response.Fail(r.Context(), w, errs.ErrParamValidation, nil)
return
}
l := IVYZ.NewIVYZ9A2BLogic(r.Context(), svcCtx)
resp, err := l.IVYZ9A2B(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
response.Fail(r.Context(), w, err, resp)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
response.Success(r.Context(), w, resp)
}
}
}

View File

@@ -29,7 +29,7 @@ func NewIVYZ9A2BLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IVYZ9A2B
}
}
func (l *IVYZ9A2BLogic) IVYZ9A2B(req *types.Request) (resp string, err error) {
func (l *IVYZ9A2BLogic) IVYZ9A2B(req *types.Request) (resp string, err *errs.AppError) {
var status string
var charges bool
var remark = ""