多笔立减
This commit is contained in:
parent
4b17fbd9bf
commit
1c52f0adc6
|
|
@ -329,6 +329,10 @@ func (p *OrderRepoImpl) Success(ctx context.Context, id uint64, voucherNo string
|
|||
return fmt.Errorf("update db fail %w", tx.Error)
|
||||
}
|
||||
|
||||
if tx.RowsAffected == 0 {
|
||||
return fmt.Errorf("no rows affected")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -378,6 +382,10 @@ func (p *OrderRepoImpl) Fail(ctx context.Context, id uint64, remark string) erro
|
|||
return fmt.Errorf("update db fail %w", tx.Error)
|
||||
}
|
||||
|
||||
if tx.RowsAffected == 0 {
|
||||
return fmt.Errorf("no rows affected")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue