...
|
...
|
@@ -31,10 +31,17 @@ func (repo *LogSmsRepository) Save(param *domain.LogSms) error { |
|
|
ExecuteAt: param.ExecuteAt,
|
|
|
}
|
|
|
tx := repo.transactionContext.PgTx
|
|
|
_, err := tx.Model(&m).Insert()
|
|
|
if m.Id == 0 {
|
|
|
_, err := tx.Model(&m).Insert()
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
}
|
|
|
_, err := tx.Model(&m).WherePK().Update()
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
return nil
|
|
|
}
|
|
|
|
...
|
...
|
|