f
This commit is contained in:
@@ -25,6 +25,9 @@ import (
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
// 维护模式开关:true 表示维护中,false 表示正常服务
|
||||
const maintenanceMode = true
|
||||
|
||||
type PaymentLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
@@ -48,6 +51,12 @@ func NewPaymentLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PaymentLo
|
||||
}
|
||||
|
||||
func (l *PaymentLogic) Payment(req *types.PaymentReq) (resp *types.PaymentResp, err error) {
|
||||
// 维护中,暂停使用
|
||||
// TODO: 维护完成后将 maintenanceMode 设置为 false
|
||||
if maintenanceMode {
|
||||
return nil, errors.Wrapf(xerr.NewErrMsg("系统维护中,暂停使用"), "")
|
||||
}
|
||||
|
||||
var paymentTypeResp *PaymentTypeResp
|
||||
var prepayData interface{}
|
||||
var orderID string
|
||||
|
||||
Reference in New Issue
Block a user