作者 陈志颖

fix:修复分红订单新增错误

@@ -130,10 +130,11 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD @@ -130,10 +130,11 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
130 } 130 }
131 131
132 // 查找合约 132 // 查找合约
133 - var cooperationContractsMap map[string]*domain.CooperationContract 133 + cooperationContractsMap := make(map[string]*domain.CooperationContract)
134 if count, cooperationContracts, err := cooperationContractRepository.Find(map[string]interface{}{ 134 if count, cooperationContracts, err := cooperationContractRepository.Find(map[string]interface{}{
135 - "companyId": createDividendsOrderCommand.CompanyId,  
136 - "orgId": createDividendsOrderCommand.OrgId, 135 + "offsetLimit": false,
  136 + "companyId": createDividendsOrderCommand.CompanyId,
  137 + "orgId": createDividendsOrderCommand.OrgId,
137 }); err != nil { 138 }); err != nil {
138 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 139 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
139 } else { 140 } else {
@@ -317,7 +318,7 @@ func (dividendsOrderService *DividendsOrderService) ImportDividendsOrder(importD @@ -317,7 +318,7 @@ func (dividendsOrderService *DividendsOrderService) ImportDividendsOrder(importD
317 } 318 }
318 319
319 // 查找合约 320 // 查找合约
320 - var cooperationContractsMap map[string]*domain.CooperationContract 321 + cooperationContractsMap := make(map[string]*domain.CooperationContract)
321 countContracts, cooperationContracts, err := cooperationContractRepository.Find(map[string]interface{}{ 322 countContracts, cooperationContracts, err := cooperationContractRepository.Find(map[string]interface{}{
322 "offsetLimit": false, 323 "offsetLimit": false,
323 "companyId": importDividendsOrderCommand.CompanyId, 324 "companyId": importDividendsOrderCommand.CompanyId,
@@ -143,10 +143,11 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide @@ -143,10 +143,11 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide
143 } 143 }
144 144
145 // 查找合约 145 // 查找合约
146 - var cooperationContractsMap map[string]*domain.CooperationContract 146 + cooperationContractsMap := make(map[string]*domain.CooperationContract)
147 if count, cooperationContracts, err := cooperationContractRepository.Find(map[string]interface{}{ 147 if count, cooperationContracts, err := cooperationContractRepository.Find(map[string]interface{}{
148 - "companyId": createDividendsReturnedOrderCommand.CompanyId,  
149 - "orgId": createDividendsReturnedOrderCommand.OrgId, 148 + "offsetLimit": false,
  149 + "companyId": createDividendsReturnedOrderCommand.CompanyId,
  150 + "orgId": createDividendsReturnedOrderCommand.OrgId,
150 }); err != nil { 151 }); err != nil {
151 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 152 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
152 } else { 153 } else {
@@ -366,7 +367,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) ImportDivide @@ -366,7 +367,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) ImportDivide
366 } 367 }
367 368
368 // 查找合约 369 // 查找合约
369 - var cooperationContractsMap map[string]*domain.CooperationContract 370 + cooperationContractsMap := make(map[string]*domain.CooperationContract)
370 countContracts, cooperationContracts, err := cooperationContractRepository.Find(map[string]interface{}{ 371 countContracts, cooperationContracts, err := cooperationContractRepository.Find(map[string]interface{}{
371 "offsetLimit": false, 372 "offsetLimit": false,
372 "companyId": importDividendsReturnedOrderCommand.CompanyId, 373 "companyId": importDividendsReturnedOrderCommand.CompanyId,