This commit is contained in:
shoopea 2019-10-11 14:58:18 +08:00
parent 3f186e1734
commit 546af872f0

8
job.go
View File

@ -898,6 +898,7 @@ func jobVaultStatus(j Job) {
userID64, currentUserID64 int64
itemID64, deposit, withdraw int64
itemList, depositList, withdrawList []int64
idList []int64
)
err := setJobStart(j.ID64)
@ -930,7 +931,11 @@ func jobVaultStatus(j Job) {
AND omv.item_type_id in (?` + strings.Repeat(",?", len(p.ItemTypeListID64)-1) + `)) x
ORDER BY x.user_id ASC;`
rows, err := db.Query(stmt, p.DepositChatID64, p.UserListID64..., p.ItemTypeListID64...)
idList = nil
idList = append(idList, p.UserListID64...)
idList = append(idList, p.ItemTypeListID64...)
rows, err := db.Query(stmt, p.DepositChatID64, idList...)
logOnError(err, "jobVaultStatus : Get rows")
if err != nil {
@ -963,7 +968,6 @@ func jobVaultStatus(j Job) {
logOnError(err, "jobVaultStatus : query end")
rows.Close()
err = setJobDone(j.ID64)
logOnError(err, "jobVaultStatus : setJobDone")