repository.go
4.5 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
package factory
import (
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/transaction"
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/repository"
)
//CreatePartnerInfoRepository 合伙人信息
func CreatePartnerInfoRepository(options map[string]interface{}) (domain.PartnerInfoRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewPartnerInfoRepository(transactionContext)
}
//CreateAdminUserRepository 管理员权限信息
func CreateAdminPermissionRepository(options map[string]interface{}) (domain.AdminPermissionRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewAdminPermissionRepository(transactionContext)
}
//CreateOrderBaseRepository 订单信息
func CreateOrderBaseRepository(options map[string]interface{}) (domain.OrderBaseRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewOrderBaseRepository(transactionContext)
}
//CreateOrderGoodRepository 订单信息
func CreateOrderGoodRepository(options map[string]interface{}) (domain.OrderGoodRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewOrderGoodRepository(transactionContext)
}
//CreateOrderGoodRepository 订单货品信息
func CreateUsersRepository(options map[string]interface{}) (domain.UsersRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewUsersRepository(transactionContext)
}
// CreateUsersRepository 公司企业信息
func CreateCompanyRepository(options map[string]interface{}) (domain.CompanyRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewCompanyRepository(transactionContext)
}
// CreatePartnerCategoryRepository 合伙人分类数据
func CreatePartnerCategoryRepository(options map[string]interface{}) (domain.PartnerCategoryRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewPartnerCategoryRepository(transactionContext)
}
// CreateBusinessBonusRepository 业务分红
func CreateBusinessBonusRepository(options map[string]interface{}) (domain.BusinessBonusRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewBusinessBonusRepository(transactionContext)
}
//CreateOrderGoodBestshopRepository 小米(海鲜干货改)的订单商品信息
func CreateOrderGoodBestshopRepository(options map[string]interface{}) (domain.OrderGoodBestshopRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewOrderGoodBestshopRepository(transactionContext)
}
//CreateOrderGoodBestshopRepository 小米(海鲜干货改)订单信息
func CreateOrderBestshopRepository(options map[string]interface{}) (domain.OrderBestshopRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewOrderBestshopRepository(transactionContext)
}
//CreateOrderGoodBestshopRepository小米(海鲜干货改)订单信息
func CreateOrderLogRepository(options map[string]interface{}) (domain.OrderLogRepository, error) {
var transactionContext *transaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*transaction.TransactionContext)
}
return repository.NewOrderLogRepository(transactionContext)
}