完善生图5.0的功能
This commit is contained in:
1 parent
88a4268d40
commit
678d213f40
31 files changed
+3281
-107
No files matched your search
@@ -51,7 +51,11 @@ func (db *Database) ChargeAndActivateCreation(ctx context.Context, request billi
|
||||
}
|
||||
var posting WalletEntry
|
||||
if !rows.Next() {
|
||||
rowsErr := rows.Err()
|
||||
rows.Close()
|
||||
if rowsErr != nil {
|
||||
return nil, fmt.Errorf("charge and activate generation creation: read wallet: %w", rowsErr)
|
||||
}
|
||||
return nil, fmt.Errorf("charge and activate generation creation: wallet returned no row")
|
||||
}
|
||||
if err := rows.Scan(&posting.LedgerID, &posting.BalanceAfterFen, &posting.BalanceFen, &posting.TotalRechargedFen, &posting.TotalChargedFen, &posting.CreatedAt, &posting.UpdatedAt, &posting.DeltaFen); err != nil {
|
||||
@@ -79,7 +83,11 @@ func (db *Database) ChargeAndActivateCreation(ctx context.Context, request billi
|
||||
return nil, fmt.Errorf("charge and activate generation creation: activate job: %w", err)
|
||||
}
|
||||
if !activation.Next() {
|
||||
rowsErr := activation.Err()
|
||||
activation.Close()
|
||||
if rowsErr != nil {
|
||||
return nil, fmt.Errorf("charge and activate generation creation: read activation: %w", rowsErr)
|
||||
}
|
||||
return nil, fmt.Errorf("charge and activate generation creation: job is not pending")
|
||||
}
|
||||
var id string
|
||||
|
||||
Reference in new issue
Block a user