// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================

package service

import (
	"context"
	"kami/internal/consts"
	"kami/internal/model"
	"kami/internal/model/entity"
	"time"

	"github.com/gogf/gf/v2/database/gdb"
)

type (
	IRechargeTMallGameOrder interface {
		// UpdateOrderStatusByAccountNumberAndStatus 更新指定号码的订单状态
		UpdateOrderStatusByAccountNumberAndStatus(ctx context.Context, input *model.UpdateOrderStatusInput) (err error)
		// UpdateOrderStatusByTBOrderNo 更新指定订单号的订单状态
		UpdateOrderStatusByTBOrderNo(ctx context.Context, input *model.UpdateOrderStatusByTBOrderNoInput, tx gdb.TX) (err error)
		// CallbackOrder 回调订单给第三方
		CallbackOrder(ctx context.Context, data *entity.V1RechargeTMallOrder) (bool, error)
		CallBackOrderToUpstream(ctx context.Context, orderNo string) (err error)
		AddOrderHistory(ctx context.Context, input *model.AddAgisoCallBackHistoryInput, tx gdb.TX) (err error)
		AddShopHistory(ctx context.Context, input *model.AddOrderShopHistoryInput, tx gdb.TX) (err error)
		// GetHistoryList 获取订单详情
		GetHistoryList(ctx context.Context, orderNo string) (output []*entity.V1RechargeTMallOrderHistory, err error)
		// GetShopHistoryList 获取淘宝订单详情
		GetShopHistoryList(ctx context.Context, shopId int64) (output []*entity.V1RechargeTMallShopHistory, err error)
		List(ctx context.Context, input *model.RechargeTMallGameOrderListInput) (total int, data []model.RechargeTMallGameOrderListOutput, err error)
		// Create 创建订单
		Create(ctx context.Context, input *model.RechargeTMallGameOrderCreateInput) (orderNo string, err error)
		// GetById 根据Id获取单个订单
		GetById(ctx context.Context, orderNo string, tx gdb.TX) (data *entity.V1RechargeTMallOrder, err error)
		// GetByShopId 根据天猫订单关联查找对应订单
		GetByShopId(ctx context.Context, shopOrderId int64, tx gdb.TX) (data *entity.V1RechargeTMallOrder, err error)
		// AssociateCreatedOrderAndStatus 淘宝订单相互关联
		AssociateCreatedOrderAndStatus(ctx context.Context, input *model.AssociateCreatedOrderAndStatusInput, tx gdb.TX) (err error)
		// GetAllCreatedAccount 查询出所有正在创建状态的账号信息
		GetAllCreatedAccount(ctx context.Context, tx gdb.TX) (data []model.RechargeTMallGameAccountOutput, err error)
		// AddAgisoCallBackBaseInfo 返回阿奇索基基本回调数据
		AddAgisoCallBackBaseInfo(ctx context.Context, input *model.AddAgisoCallBackBaseInfoInput, tx gdb.TX) (id int64, err error)
		// UpdateTMallCallBackInfo 返回淘宝详细订单数据
		UpdateTMallCallBackInfo(ctx context.Context, input *model.UpdateAgisoCallBackInfoInput, tx gdb.TX) (err error)
		ShopList(ctx context.Context, input *model.RechargeTMallGameShopOrderListInput) (total int, data []*entity.V1RechargeTMallShop, err error)
		// GetShopOne 获取订单详情
		GetShopOne(ctx context.Context, shopOrderId int64) (res *entity.V1RechargeTMallShop, err error)
		// GetShopOneByTid 根据天猫ID获取订单
		GetShopOneByTid(ctx context.Context, iId string, tx gdb.TX) (data *entity.V1RechargeTMallShop, err error)
		// IsExist 判断当前订单是否存在
		IsExist(ctx context.Context, tMallOrderNo string) (bool, error)
		// UpdateEndTime 更新订单确认收货时间
		UpdateEndTime(ctx context.Context, shopId int64)
		// GetRecentOrdersByStatus 获取已经支付过的支付宝订单
		GetRecentOrdersByStatus(ctx context.Context, status consts.RechargeTMallGameOrder, duration time.Duration, tx gdb.TX) (data []entity.V1RechargeTMallShop, err error)
		// GetShopOrderByOrderNo 通过淘宝订单号获取淘宝订单信息
		GetShopOrderByOrderNo(ctx context.Context, orderNo string, tx gdb.TX) (data *entity.V1RechargeTMallShop, err error)
		// UpdateShopOrderStatusById 修改shop订单状态
		UpdateShopOrderStatusById(ctx context.Context, id int, status consts.EnumShopStatus, tx gdb.TX) (err error)
		// ModifyCallBackStatus 修改回调状态
		ModifyCallBackStatus(ctx context.Context, orderNo string, callbackStatus bool, tx gdb.TX) (err error)
		// GetOrderSummary 获取订单统计
		GetOrderSummary(ctx context.Context, input *model.TMallSummaryListRecordInput) (total int, record []model.TMallSummaryListRecordOutput, err error)
		GetOrderStats(ctx context.Context, input *model.TMallGameStatsInput) (output *model.TMallGameStatsOutput, err error)
	}
)

var (
	localRechargeTMallGameOrder IRechargeTMallGameOrder
)

func RechargeTMallGameOrder() IRechargeTMallGameOrder {
	if localRechargeTMallGameOrder == nil {
		panic("implement not found for interface IRechargeTMallGameOrder, forgot register?")
	}
	return localRechargeTMallGameOrder
}

func RegisterRechargeTMallGameOrder(i IRechargeTMallGameOrder) {
	localRechargeTMallGameOrder = i
}
