fix:订单详情
This commit is contained in:
@@ -12,14 +12,14 @@ import (
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreatePrePaymentDepositLogic struct {
|
||||
type CreatePrePaymentByBalanceLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewCreatePrePaymentDepositLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreatePrePaymentDepositLogic {
|
||||
return &CreatePrePaymentDepositLogic{
|
||||
func NewCreatePrePaymentByBalanceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreatePrePaymentByBalanceLogic {
|
||||
return &CreatePrePaymentByBalanceLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
@@ -27,10 +27,10 @@ func NewCreatePrePaymentDepositLogic(ctx context.Context, svcCtx *svc.ServiceCon
|
||||
}
|
||||
|
||||
// 处理进入前逻辑w,r
|
||||
// func (l *CreatePrePaymentDepositLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) {
|
||||
// func (l *CreatePrePaymentByBalanceLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) {
|
||||
// }
|
||||
|
||||
func (l *CreatePrePaymentDepositLogic) CreatePrePaymentDeposit(req *types.CreatePrePaymentDepositReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
func (l *CreatePrePaymentByBalanceLogic) CreatePrePaymentByBalance(req *types.CreatePrePaymentByBalanceReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
|
||||
// userinfo 传入值时, 一定不为null
|
||||
|
||||
@@ -38,6 +38,6 @@ func (l *CreatePrePaymentDepositLogic) CreatePrePaymentDeposit(req *types.Create
|
||||
}
|
||||
|
||||
// 处理逻辑后 w,r 如:重定向, resp 必须重新处理
|
||||
// func (l *CreatePrePaymentDepositLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
|
||||
// func (l *CreatePrePaymentByBalanceLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
|
||||
// // httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
// }
|
||||
@@ -0,0 +1,43 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
|
||||
"context"
|
||||
|
||||
"fusenapi/server/order/internal/svc"
|
||||
"fusenapi/server/order/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreatePrePaymentByDepositLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewCreatePrePaymentByDepositLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreatePrePaymentByDepositLogic {
|
||||
return &CreatePrePaymentByDepositLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
// 处理进入前逻辑w,r
|
||||
// func (l *CreatePrePaymentByDepositLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) {
|
||||
// }
|
||||
|
||||
func (l *CreatePrePaymentByDepositLogic) CreatePrePaymentByDeposit(req *types.CreatePrePaymentByDepositReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
|
||||
// userinfo 传入值时, 一定不为null
|
||||
|
||||
return resp.SetStatus(basic.CodeOK)
|
||||
}
|
||||
|
||||
// 处理逻辑后 w,r 如:重定向, resp 必须重新处理
|
||||
// func (l *CreatePrePaymentByDepositLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
|
||||
// // httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
// }
|
||||
Reference in New Issue
Block a user