test deposit all

This commit is contained in:
shoopea 2019-08-27 12:50:50 +08:00
parent 79f23ccf4c
commit 03c1007bab

15
job.go
View File

@ -806,10 +806,21 @@ func jobGDeposit(j Job) {
return return
} else if p.Status == 1 { /* handle that one resource from the objSubTypeMessageOrderbookAck msg */ } else if p.Status == 1 { /* handle that one resource from the objSubTypeMessageOrderbookAck msg */
log.Printf("jobGDeposit : objSubTypeMessageStockAck : %d\n.", j.Trigger) log.Printf("jobGDeposit : objSubTypeMessageStockAck : %d.\n", j.Trigger)
} else if p.Status == objSubTypeMessageStockAck { } else if p.Status == objSubTypeMessageStockAck {
log.Printf("jobGDeposit : objSubTypeMessageStockAck : %d\n.", j.Trigger) msg, err := getObjMsg(j.Trigger)
logOnError(err, "jobGDeposit : getObjMsg")
rule, err := getMsgParsingRule(msg)
logOnError(err, "jobGDeposit : getMsgParsingRule")
cwm, err := parseSubTypeMessageStockAck(msg, rule)
for i := range cwm.Stock {
for j := range p.ResObjID64 {
if cwm.Stock[i].ItemID64 == p.ResObjID64[j] {
log.Printf("jobGDeposit : objSubTypeMessageStockAck : Matching ItemID %d (%d).\n", p.ResObjID64[j], cwm.Stock[i].Quantity)
}
}
}
} }
err = setJobDone(j.ID64) err = setJobDone(j.ID64)