cooperation_contract.go
2.4 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
package service
import (
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/query"
)
// 共创合约管理
type CooperationContractService struct {
}
// 创建共创合约管理
func (cooperationContractService *CooperationContractService) CreateCooperationContract(createCooperationContractCommand *command.CreateCooperationContractCommand) (interface{}, error) {
if err := createCooperationContractCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
return nil, nil
}
// 暂停恢复共创合约
func (cooperationContractService *CooperationContractService) EnableCooperationContract(enableCooperationContractCommand *command.EnableCooperationContractCommand) (interface{}, error) {
if err := enableCooperationContractCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
return nil, nil
}
// 返回共创合约管理
func (cooperationContractService *CooperationContractService) GetCooperationContract(getCooperationContractQuery *query.GetCooperationContractQuery) (interface{}, error) {
if err := getCooperationContractQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
return nil, nil
}
// 返回共创合约管理列表
func (cooperationContractService *CooperationContractService) ListCooperationContract(listCooperationContractQuery *query.ListCooperationContractQuery) (interface{}, error) {
if err := listCooperationContractQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
return nil, nil
}
// 更新共创合约管理
func (cooperationContractService *CooperationContractService) UpdateCooperationContract(updateCooperationContractCommand *command.UpdateCooperationContractCommand) (interface{}, error) {
if err := updateCooperationContractCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
return nil, nil
}
func NewCooperationContractService(options map[string]interface{}) *CooperationContractService {
newCooperationContractService := &CooperationContractService{}
return newCooperationContractService
}