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
|
||||
|
||||
@@ -22,6 +22,9 @@ import (
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
// 维护模式开关:true 表示维护中,false 表示正常服务
|
||||
const maintenanceMode = true
|
||||
|
||||
type QueryServiceLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
@@ -37,6 +40,12 @@ func NewQueryServiceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Quer
|
||||
}
|
||||
|
||||
func (l *QueryServiceLogic) QueryService(req *types.QueryServiceReq) (resp *types.QueryServiceResp, err error) {
|
||||
// 维护中,暂停使用
|
||||
// TODO: 维护完成后将 maintenanceMode 设置为 false
|
||||
if maintenanceMode {
|
||||
return nil, errors.Wrapf(xerr.NewErrMsg("系统维护中,暂停使用"), "")
|
||||
}
|
||||
|
||||
if req.AgentIdentifier != "" {
|
||||
l.ctx = context.WithValue(l.ctx, "agentIdentifier", req.AgentIdentifier)
|
||||
} else if req.App {
|
||||
|
||||
Reference in New Issue
Block a user