test
This commit is contained in:
parent
ab0a7928b4
commit
560894b96b
7
job.go
7
job.go
@ -1179,16 +1179,12 @@ func jobVaultItemStatus(j Job) {
|
||||
userList, depositList, withdrawList []int64
|
||||
)
|
||||
|
||||
log.Printf("jobVaultItemStatus : starting\n")
|
||||
|
||||
err := setJobStart(j.ID64)
|
||||
logOnError(err, "jobVaultItemStatus : setJobStart")
|
||||
|
||||
err = json.Unmarshal(j.Payload, &p)
|
||||
logOnError(err, "jobVaultItemStatus : Unmarshal payload")
|
||||
|
||||
log.Printf("jobVaultItemStatus : payload unmarshaled\n")
|
||||
|
||||
stmt := `SELECT x.item_id
|
||||
,x.user_id
|
||||
,(SELECT COALESCE(SUM(omv.quantity), 0)
|
||||
@ -1212,14 +1208,11 @@ func jobVaultItemStatus(j Job) {
|
||||
AND omv.item_id in (?` + strings.Repeat(",?", len(p.ItemListID64)-1) + `)) x
|
||||
ORDER BY x.user_id ASC;`
|
||||
|
||||
log.Printf("jobVaultItemStatus : stmt\n%s\n", stmt)
|
||||
|
||||
args := make([]interface{}, len(p.ItemListID64)+1)
|
||||
args[0] = p.DepositChatID64
|
||||
for i, id := range p.ItemListID64 {
|
||||
args[i+1] = id
|
||||
}
|
||||
log.Printf("jobVaultItemStatus : args\n%v\n", args)
|
||||
|
||||
rows, err := db.Query(stmt, args...)
|
||||
logOnError(err, "jobVaultItemStatus : Get rows")
|
||||
|
Loading…
Reference in New Issue
Block a user