From 1f7d46c110d3db1284b782940e799e812708973d Mon Sep 17 00:00:00 2001 From: Rzy <465386466@qq.com> Date: Thu, 8 Aug 2024 16:20:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/api_request_valid.go | 5 +---- app/services/merchant.go | 3 --- app/services/pay_channel.go | 4 +--- app/services/thirdpay/thirdpay_notify/notify.go | 11 ++--------- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/app/services/api_request_valid.go b/app/services/api_request_valid.go index ca007ce..6f528a3 100644 --- a/app/services/api_request_valid.go +++ b/app/services/api_request_valid.go @@ -42,10 +42,7 @@ func (a *AppCheck) Check() *AppCheck { a.Code = errorcode.AppDisabled return a } - if !a.App.DeleteTime.IsZero() { - a.Code = errorcode.AppNotFound - return a - } + return a } diff --git a/app/services/merchant.go b/app/services/merchant.go index abba737..caf2692 100644 --- a/app/services/merchant.go +++ b/app/services/merchant.go @@ -87,8 +87,5 @@ func GetAndCheckMerchant(merchant *merchantmodel.Merchant, conn builder.Cond, co return nil, code } - if !merchantInfo.DeleteTime.IsZero() { - return nil, errorcode.MerchantNotFound - } return } diff --git a/app/services/pay_channel.go b/app/services/pay_channel.go index 29beab0..194d161 100644 --- a/app/services/pay_channel.go +++ b/app/services/pay_channel.go @@ -112,8 +112,6 @@ func GetAndCheckPayChannel(channel *paychannelmodel.PayChannel, conn builder.Con if code != errorcode.Success { return nil, code } - if !channelInfo.DeleteTime.IsZero() { - return nil, errorcode.PayChannelNotFound - } + return } diff --git a/app/services/thirdpay/thirdpay_notify/notify.go b/app/services/thirdpay/thirdpay_notify/notify.go index a18c8de..a0c06d4 100644 --- a/app/services/thirdpay/thirdpay_notify/notify.go +++ b/app/services/thirdpay/thirdpay_notify/notify.go @@ -133,10 +133,7 @@ func (o *OrderNotify) checkApp() { if o.Code != errorcode.Success { return } - if o.app.DeleteTime.IsZero() { - o.Code = errorcode.AppDisabled - return - } + if o.app.NotifyUrl == "" { o.Code = errorcode.AppNotifyUrlNotFound return @@ -148,15 +145,11 @@ func (o *OrderNotify) checkApp() { func (o *OrderNotify) checkOrder() { cond := builder.NewCond() cond = cond.And(builder.Eq{"id": o.OrderId}) - o.order, o.Code = services.OrderFindOne(&ordersmodel.Orders{}, cond) if o.Code != errorcode.Success { return } - if o.order.DeleteTime.IsZero() { - o.Code = errorcode.OrderIsDelete - return - } + if o.order.Status != common.ORDER_STATUS_PAYING { o.Code = errorcode.OrderStatusErr return