debug pillage
This commit is contained in:
parent
366b878f20
commit
6aed6b5e6a
24
job.go
24
job.go
@ -536,6 +536,30 @@ func jobPillage(j Job) {
|
||||
ELSE 4 END ASC
|
||||
LIMIT 1;`)
|
||||
|
||||
log.Println("jobPillage : Query\n%s", `SELECT ox.id
|
||||
FROM obj ox
|
||||
,obj_msg omx
|
||||
,obj op
|
||||
,obj_msg omp
|
||||
,obj_job oj
|
||||
WHERE oj.obj_id = `+strconv.FormatInt(j.ID64, 10)+`
|
||||
AND omx.user_id = oj.user_id
|
||||
AND omx.sender_user_id = `+strconv.Itoa(userID64ChtWrsBot)+`
|
||||
AND omx.obj_id = ox.id
|
||||
AND ox.obj_sub_type_id in (`+strconv.FormatInt(cacheObjSubType[`msg_pillage_go`], 10)+
|
||||
`, `+strconv.FormatInt(cacheObjSubType[`msg_pillage_timeout`], 10)+
|
||||
`, `+strconv.FormatInt(cacheObjSubType[`msg_pillage_loss`], 10)+
|
||||
`, `+strconv.FormatInt(cacheObjSubType[`msg_pillage_win`], 10)+`)
|
||||
AND op.id = `+strconv.FormatInt(r.ObjID64, 10)+`
|
||||
AND omp.obj_id = op.id
|
||||
AND omx.date between omp.date AND ADDTIME(omp.date, '0 0:3:30.000000')
|
||||
ORDER BY CASE ox.obj_sub_type_id WHEN `+strconv.FormatInt(cacheObjSubType[`msg_pillage_win`], 10)+` THEN 0
|
||||
WHEN `+strconv.FormatInt(cacheObjSubType[`msg_pillage_loss`], 10)+` THEN 1
|
||||
WHEN `+strconv.FormatInt(cacheObjSubType[`msg_pillage_timeout`], 10)+` THEN 2
|
||||
WHEN `+strconv.FormatInt(cacheObjSubType[`msg_pillage_go`], 10)+` THEN 3
|
||||
ELSE 4 END ASC
|
||||
LIMIT 1;`)
|
||||
|
||||
if len(ids) > 1 { // issue there ?
|
||||
s := TGCommand{
|
||||
Type: commandSendMsg,
|
||||
|
Loading…
Reference in New Issue
Block a user