chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
ITrade interface {
|
||||
CreateRechargePending(ctx context.Context, outTradeNo, totalAmount string) error
|
||||
// Recharge 余额充值(支付宝回调时调用)
|
||||
Recharge(ctx context.Context, in *model.TBalanceDetailRechargeModel) (err error)
|
||||
MarkRechargeFailed(ctx context.Context, outTradeNo string) error
|
||||
}
|
||||
)
|
||||
|
||||
var localTrade ITrade
|
||||
|
||||
func Trade() ITrade {
|
||||
if localTrade == nil {
|
||||
panic("implement not found for interface ITrade, forgot register?")
|
||||
}
|
||||
return localTrade
|
||||
}
|
||||
|
||||
func RegisterTrade(i ITrade) {
|
||||
localTrade = i
|
||||
}
|
||||
Reference in New Issue
Block a user