From 194474df03404456e91f172ebe5f15464971abeb Mon Sep 17 00:00:00 2001 From: shoopea Date: Fri, 10 May 2019 21:58:56 +0800 Subject: [PATCH] testtest --- bot.go | 2 ++ sql.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bot.go b/bot.go index 6c08cde..4c5e7e3 100644 --- a/bot.go +++ b/bot.go @@ -1,9 +1,11 @@ package main import ( + "encoding/json" "fmt" tb "gopkg.in/tucnak/telebot.v2" "regexp" + "strconv" "time" ) diff --git a/sql.go b/sql.go index f898e8f..8aef2a3 100644 --- a/sql.go +++ b/sql.go @@ -1326,7 +1326,7 @@ func insertMsgAuctionAnnounce(m *ChatWarsMessageAuctionAnnounce) error { func createJob(job_type_id int32, priority int32, schedule time.Time, payload []byte) error { res, err := db.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id) - VALUES (` + strconv.Itoa(objTypeJob) + `,` + strconv.Itoa(job_type_id) + `);`) + VALUES (` + strconv.Itoa(int(objTypeJob)) + `,` + strconv.Itoa(job_type_id) + `);`) logOnError(err, "createJob : insert obj") if err != nil { return err