...
|
...
|
@@ -271,15 +271,16 @@ func (repository *DividendsEstimateRepository) UpdateMany(dividendsEstimates []* |
|
|
if _, err := tx.Model(÷ndsEstimateModels).WherePK().Update(); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
var dividendsEstimatesUpdated []*domain.DividendsEstimate
|
|
|
for _, dividendsEstimateModel := range dividendsEstimateModels {
|
|
|
if dividendsEstimate, err := transform.TransformToDividendsEstimateDomainModelFromPgModels(dividendsEstimateModel); err != nil {
|
|
|
return dividendsEstimates, err
|
|
|
} else {
|
|
|
dividendsEstimatesUpdated = append(dividendsEstimatesUpdated, dividendsEstimate)
|
|
|
}
|
|
|
}
|
|
|
return dividendsEstimatesUpdated, nil
|
|
|
//var dividendsEstimatesUpdated []*domain.DividendsEstimate
|
|
|
//for _, dividendsEstimateModel := range dividendsEstimateModels {
|
|
|
// if dividendsEstimate, err := transform.TransformToDividendsEstimateDomainModelFromPgModels(dividendsEstimateModel); err != nil {
|
|
|
// return dividendsEstimates, err
|
|
|
// } else {
|
|
|
// dividendsEstimatesUpdated = append(dividendsEstimatesUpdated, dividendsEstimate)
|
|
|
// }
|
|
|
//}
|
|
|
//return dividendsEstimatesUpdated, nil
|
|
|
return dividendsEstimates, nil
|
|
|
}
|
|
|
|
|
|
func (repository *DividendsEstimateRepository) Remove(dividendsEstimate *domain.DividendsEstimate) (*domain.DividendsEstimate, error) {
|
...
|
...
|
|