作者 yangfu

共创统计服务

... ... @@ -28,13 +28,13 @@ func (svr *CooperationStatisticsService) CooperationContractStatistics(contractS
_ = transactionContext.RollbackTransaction()
}()
contractDividendsService, err := factory.CreateNewCooperationStatisticsService(map[string]interface{}{
statisticsService, err := factory.CreateCooperationStatisticsService(map[string]interface{}{
"transactionContext": transactionContext,
})
var res interface{}
switch contractStatisticsQuery.Action {
case domain_service.ContractDividends:
res, err = contractDividendsService.SearchContractDividends(contractStatisticsQuery.QueryOptions)
res, err = statisticsService.SearchContractDividends(contractStatisticsQuery.QueryOptions)
}
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
... ... @@ -22,10 +22,10 @@ func CreateOrganizationService(options map[string]interface{}) (service.OrgServi
return domain_service.NewOrganizationService()
}
func CreateContractDividendsService(options map[string]interface{}) (*domain_service.ContractStatisticsService, error) {
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.NewContractStatisticsService(transactionContext)
return domain_service.NewCooperationStatisticsService(transactionContext)
}
... ...