fix g_stock job

This commit is contained in:
shoopea 2019-12-13 19:28:08 +08:00
parent 7c34ee16c5
commit 3f21325d7b

12
job.go
View File

@ -709,7 +709,7 @@ func jobGStock(j Job) {
case 0: // send /g_stock_res
p.Progress = 1
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, c.TGUserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_res")
case 1: // send /g_stock_alch
@ -723,7 +723,7 @@ func jobGStock(j Job) {
}
p.Progress = 2
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, c.TGUserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_alch")
case 2: // send /g_stock_misc
@ -737,7 +737,7 @@ func jobGStock(j Job) {
}
p.Progress = 3
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, c.TGUserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_misc")
case 3: // send /g_stock_rec
@ -751,7 +751,7 @@ func jobGStock(j Job) {
}
p.Progress = 4
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, c.TGUserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_rec")
case 4: // send /g_stock_parts
@ -765,7 +765,7 @@ func jobGStock(j Job) {
}
p.Progress = 5
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, c.TGUserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_parts")
case 5: // send /g_stock_other
@ -779,7 +779,7 @@ func jobGStock(j Job) {
}
p.Progress = 6
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGStock, c.TGUserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
err = createJobCallback(objSubTypeJobGStock, j.UserID64, objSubTypeMessageGStockAnyAck, b, 1*time.Minute)
logOnError(err, "jobGStock : createJobCallback")
clientSendCWMsg(cfg.Bot.Admin, "/g_stock_other")
case 6: // collate everything and reply