fix fwd job
This commit is contained in:
parent
5102375a0e
commit
7d1ecd780c
2
msg.go
2
msg.go
@ -26,7 +26,7 @@ func getMsgParsingRule(m *ChatWarsMessage) (*MessageParsingRule, error) {
|
||||
func parseSubTypeMessageGDepositAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageGDepositAck, error) {
|
||||
cwm := ChatWarsMessageGDepositAck{}
|
||||
|
||||
cwm.Item, _ = getObjItemID(``, r.ReplaceAllString(m.Text, "${Used}"))
|
||||
cwm.ItemID64 = getObjItemID(``, r.ReplaceAllString(m.Text, "${Used}"))
|
||||
cwm.Quantity, _ = strconv.ParseInt(r.ReplaceAllString(m.Text, "${Quantity}"), 10, 64)
|
||||
|
||||
cwm.Msg = m
|
||||
|
12
sql.go
12
sql.go
@ -384,6 +384,18 @@ func initDB() {
|
||||
failOnError(err, "initDB : create table obj_job")
|
||||
log.Println("initDB : obj_job created ...")
|
||||
|
||||
_, err = db.Exec(`CREATE VIEW obj_job_v AS
|
||||
SELECT oj.obj_id
|
||||
,cost.intl_id COLLATE utf8mb4_unicode_ci AS job_type_intl_id
|
||||
,oj.payload COLLATE utf8mb4_unicode_ci AS payload
|
||||
FROM obj_job oj
|
||||
,obj o
|
||||
,code_obj_sub_type cost
|
||||
WHERE o.id = oj.obj_id
|
||||
AND cost.id = o.obj_sub_type_id;`)
|
||||
failOnError(err, "initDB : create view obj_job_v")
|
||||
log.Println("initDB : obj_job_v created ...")
|
||||
|
||||
_, err = db.Exec(`CREATE TABLE obj_name (
|
||||
obj_id BIGINT UNSIGNED NOT NULL
|
||||
,name VARCHAR(80)
|
||||
|
Loading…
Reference in New Issue
Block a user