1、response修改 2、负数扣款
This commit is contained in:
@@ -2,28 +2,27 @@ package JRZQ
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"tianyuan-api/pkg/errs"
|
||||
"tianyuan-api/pkg/response"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||
"tianyuan-api/apps/api/internal/svc"
|
||||
"tianyuan-api/apps/api/internal/types"
|
||||
|
||||
xhttp "github.com/zeromicro/x/http"
|
||||
)
|
||||
|
||||
func JRZQ0A03Handler(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, errs.ErrParamValidation, nil)
|
||||
return
|
||||
}
|
||||
|
||||
l := JRZQ.NewJRZQ0A03Logic(r.Context(), svcCtx)
|
||||
resp, err := l.JRZQ0A03(&req)
|
||||
if err != nil {
|
||||
response.Fail(r.Context(), w, err)
|
||||
response.Fail(r.Context(), w, err, resp)
|
||||
} else {
|
||||
response.Success(r.Context(), w, resp)
|
||||
}
|
||||
|
||||
@@ -2,28 +2,27 @@ package JRZQ
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"tianyuan-api/pkg/errs"
|
||||
"tianyuan-api/pkg/response"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||
"tianyuan-api/apps/api/internal/svc"
|
||||
"tianyuan-api/apps/api/internal/types"
|
||||
|
||||
xhttp "github.com/zeromicro/x/http"
|
||||
)
|
||||
|
||||
func JRZQ4AA8Handler(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, errs.ErrParamValidation, nil)
|
||||
return
|
||||
}
|
||||
|
||||
l := JRZQ.NewJRZQ4AA8Logic(r.Context(), svcCtx)
|
||||
resp, err := l.JRZQ4AA8(&req)
|
||||
if err != nil {
|
||||
response.Fail(r.Context(), w, err)
|
||||
response.Fail(r.Context(), w, err, resp)
|
||||
} else {
|
||||
response.Success(r.Context(), w, resp)
|
||||
}
|
||||
|
||||
@@ -2,28 +2,27 @@ package JRZQ
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"tianyuan-api/pkg/errs"
|
||||
"tianyuan-api/pkg/response"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||
"tianyuan-api/apps/api/internal/svc"
|
||||
"tianyuan-api/apps/api/internal/types"
|
||||
|
||||
xhttp "github.com/zeromicro/x/http"
|
||||
)
|
||||
|
||||
func JRZQ8203Handler(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, errs.ErrParamValidation, nil)
|
||||
return
|
||||
}
|
||||
|
||||
l := JRZQ.NewJRZQ8203Logic(r.Context(), svcCtx)
|
||||
resp, err := l.JRZQ8203(&req)
|
||||
if err != nil {
|
||||
response.Fail(r.Context(), w, err)
|
||||
response.Fail(r.Context(), w, err, resp)
|
||||
} else {
|
||||
response.Success(r.Context(), w, resp)
|
||||
}
|
||||
|
||||
@@ -2,28 +2,27 @@ package JRZQ
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"tianyuan-api/pkg/errs"
|
||||
"tianyuan-api/pkg/response"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||
"tianyuan-api/apps/api/internal/svc"
|
||||
"tianyuan-api/apps/api/internal/types"
|
||||
|
||||
xhttp "github.com/zeromicro/x/http"
|
||||
)
|
||||
|
||||
func JRZQDCBEHandler(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, errs.ErrParamValidation, nil)
|
||||
return
|
||||
}
|
||||
|
||||
l := JRZQ.NewJRZQDCBELogic(r.Context(), svcCtx)
|
||||
resp, err := l.JRZQDCBE(&req)
|
||||
if err != nil {
|
||||
response.Fail(r.Context(), w, err)
|
||||
response.Fail(r.Context(), w, err, resp)
|
||||
} else {
|
||||
response.Success(r.Context(), w, resp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user