domain_service.go
5.1 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
package factory
import (
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/domain_service"
)
func CreateUserService(options map[string]interface{}) (service.UserService, error) {
return domain_service.NewUserService()
}
func CreateCompanyService(options map[string]interface{}) (service.CompanyService, error) {
return domain_service.NewCompanyService()
}
func CreateDepartmentService(options map[string]interface{}) (service.DepartmentService, error) {
return domain_service.NewDepartmentService()
}
func CreateOrganizationService(options map[string]interface{}) (service.OrgService, error) {
return domain_service.NewOrganizationService()
}
func CreateCooperationStatisticsService(options map[string]interface{}) (*domain_service.CooperationStatisticsService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domain_service.NewCooperationStatisticsService(transactionContext)
}
func CreateConfirmDividendsIncentivesEstimateService(options map[string]interface{}) (*domain_service.ConfirmDividendsIncentivesEstimateService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domain_service.NewConfirmDividendsIncentivesEstimateService(transactionContext)
}
func CreateConfirmMoneyIncentivesEstimateService(options map[string]interface{}) (*domain_service.ConfirmMoneyIncentivesEstimateService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domain_service.NewConfirmMoneyIncentivesEstimateService(transactionContext)
}
func CreateCancelDividendsEstimateService(options map[string]interface{}) (*domain_service.CancelDividendsEstimateService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domain_service.NewCancelDividendsEstimateService(transactionContext)
}
func CreateAgreeContractApplicationService(options map[string]interface{}) (*domain_service.AgreeContractApplicationService, error) {
//var transactionContext *pgTransaction.TransactionContext
//if value, ok := options["transactionContext"]; ok {
// transactionContext = value.(*pgTransaction.TransactionContext)
//}
//return domain_service.NewAgreeContractApplicationService(transactionContext)
return domain_service.NewAgreeContractApplicationService(nil)
}
func CreateRejectContractApplicationService(options map[string]interface{}) (*domain_service.RejectContractApplicationService, error) {
//var transactionContext *pgTransaction.TransactionContext
//if value, ok := options["transactionContext"]; ok {
// transactionContext = value.(*pgTransaction.TransactionContext)
//}
//return domain_service.NewRejectContractApplicationService(transactionContext)
return domain_service.NewRejectContractApplicationService(nil)
}
func CreateInformJoinCreationContractService(options map[string]interface{}) (*domain_service.InformJoinCreationContractService, error) {
//var transactionContext *pgTransaction.TransactionContext
//if value, ok := options["transactionContext"]; ok {
// transactionContext = value.(*pgTransaction.TransactionContext)
//}
//return domain_service.NewInformJoinCreationContractService(transactionContext)
return domain_service.NewInformJoinCreationContractService(nil)
}
func CreateEstimateDividendsService(options map[string]interface{}) (*domain_service.EstimateDividendsService, error) {
//var transactionContext *pgTransaction.TransactionContext
//if value, ok := options["transactionContext"]; ok {
// transactionContext = value.(*pgTransaction.TransactionContext)
//}
//return domain_service.NewEstimateDividendsService(transactionContext)
return domain_service.NewEstimateDividendsService(nil)
}
func CreateInformDividendsExpectedService(options map[string]interface{}) (*domain_service.InformDividendsExpectedService, error) {
//var transactionContext *pgTransaction.TransactionContext
//if value, ok := options["transactionContext"]; ok {
// transactionContext = value.(*pgTransaction.TransactionContext)
//}
//return domain_service.NewInformDividendsExpectedService(transactionContext)
return domain_service.NewInformDividendsExpectedService(nil)
}
func CreatePayCreditAccountService(options map[string]interface{}) (*domain_service.PayCreditAccountService, error) {
//var transactionContext *pgTransaction.TransactionContext
//if value, ok := options["transactionContext"]; ok {
// transactionContext = value.(*pgTransaction.TransactionContext)
//}
//return domain_service.NewPayCreditAccountService(transactionContext)
return domain_service.NewPayCreditAccountService(nil)
}