domain_service.go
4.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
package factory
import (
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
"gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain/service"
domainService "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/domain_service"
)
func CreateReadSentNotificationService(options map[string]interface{}) (service.ReadSentNotificationService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewReadSentNotificationService(transactionContext)
}
func CreateReadAllUnReadSentNotificationService(options map[string]interface{}) (service.ReadAllUnReadSentNotificationService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewReadAllUnReadSentNotificationService(transactionContext)
}
func CreateOperationSuMoneyService(options map[string]interface{}) (service.OperationSuMoneyService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewOperationSuMoneyService(transactionContext)
}
func CreateRejectTaskReceiverService(options map[string]interface{}) (service.RejectTaskReceiverService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewRejectTaskReceiverService(transactionContext)
}
func CreateConfirmRobTaskService(options map[string]interface{}) (service.ConfirmRobTaskService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewConfirmRobTaskService(transactionContext)
}
func CreateReleaseTaskService(options map[string]interface{}) (service.ReleaseTaskService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewReleaseTaskService(transactionContext)
}
func CreateOffTaskService(options map[string]interface{}) (service.OffTaskService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewOffTaskService(transactionContext)
}
func CreateRobTaskService(options map[string]interface{}) (service.RobTaskService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewRobTaskService(transactionContext)
}
func CreateBidTaskService(options map[string]interface{}) (service.BidTaskService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewBidTaskService(transactionContext)
}
func CreateChooseSuccessfulBidderService(options map[string]interface{}) (service.ChooseSuccessfulBidderService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewChooseSuccessfulBidderService(transactionContext)
}
func CreateApplyCompleteTaskService(options map[string]interface{}) (service.ApplyCompleteTaskService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewApplyCompleteTaskService(transactionContext)
}
func CreateAcceptanceTaskService(options map[string]interface{}) (service.AcceptanceTaskService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewAcceptanceTaskService(transactionContext)
}
func CreateExchangeSuMoneyService(options map[string]interface{}) (service.ExchangeSuMoneyService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewExchangeSuMoneyService(transactionContext)
}