fix interception issue

This commit is contained in:
shoopea 2021-10-28 19:31:31 +08:00
parent 6aed6b5e6a
commit f9a4523ef1

25
job.go
View File

@ -520,7 +520,6 @@ func jobPillage(j Job) {
,obj_job oj ,obj_job oj
WHERE oj.obj_id = ` + strconv.FormatInt(j.ID64, 10) + ` WHERE oj.obj_id = ` + strconv.FormatInt(j.ID64, 10) + `
AND omx.user_id = oj.user_id AND omx.user_id = oj.user_id
AND omx.sender_user_id = ` + strconv.Itoa(userID64ChtWrsBot) + `
AND omx.obj_id = ox.id AND omx.obj_id = ox.id
AND ox.obj_sub_type_id in (` + strconv.FormatInt(cacheObjSubType[`msg_pillage_go`], 10) + 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_timeout`], 10) +
@ -536,30 +535,6 @@ func jobPillage(j Job) {
ELSE 4 END ASC ELSE 4 END ASC
LIMIT 1;`) 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 ? if len(ids) > 1 { // issue there ?
s := TGCommand{ s := TGCommand{
Type: commandSendMsg, Type: commandSendMsg,