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