...
|
...
|
@@ -293,6 +293,21 @@ func (repository *DividendsEstimateRepository) Remove(dividendsEstimate *domain. |
|
|
return dividendsEstimate, nil
|
|
|
}
|
|
|
|
|
|
func (repository *DividendsEstimateRepository) BatchRemove(dividendsEstimates []*domain.DividendsEstimate) ([]*domain.DividendsEstimate, error) {
|
|
|
tx := repository.transactionContext.PgTx
|
|
|
var dividendsEstimateModels []*models.DividendsEstimate
|
|
|
for _, dividendsEstimate := range dividendsEstimates {
|
|
|
dividendsEstimateModels = append(dividendsEstimateModels, &models.DividendsEstimate{
|
|
|
DividendsEstimateId: dividendsEstimate.Identify().(int64),
|
|
|
})
|
|
|
}
|
|
|
if _, err := tx.Model(÷ndsEstimateModels).WherePK().Delete(); err != nil {
|
|
|
return dividendsEstimates, err
|
|
|
} else {
|
|
|
return dividendsEstimates, nil
|
|
|
}
|
|
|
}
|
|
|
|
|
|
func (repository *DividendsEstimateRepository) FindOne(queryOptions map[string]interface{}) (*domain.DividendsEstimate, error) {
|
|
|
tx := repository.transactionContext.PgTx
|
|
|
dividendsEstimateModel := new(models.DividendsEstimate)
|
...
|
...
|
|