作者 陈志颖

fix:修复兑换活动和兑换清单删除操作

... ... @@ -105,7 +105,8 @@ func (repository *ExchangeCashActivityRepository) Find(queryOptions map[string]i
func (repository *ExchangeCashActivityRepository) Remove(exchangeCashActivity *domain.ExchangeCashActivity) (*domain.ExchangeCashActivity, error) {
tx := repository.transactionContext.PgTx
exchangeCashActivityModel := new(models.ExchangeCashActivity)
exchangeCashActivity.ActivityId = exchangeCashActivity.Identity().(int64)
//exchangeCashActivity.ActivityId = exchangeCashActivity.Identity().(int64)
exchangeCashActivityModel.Id = exchangeCashActivity.ActivityId
if _, err := tx.Model(exchangeCashActivityModel).WherePK().Delete(); err != nil {
return exchangeCashActivity, err
}
... ...
... ... @@ -98,7 +98,8 @@ func (repository *ExchangeCashPersonListRepository) Find(queryOptions map[string
func (repository *ExchangeCashPersonListRepository) Remove(exchangeCashList *domain.ExchangeCashPersonList) (*domain.ExchangeCashPersonList, error) {
tx := repository.transactionContext.PgTx
exchangeCashListModel := new(models.ExchangeCashPersonList)
exchangeCashList.ListId = exchangeCashList.Identity().(int64)
//exchangeCashList.ListId = exchangeCashList.Identity().(int64)
exchangeCashListModel.Id = exchangeCashList.ListId
if _, err := tx.Model(exchangeCashListModel).WherePK().Delete(); err != nil {
return exchangeCashList, err
}
... ...