Ver código fonte

partly fixed query at payout detecred section

TooManySugar 3 anos atrás
pai
commit
cf51e7ea78
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      update_data.go

+ 3 - 3
update_data.go

@@ -235,8 +235,8 @@ func (c *Connection) UpdateWallet(wallet string) {
 					newWorkerRecord.WorkerUnpaid = workerUnpaid
 
 					var targetedChats []int64
-					result = c.GormDb.
-						Where(&User{Wallet: newMinerRecord.Wallet}).
+					result = c.GormDb.Model(&User{}).
+						Where("wallet = ?", newMinerRecord.Wallet).
 						Select("DISTINCT(chat_id)").
 						Scan(&targetedChats)
 					if result.Error != nil {
@@ -276,4 +276,4 @@ func (c *Connection) UpdateWallet(wallet string) {
 		
 		LogInfo.Printf("Added new row for worker %s\n", newWorkerRecord.Worker)
 	}
-}
+}