model

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppModel

type AppModel struct {
	*ent.AppClient
}

func NewAppModel

func NewAppModel(client *ent.Client) *AppModel

func (*AppModel) ValidPayApp

func (m *AppModel) ValidPayApp(ctx context.Context, Id uint64) (*ent.App, error)

type ChannelModel

type ChannelModel struct {
	*ent.ChannelClient
}

func NewChannelModel

func NewChannelModel(client *ent.Client) *ChannelModel

func (*ChannelModel) ValidPayChannelByAppIdAndCode

func (m *ChannelModel) ValidPayChannelByAppIdAndCode(ctx context.Context, appId uint64, code string) (*ent.Channel, error)

type Model

type Model struct {
	App            *AppModel
	Channel        *ChannelModel
	NotifyLog      *NotifyLogModel
	NotifyTask     *NotifyTaskModel
	OrderExtension *OrderExtensionModel
	Order          *OrderModel
}

func NewModel

func NewModel(client *ent.Client) *Model

func (*Model) CreatePayNotifyTask

func (m *Model) CreatePayNotifyTask(ctx context.Context, types int, dataId uint64) (*ent.NotifyTask, error)

CreatePayNotifyTask 同时用到了 order 和 notify_task 两个表

type NotifyLogModel

type NotifyLogModel struct {
	*ent.NotifyLogClient
}

func NewNotifyLogModel

func NewNotifyLogModel(client *ent.Client) *NotifyLogModel

func (*NotifyLogModel) CreateNotifyLog

func (l *NotifyLogModel) CreateNotifyLog(ctx context.Context, task *ent.NotifyTask, newStatus uint8, err error, resp *payload.PayOrderNotifyResp) error

CreateNotifyLog 创建通知日志

type NotifyTaskModel

type NotifyTaskModel struct {
	*ent.NotifyTaskClient
}

func NewNotifyTaskModel

func NewNotifyTaskModel(client *ent.Client) *NotifyTaskModel

func (*NotifyTaskModel) ProcessNotifyResult

func (m *NotifyTaskModel) ProcessNotifyResult(ctx context.Context, task *ent.NotifyTask, resp *payload.PayOrderNotifyResp) (uint8, error)

func (*NotifyTaskModel) QueryListByNotify

func (m *NotifyTaskModel) QueryListByNotify(ctx context.Context) ([]*ent.NotifyTask, error)

type OrderExtensionModel

type OrderExtensionModel struct {
	*ent.OrderExtensionClient
}

func NewOrderExtensionModel

func NewOrderExtensionModel(client *ent.Client) *OrderExtensionModel

func (*OrderExtensionModel) QueryByNo

func (m *OrderExtensionModel) QueryByNo(ctx context.Context, no string) (*ent.OrderExtension, error)

func (*OrderExtensionModel) UpdateOrderSuccess

func (m *OrderExtensionModel) UpdateOrderSuccess(ctx context.Context, notifyResp *pay.NotifyOrderReq) (*ent.OrderExtension, error)

type OrderModel

type OrderModel struct {
	*ent.OrderClient
}

func NewOrderModel

func NewOrderModel(client *ent.Client) *OrderModel

func (*OrderModel) QueryByAppIdAndMerchantOrderId

func (m *OrderModel) QueryByAppIdAndMerchantOrderId(ctx context.Context, appId uint64, merchantOrderId string) (*ent.Order, error)

func (*OrderModel) QueryPage

func (m *OrderModel) QueryPage(ctx context.Context, in *pay.OrderPageReq) (*ent.OrderPageList, error)

func (*OrderModel) UpdateOrderSuccess

func (m *OrderModel) UpdateOrderSuccess(ctx context.Context, channel *ent.Channel, orderExtension *ent.OrderExtension, notifyResp *pay.NotifyOrderReq) error

func (*OrderModel) ValidateOrderCanSubmit

func (m *OrderModel) ValidateOrderCanSubmit(ctx context.Context, id uint64) (*ent.Order, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL