domain_service.go 587 字节
package factory

import (
	"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain/service"
	"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/domainService"
	"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/transaction"
)

func CreateOrderBonusService(options map[string]interface{}) (service.OrderBonusService, error) {
	var transactionContext *transaction.TransactionContext
	if value, ok := options["transactionContext"]; ok {
		transactionContext = value.(*transaction.TransactionContext)
	}
	return domainService.NewOrderBonusService(transactionContext), nil
}