<feat>去掉删除判断
This commit is contained in:
parent
7f20bf6925
commit
1f7d46c110
|
@ -42,10 +42,7 @@ func (a *AppCheck) Check() *AppCheck {
|
||||||
a.Code = errorcode.AppDisabled
|
a.Code = errorcode.AppDisabled
|
||||||
return a
|
return a
|
||||||
}
|
}
|
||||||
if !a.App.DeleteTime.IsZero() {
|
|
||||||
a.Code = errorcode.AppNotFound
|
|
||||||
return a
|
|
||||||
}
|
|
||||||
return a
|
return a
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,8 +87,5 @@ func GetAndCheckMerchant(merchant *merchantmodel.Merchant, conn builder.Cond, co
|
||||||
return nil, code
|
return nil, code
|
||||||
}
|
}
|
||||||
|
|
||||||
if !merchantInfo.DeleteTime.IsZero() {
|
|
||||||
return nil, errorcode.MerchantNotFound
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,8 +112,6 @@ func GetAndCheckPayChannel(channel *paychannelmodel.PayChannel, conn builder.Con
|
||||||
if code != errorcode.Success {
|
if code != errorcode.Success {
|
||||||
return nil, code
|
return nil, code
|
||||||
}
|
}
|
||||||
if !channelInfo.DeleteTime.IsZero() {
|
|
||||||
return nil, errorcode.PayChannelNotFound
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,10 +133,7 @@ func (o *OrderNotify) checkApp() {
|
||||||
if o.Code != errorcode.Success {
|
if o.Code != errorcode.Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if o.app.DeleteTime.IsZero() {
|
|
||||||
o.Code = errorcode.AppDisabled
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if o.app.NotifyUrl == "" {
|
if o.app.NotifyUrl == "" {
|
||||||
o.Code = errorcode.AppNotifyUrlNotFound
|
o.Code = errorcode.AppNotifyUrlNotFound
|
||||||
return
|
return
|
||||||
|
@ -148,15 +145,11 @@ func (o *OrderNotify) checkApp() {
|
||||||
func (o *OrderNotify) checkOrder() {
|
func (o *OrderNotify) checkOrder() {
|
||||||
cond := builder.NewCond()
|
cond := builder.NewCond()
|
||||||
cond = cond.And(builder.Eq{"id": o.OrderId})
|
cond = cond.And(builder.Eq{"id": o.OrderId})
|
||||||
|
|
||||||
o.order, o.Code = services.OrderFindOne(&ordersmodel.Orders{}, cond)
|
o.order, o.Code = services.OrderFindOne(&ordersmodel.Orders{}, cond)
|
||||||
if o.Code != errorcode.Success {
|
if o.Code != errorcode.Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if o.order.DeleteTime.IsZero() {
|
|
||||||
o.Code = errorcode.OrderIsDelete
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if o.order.Status != common.ORDER_STATUS_PAYING {
|
if o.order.Status != common.ORDER_STATUS_PAYING {
|
||||||
o.Code = errorcode.OrderStatusErr
|
o.Code = errorcode.OrderStatusErr
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue