fix: some api bug

This commit is contained in:
wwweww
2026-03-31 22:12:06 +08:00
parent c5ff4f0216
commit e7970ac25f
219 changed files with 16195 additions and 2126 deletions
@@ -39,9 +39,8 @@ func (l *UpdateWalletsLogic) UpdateWallets(in *pb.UpdateWalletsReq) (*pb.UpdateW
}
updater := tx.Wallet.Update().
Where(wallet.UserIDEQ(in.UserId), wallet.VersionEQ(int(in.GetVersion()))).
Where(wallet.IDEQ(in.UserId), wallet.VersionEQ(int(in.GetVersion()))).
AddVersion(1)
if in.Balance != nil {
parsedBalance, perr := decimal.NewFromString(in.GetBalance())
if perr != nil {
@@ -70,7 +69,7 @@ func (l *UpdateWalletsLogic) UpdateWallets(in *pb.UpdateWalletsReq) (*pb.UpdateW
return nil, err
}
if affected == 0 {
exist, qerr := tx.Wallet.Query().Where(wallet.UserIDEQ(in.UserId)).Exist(l.ctx)
exist, qerr := tx.Wallet.Query().Where(wallet.IDEQ(in.UserId)).Exist(l.ctx)
_ = tx.Rollback()
if qerr != nil {
return nil, qerr