正在显示
6 个修改的文件
包含
22 行增加
和
75 行删除
@@ -14,9 +14,6 @@ type CooperationApplicationService struct { | @@ -14,9 +14,6 @@ type CooperationApplicationService struct { | ||
14 | // 审核共创申请 | 14 | // 审核共创申请 |
15 | func (cooperationApplicationService *CooperationApplicationService) AuditCooperationApplication( | 15 | func (cooperationApplicationService *CooperationApplicationService) AuditCooperationApplication( |
16 | auditCooperationApplicationCommand *command.AuditCooperationApplicationCommand) (interface{}, error) { | 16 | auditCooperationApplicationCommand *command.AuditCooperationApplicationCommand) (interface{}, error) { |
17 | - if err := auditCooperationApplicationCommand.ValidateCommand(); err != nil { | ||
18 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
19 | - } | ||
20 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 17 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
21 | auditCooperationApplicationCommand.Operator) | 18 | auditCooperationApplicationCommand.Operator) |
22 | 19 | ||
@@ -35,9 +32,7 @@ func (cooperationApplicationService *CooperationApplicationService) AuditCoopera | @@ -35,9 +32,7 @@ func (cooperationApplicationService *CooperationApplicationService) AuditCoopera | ||
35 | 32 | ||
36 | // 返回共创申请管理 | 33 | // 返回共创申请管理 |
37 | func (cooperationApplicationService *CooperationApplicationService) GetCooperationApplication(getCooperationApplicationQuery *query.GetCooperationApplicationQuery) (interface{}, error) { | 34 | func (cooperationApplicationService *CooperationApplicationService) GetCooperationApplication(getCooperationApplicationQuery *query.GetCooperationApplicationQuery) (interface{}, error) { |
38 | - if err := getCooperationApplicationQuery.ValidateQuery(); err != nil { | ||
39 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
40 | - } | 35 | + |
41 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationApplicationQuery.Operator) | 36 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationApplicationQuery.Operator) |
42 | applicationResult, err := creationCooperationGateway.CooperationApplicationGet(allied_creation_cooperation.ReqCooperationApplicationGet{ | 37 | applicationResult, err := creationCooperationGateway.CooperationApplicationGet(allied_creation_cooperation.ReqCooperationApplicationGet{ |
43 | CooperationApplicationId: getCooperationApplicationQuery.CooperationApplicationId, | 38 | CooperationApplicationId: getCooperationApplicationQuery.CooperationApplicationId, |
@@ -16,9 +16,7 @@ type CooperationContractService struct { | @@ -16,9 +16,7 @@ type CooperationContractService struct { | ||
16 | 16 | ||
17 | // 创建共创合约管理 | 17 | // 创建共创合约管理 |
18 | func (cooperationContractService *CooperationContractService) CreateCooperationContract(createCooperationContractCommand *command.CreateCooperationContractCommand) (interface{}, error) { | 18 | func (cooperationContractService *CooperationContractService) CreateCooperationContract(createCooperationContractCommand *command.CreateCooperationContractCommand) (interface{}, error) { |
19 | - if err := createCooperationContractCommand.ValidateCommand(); err != nil { | ||
20 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
21 | - } | 19 | + |
22 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationContractCommand.Operator) | 20 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationContractCommand.Operator) |
23 | rules1 := []allied_creation_cooperation.DividendsIncentivesRule{} | 21 | rules1 := []allied_creation_cooperation.DividendsIncentivesRule{} |
24 | for _, v := range createCooperationContractCommand.DividendsIncentivesRules { | 22 | for _, v := range createCooperationContractCommand.DividendsIncentivesRules { |
@@ -84,9 +82,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC | @@ -84,9 +82,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC | ||
84 | 82 | ||
85 | // 暂停恢复共创合约 | 83 | // 暂停恢复共创合约 |
86 | func (cooperationContractService *CooperationContractService) EnableCooperationContract(enableCooperationContractCommand *command.EnableCooperationContractCommand) (interface{}, error) { | 84 | func (cooperationContractService *CooperationContractService) EnableCooperationContract(enableCooperationContractCommand *command.EnableCooperationContractCommand) (interface{}, error) { |
87 | - if err := enableCooperationContractCommand.ValidateCommand(); err != nil { | ||
88 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
89 | - } | 85 | + |
90 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(enableCooperationContractCommand.Operator) | 86 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(enableCooperationContractCommand.Operator) |
91 | _, err := creationCooperationGateway.CooperationContractsBatchOperate(allied_creation_cooperation.ReqCooperationContractsBatchOperate{ | 87 | _, err := creationCooperationGateway.CooperationContractsBatchOperate(allied_creation_cooperation.ReqCooperationContractsBatchOperate{ |
92 | CooperationContractIds: enableCooperationContractCommand.CooperationContractId, | 88 | CooperationContractIds: enableCooperationContractCommand.CooperationContractId, |
@@ -100,9 +96,7 @@ func (cooperationContractService *CooperationContractService) EnableCooperationC | @@ -100,9 +96,7 @@ func (cooperationContractService *CooperationContractService) EnableCooperationC | ||
100 | 96 | ||
101 | // 返回共创合约详情 | 97 | // 返回共创合约详情 |
102 | func (cooperationContractService *CooperationContractService) GetCooperationContract(getCooperationContractQuery *query.GetCooperationContractQuery) (interface{}, error) { | 98 | func (cooperationContractService *CooperationContractService) GetCooperationContract(getCooperationContractQuery *query.GetCooperationContractQuery) (interface{}, error) { |
103 | - if err := getCooperationContractQuery.ValidateQuery(); err != nil { | ||
104 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
105 | - } | 99 | + |
106 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationContractQuery.Operator) | 100 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationContractQuery.Operator) |
107 | result, err := creationCooperationGateway.CooperationContractGet(allied_creation_cooperation.ReqCooperationContractGet{ | 101 | result, err := creationCooperationGateway.CooperationContractGet(allied_creation_cooperation.ReqCooperationContractGet{ |
108 | CooperationContractId: getCooperationContractQuery.CooperationContractId, | 102 | CooperationContractId: getCooperationContractQuery.CooperationContractId, |
@@ -117,9 +111,7 @@ func (cooperationContractService *CooperationContractService) GetCooperationCont | @@ -117,9 +111,7 @@ func (cooperationContractService *CooperationContractService) GetCooperationCont | ||
117 | // 返回共创合约管理列表 | 111 | // 返回共创合约管理列表 |
118 | func (cooperationContractService *CooperationContractService) ListCooperationContract( | 112 | func (cooperationContractService *CooperationContractService) ListCooperationContract( |
119 | listCooperationContractQuery *query.ListCooperationContractQuery) (int, interface{}, error) { | 113 | listCooperationContractQuery *query.ListCooperationContractQuery) (int, interface{}, error) { |
120 | - if err := listCooperationContractQuery.ValidateQuery(); err != nil { | ||
121 | - return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
122 | - } | 114 | + |
123 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationContractQuery.Operator) | 115 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationContractQuery.Operator) |
124 | result, err := creationCooperationGateway.CooperationContractSearch(allied_creation_cooperation.ReqCooperationContractSearch{ | 116 | result, err := creationCooperationGateway.CooperationContractSearch(allied_creation_cooperation.ReqCooperationContractSearch{ |
125 | PageNumber: listCooperationContractQuery.PageNumber, | 117 | PageNumber: listCooperationContractQuery.PageNumber, |
@@ -141,9 +133,7 @@ func (cooperationContractService *CooperationContractService) ListCooperationCon | @@ -141,9 +133,7 @@ func (cooperationContractService *CooperationContractService) ListCooperationCon | ||
141 | 133 | ||
142 | // 更新共创合约管理 | 134 | // 更新共创合约管理 |
143 | func (cooperationContractService *CooperationContractService) UpdateCooperationContract(updateCooperationContractCommand *command.UpdateCooperationContractCommand) (interface{}, error) { | 135 | func (cooperationContractService *CooperationContractService) UpdateCooperationContract(updateCooperationContractCommand *command.UpdateCooperationContractCommand) (interface{}, error) { |
144 | - if err := updateCooperationContractCommand.ValidateCommand(); err != nil { | ||
145 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
146 | - } | 136 | + |
147 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationContractCommand.Operator) | 137 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationContractCommand.Operator) |
148 | rules1 := []allied_creation_cooperation.DividendsIncentivesRule{} | 138 | rules1 := []allied_creation_cooperation.DividendsIncentivesRule{} |
149 | for _, v := range updateCooperationContractCommand.DividendsIncentivesRules { | 139 | for _, v := range updateCooperationContractCommand.DividendsIncentivesRules { |
@@ -14,9 +14,7 @@ type CooperationModeService struct { | @@ -14,9 +14,7 @@ type CooperationModeService struct { | ||
14 | 14 | ||
15 | //CreateCooperationMode 创建共创模式服务 | 15 | //CreateCooperationMode 创建共创模式服务 |
16 | func (cooperationModeService *CooperationModeService) CreateCooperationMode(createCooperationModeCommand *command.CreateCooperationModeCommand) (interface{}, error) { | 16 | func (cooperationModeService *CooperationModeService) CreateCooperationMode(createCooperationModeCommand *command.CreateCooperationModeCommand) (interface{}, error) { |
17 | - if err := createCooperationModeCommand.ValidateCommand(); err != nil { | ||
18 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
19 | - } | 17 | + |
20 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationModeCommand.Operator) | 18 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationModeCommand.Operator) |
21 | result, err := creationCooperationGateway.CooperationModeAdd(allied_creation_cooperation.ReqCooperationModeAdd{ | 19 | result, err := creationCooperationGateway.CooperationModeAdd(allied_creation_cooperation.ReqCooperationModeAdd{ |
22 | CooperationModeName: createCooperationModeCommand.CooperationModeName, | 20 | CooperationModeName: createCooperationModeCommand.CooperationModeName, |
@@ -38,9 +36,6 @@ func (cooperationModeService *CooperationModeService) CreateCooperationMode(crea | @@ -38,9 +36,6 @@ func (cooperationModeService *CooperationModeService) CreateCooperationMode(crea | ||
38 | 36 | ||
39 | //GetCooperationMode 返回共创模式服务 | 37 | //GetCooperationMode 返回共创模式服务 |
40 | func (cooperationModeService *CooperationModeService) GetCooperationMode(getCooperationModeQuery *query.GetCooperationModeQuery) (interface{}, error) { | 38 | func (cooperationModeService *CooperationModeService) GetCooperationMode(getCooperationModeQuery *query.GetCooperationModeQuery) (interface{}, error) { |
41 | - if err := getCooperationModeQuery.ValidateQuery(); err != nil { | ||
42 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
43 | - } | ||
44 | 39 | ||
45 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationModeQuery.Operator) | 40 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationModeQuery.Operator) |
46 | result, err := creationCooperationGateway.CooperationModeGet(allied_creation_cooperation.ReqCooperationModeGet{ | 41 | result, err := creationCooperationGateway.CooperationModeGet(allied_creation_cooperation.ReqCooperationModeGet{ |
@@ -62,9 +57,7 @@ func (cooperationModeService *CooperationModeService) GetCooperationMode(getCoop | @@ -62,9 +57,7 @@ func (cooperationModeService *CooperationModeService) GetCooperationMode(getCoop | ||
62 | 57 | ||
63 | //ListCooperationMode 返回共创模式服务列表 | 58 | //ListCooperationMode 返回共创模式服务列表 |
64 | func (cooperationModeService *CooperationModeService) ListCooperationMode(listCooperationModeQuery *query.ListCooperationModeQuery) (int64, interface{}, error) { | 59 | func (cooperationModeService *CooperationModeService) ListCooperationMode(listCooperationModeQuery *query.ListCooperationModeQuery) (int64, interface{}, error) { |
65 | - if err := listCooperationModeQuery.ValidateQuery(); err != nil { | ||
66 | - return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
67 | - } | 60 | + |
68 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationModeQuery.Operator) | 61 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationModeQuery.Operator) |
69 | result, err := creationCooperationGateway.CooperationModesSearch(allied_creation_cooperation.ReqCooperationModesSearch{ | 62 | result, err := creationCooperationGateway.CooperationModesSearch(allied_creation_cooperation.ReqCooperationModesSearch{ |
70 | PageNumber: listCooperationModeQuery.PageNumber, | 63 | PageNumber: listCooperationModeQuery.PageNumber, |
@@ -99,9 +92,7 @@ func (cooperationModeService *CooperationModeService) ListCooperationMode(listCo | @@ -99,9 +92,7 @@ func (cooperationModeService *CooperationModeService) ListCooperationMode(listCo | ||
99 | 92 | ||
100 | //RemoveCooperationMode 移除共创模式服务 | 93 | //RemoveCooperationMode 移除共创模式服务 |
101 | func (cooperationModeService *CooperationModeService) RemoveCooperationMode(removeCooperationModeCommand *command.RemoveCooperationModeCommand) (interface{}, error) { | 94 | func (cooperationModeService *CooperationModeService) RemoveCooperationMode(removeCooperationModeCommand *command.RemoveCooperationModeCommand) (interface{}, error) { |
102 | - if err := removeCooperationModeCommand.ValidateCommand(); err != nil { | ||
103 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
104 | - } | 95 | + |
105 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeCooperationModeCommand.Operator) | 96 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeCooperationModeCommand.Operator) |
106 | _, err := creationCooperationGateway.CooperationModeBatchRemove(allied_creation_cooperation.ReqCooperationModeBatchRemove{ | 97 | _, err := creationCooperationGateway.CooperationModeBatchRemove(allied_creation_cooperation.ReqCooperationModeBatchRemove{ |
107 | CooperationModeIds: removeCooperationModeCommand.CooperationModeId, | 98 | CooperationModeIds: removeCooperationModeCommand.CooperationModeId, |
@@ -114,9 +105,7 @@ func (cooperationModeService *CooperationModeService) RemoveCooperationMode(remo | @@ -114,9 +105,7 @@ func (cooperationModeService *CooperationModeService) RemoveCooperationMode(remo | ||
114 | 105 | ||
115 | //UpdateCooperationMode 更新共创模式 | 106 | //UpdateCooperationMode 更新共创模式 |
116 | func (cooperationModeService *CooperationModeService) UpdateCooperationMode(updateCooperationModeCommand *command.UpdateCooperationModeCommand) (interface{}, error) { | 107 | func (cooperationModeService *CooperationModeService) UpdateCooperationMode(updateCooperationModeCommand *command.UpdateCooperationModeCommand) (interface{}, error) { |
117 | - if err := updateCooperationModeCommand.ValidateCommand(); err != nil { | ||
118 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
119 | - } | 108 | + |
120 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationModeCommand.Operator) | 109 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationModeCommand.Operator) |
121 | _, err := creationCooperationGateway.CooperationModeUpdate(allied_creation_cooperation.ReqCooperationModeUpdate{ | 110 | _, err := creationCooperationGateway.CooperationModeUpdate(allied_creation_cooperation.ReqCooperationModeUpdate{ |
122 | CooperationModeId: updateCooperationModeCommand.CooperationModeId, | 111 | CooperationModeId: updateCooperationModeCommand.CooperationModeId, |
@@ -132,9 +121,7 @@ func (cooperationModeService *CooperationModeService) UpdateCooperationMode(upda | @@ -132,9 +121,7 @@ func (cooperationModeService *CooperationModeService) UpdateCooperationMode(upda | ||
132 | 121 | ||
133 | // EnableCooperationMode 禁用启用共创模式 | 122 | // EnableCooperationMode 禁用启用共创模式 |
134 | func (cooperationModeService *CooperationModeService) EnableCooperationMode(updateCooperationModeCommand *command.OperateCooperationModeCommand) (interface{}, error) { | 123 | func (cooperationModeService *CooperationModeService) EnableCooperationMode(updateCooperationModeCommand *command.OperateCooperationModeCommand) (interface{}, error) { |
135 | - if err := updateCooperationModeCommand.ValidateCommand(); err != nil { | ||
136 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
137 | - } | 124 | + |
138 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationModeCommand.Operator) | 125 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationModeCommand.Operator) |
139 | _, err := creationCooperationGateway.CooperationModeOperate(allied_creation_cooperation.ReqOperateCooperationMode{ | 126 | _, err := creationCooperationGateway.CooperationModeOperate(allied_creation_cooperation.ReqOperateCooperationMode{ |
140 | CooperationModeId: updateCooperationModeCommand.CooperationModeId, | 127 | CooperationModeId: updateCooperationModeCommand.CooperationModeId, |
@@ -16,9 +16,7 @@ type CooperationProjectService struct { | @@ -16,9 +16,7 @@ type CooperationProjectService struct { | ||
16 | 16 | ||
17 | // 创建共创项目管理 | 17 | // 创建共创项目管理 |
18 | func (cooperationProjectService *CooperationProjectService) CreateCooperationProject(createCooperationProjectCommand *command.CreateCooperationProjectCommand) (interface{}, error) { | 18 | func (cooperationProjectService *CooperationProjectService) CreateCooperationProject(createCooperationProjectCommand *command.CreateCooperationProjectCommand) (interface{}, error) { |
19 | - if err := createCooperationProjectCommand.ValidateCommand(); err != nil { | ||
20 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
21 | - } | 19 | + |
22 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator) | 20 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator) |
23 | 21 | ||
24 | result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{ | 22 | result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{ |
@@ -47,9 +45,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro | @@ -47,9 +45,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro | ||
47 | 45 | ||
48 | // 结束共创项目管理 | 46 | // 结束共创项目管理 |
49 | func (cooperationProjectService *CooperationProjectService) EndCooperationProject(endCooperationProjectCommand *command.EndCooperationProjectCommand) (interface{}, error) { | 47 | func (cooperationProjectService *CooperationProjectService) EndCooperationProject(endCooperationProjectCommand *command.EndCooperationProjectCommand) (interface{}, error) { |
50 | - if err := endCooperationProjectCommand.ValidateCommand(); err != nil { | ||
51 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
52 | - } | 48 | + |
53 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(endCooperationProjectCommand.Operator) | 49 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(endCooperationProjectCommand.Operator) |
54 | _, err := creationCooperationGateway.CooperationProjectBatchEnd(allied_creation_cooperation.ReqCooperationProjectBatchEnd{ | 50 | _, err := creationCooperationGateway.CooperationProjectBatchEnd(allied_creation_cooperation.ReqCooperationProjectBatchEnd{ |
55 | CooperationProjectIds: endCooperationProjectCommand.CooperationProjectId, | 51 | CooperationProjectIds: endCooperationProjectCommand.CooperationProjectId, |
@@ -62,9 +58,7 @@ func (cooperationProjectService *CooperationProjectService) EndCooperationProjec | @@ -62,9 +58,7 @@ func (cooperationProjectService *CooperationProjectService) EndCooperationProjec | ||
62 | 58 | ||
63 | // 返回共创项目管理 | 59 | // 返回共创项目管理 |
64 | func (cooperationProjectService *CooperationProjectService) GetCooperationProject(getCooperationProjectQuery *query.GetCooperationProjectQuery) (interface{}, error) { | 60 | func (cooperationProjectService *CooperationProjectService) GetCooperationProject(getCooperationProjectQuery *query.GetCooperationProjectQuery) (interface{}, error) { |
65 | - if err := getCooperationProjectQuery.ValidateQuery(); err != nil { | ||
66 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
67 | - } | 61 | + |
68 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationProjectQuery.Operator) | 62 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationProjectQuery.Operator) |
69 | resultProject, err := creationCooperationGateway.CooperationProjectGet(allied_creation_cooperation.ReqCooperationProjectGet{ | 63 | resultProject, err := creationCooperationGateway.CooperationProjectGet(allied_creation_cooperation.ReqCooperationProjectGet{ |
70 | CooperationProjectId: getCooperationProjectQuery.CooperationProjectId, | 64 | CooperationProjectId: getCooperationProjectQuery.CooperationProjectId, |
@@ -98,9 +92,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec | @@ -98,9 +92,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec | ||
98 | 92 | ||
99 | // 返回共创项目管理列表 | 93 | // 返回共创项目管理列表 |
100 | func (cooperationProjectService *CooperationProjectService) ListCooperationProject(listCooperationProjectQuery *query.ListCooperationProjectQuery) (int64, interface{}, error) { | 94 | func (cooperationProjectService *CooperationProjectService) ListCooperationProject(listCooperationProjectQuery *query.ListCooperationProjectQuery) (int64, interface{}, error) { |
101 | - if err := listCooperationProjectQuery.ValidateQuery(); err != nil { | ||
102 | - return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
103 | - } | 95 | + |
104 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationProjectQuery.Operator) | 96 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationProjectQuery.Operator) |
105 | result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{ | 97 | result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{ |
106 | PageNumber: listCooperationProjectQuery.PageNumber, | 98 | PageNumber: listCooperationProjectQuery.PageNumber, |
@@ -130,9 +122,7 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | @@ -130,9 +122,7 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | ||
130 | 122 | ||
131 | // 更新共创项目管理 | 123 | // 更新共创项目管理 |
132 | func (cooperationProjectService *CooperationProjectService) UpdateCooperationProject(updateCooperationProjectCommand *command.UpdateCooperationProjectCommand) (interface{}, error) { | 124 | func (cooperationProjectService *CooperationProjectService) UpdateCooperationProject(updateCooperationProjectCommand *command.UpdateCooperationProjectCommand) (interface{}, error) { |
133 | - if err := updateCooperationProjectCommand.ValidateCommand(); err != nil { | ||
134 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
135 | - } | 125 | + |
136 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator) | 126 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator) |
137 | _, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{ | 127 | _, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{ |
138 | CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId, | 128 | CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId, |
@@ -16,9 +16,7 @@ type DividendsOrderService struct { | @@ -16,9 +16,7 @@ type DividendsOrderService struct { | ||
16 | 16 | ||
17 | // 创建分红订单实体对象 | 17 | // 创建分红订单实体对象 |
18 | func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createDividendsOrderCommand *command.CreateDividendsOrderCommand) (interface{}, error) { | 18 | func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createDividendsOrderCommand *command.CreateDividendsOrderCommand) (interface{}, error) { |
19 | - // if err := createDividendsOrderCommand.ValidateCommand(); err != nil { | ||
20 | - // return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
21 | - // } | 19 | + |
22 | orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{} | 20 | orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{} |
23 | for _, v := range createDividendsOrderCommand.OrderGoods { | 21 | for _, v := range createDividendsOrderCommand.OrderGoods { |
24 | good := allied_creation_cooperation.DividendsOrderGoodAdd{ | 22 | good := allied_creation_cooperation.DividendsOrderGoodAdd{ |
@@ -68,9 +66,6 @@ func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividen | @@ -68,9 +66,6 @@ func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividen | ||
68 | 66 | ||
69 | // 移除分红订单实体对象 | 67 | // 移除分红订单实体对象 |
70 | func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeDividendsOrderCommand *command.RemoveDividendsOrderCommand) (interface{}, error) { | 68 | func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeDividendsOrderCommand *command.RemoveDividendsOrderCommand) (interface{}, error) { |
71 | - // if err := removeDividendsOrderCommand.ValidateCommand(); err != nil { | ||
72 | - // return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
73 | - // } | ||
74 | 69 | ||
75 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeDividendsOrderCommand.Operator) | 70 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeDividendsOrderCommand.Operator) |
76 | _, err := creationCooperationGateway.DividendsOrderBatchRemove(allied_creation_cooperation.ReqDividendsOrderBatchRemove{ | 71 | _, err := creationCooperationGateway.DividendsOrderBatchRemove(allied_creation_cooperation.ReqDividendsOrderBatchRemove{ |
@@ -105,9 +100,7 @@ func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchD | @@ -105,9 +100,7 @@ func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchD | ||
105 | 100 | ||
106 | // 更新分红订单实体对象 | 101 | // 更新分红订单实体对象 |
107 | func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateDividendsOrderCommand *command.UpdateDividendsOrderCommand) (interface{}, error) { | 102 | func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateDividendsOrderCommand *command.UpdateDividendsOrderCommand) (interface{}, error) { |
108 | - // if err := updateDividendsOrderCommand.ValidateCommand(); err != nil { | ||
109 | - // return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
110 | - // } | 103 | + |
111 | orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{} | 104 | orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{} |
112 | for _, v := range updateDividendsOrderCommand.OrderGoods { | 105 | for _, v := range updateDividendsOrderCommand.OrderGoods { |
113 | good := allied_creation_cooperation.DividendsOrderGoodAdd{ | 106 | good := allied_creation_cooperation.DividendsOrderGoodAdd{ |
@@ -17,9 +17,7 @@ type NoticeSettingService struct { | @@ -17,9 +17,7 @@ type NoticeSettingService struct { | ||
17 | 17 | ||
18 | //NoticeSettingList 推送消息配置列表 | 18 | //NoticeSettingList 推送消息配置列表 |
19 | func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettingListQuery *query.NoticeSettingListQuery) (int64, interface{}, error) { | 19 | func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettingListQuery *query.NoticeSettingListQuery) (int64, interface{}, error) { |
20 | - if err := noticeSettingListQuery.ValidateQuery(); err != nil { | ||
21 | - return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
22 | - } | 20 | + |
23 | creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic( | 21 | creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic( |
24 | noticeSettingListQuery.Operator, | 22 | noticeSettingListQuery.Operator, |
25 | ) | 23 | ) |
@@ -73,9 +71,7 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin | @@ -73,9 +71,7 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin | ||
73 | 71 | ||
74 | //NoticeSettingProfile 推送消息配置需求的参数候选项 | 72 | //NoticeSettingProfile 推送消息配置需求的参数候选项 |
75 | func (noticeSettingService *NoticeSettingService) NoticeSettingProfile(noticeSettingProfileQuery *query.NoticeSettingProfileQuery) (interface{}, error) { | 73 | func (noticeSettingService *NoticeSettingService) NoticeSettingProfile(noticeSettingProfileQuery *query.NoticeSettingProfileQuery) (interface{}, error) { |
76 | - if err := noticeSettingProfileQuery.ValidateQuery(); err != nil { | ||
77 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
78 | - } | 74 | + |
79 | creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic( | 75 | creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic( |
80 | noticeSettingProfileQuery.Operator, | 76 | noticeSettingProfileQuery.Operator, |
81 | ) | 77 | ) |
@@ -110,9 +106,7 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingUpdate(noticeSett | @@ -110,9 +106,7 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingUpdate(noticeSett | ||
110 | 106 | ||
111 | // NoticeSettingUpdate 添加配置 | 107 | // NoticeSettingUpdate 添加配置 |
112 | func (noticeSettingService *NoticeSettingService) NoticeSettingAdd(noticeSettingAddCommand *command.NoticeSettingAddCommand) (interface{}, error) { | 108 | func (noticeSettingService *NoticeSettingService) NoticeSettingAdd(noticeSettingAddCommand *command.NoticeSettingAddCommand) (interface{}, error) { |
113 | - if err := noticeSettingAddCommand.ValidateCommand(); err != nil { | ||
114 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
115 | - } | 109 | + |
116 | creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic( | 110 | creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic( |
117 | noticeSettingAddCommand.Operator, | 111 | noticeSettingAddCommand.Operator, |
118 | ) | 112 | ) |
@@ -139,9 +133,7 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingAdd(noticeSetting | @@ -139,9 +133,7 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingAdd(noticeSetting | ||
139 | 133 | ||
140 | // NoticeSettingGet 获取配置 | 134 | // NoticeSettingGet 获取配置 |
141 | func (noticeSettingService *NoticeSettingService) NoticeSettingGet(noticeSettingGetQuery *query.NoticeSettingGetQuery) (interface{}, error) { | 135 | func (noticeSettingService *NoticeSettingService) NoticeSettingGet(noticeSettingGetQuery *query.NoticeSettingGetQuery) (interface{}, error) { |
142 | - if err := noticeSettingGetQuery.ValidateQuery(); err != nil { | ||
143 | - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
144 | - } | 136 | + |
145 | creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic( | 137 | creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic( |
146 | noticeSettingGetQuery.Operator, | 138 | noticeSettingGetQuery.Operator, |
147 | ) | 139 | ) |
-
请 注册 或 登录 后发表评论