compilation fix

This commit is contained in:
shoopea 2019-08-21 14:41:30 +08:00
parent 21d77d6840
commit 5c41f0460c
2 changed files with 2 additions and 3 deletions

2
msg.go
View File

@ -18,7 +18,7 @@ func getMsgParsingRule(m *ChatWarsMessage) (*MessageParsingRule, error) {
if i == len(msgParsingRules) {
return nil, errors.New("Can't find message type in rules.")
} else {
return msgParsingRules[i], nil
return &msgParsingRules[i], nil
}
}

View File

@ -359,7 +359,6 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
case objSubTypeMessageBuyReq:
case objSubTypeMessageSellReq:
case objSubTypeMessageOrderbookReq:
case objSubTypeMessageOrderbookAck:
case objSubTypeMessageWithdrawReq:
case objSubTypeMessageWithdrawCode:
case objSubTypeMessageWithdrawRcv:
@ -457,7 +456,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
}
}
case objSubTypeMessageTimeAck:
_, err := fromChatWarsDate(r.ReplaceAllString(m.Text, "${Day}") + " " + r.ReplaceAllString(m.Text, "${Month}") + " " + r.ReplaceAllString(m.Text, "${Year}") + " " + r.ReplaceAllString(m.Text, "${Hour}") + ":" + r.ReplaceAllString(m.Text, "${Minute}"))
_, err := fromChatWarsDate(rule.re.ReplaceAllString(m.Text, "${Day}") + " " + rule.re.ReplaceAllString(m.Text, "${Month}") + " " + rule.re.ReplaceAllString(m.Text, "${Year}") + " " + rule.re.ReplaceAllString(m.Text, "${Hour}") + ":" + rule.re.ReplaceAllString(m.Text, "${Minute}"))
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : fromChatWarsDate")
case objSubTypeMessageOrderbookAck:
cwm, err := parseSubTypeMessageOrderbookAck(m, rule.re)