- handle table config error.

This commit is contained in:
gazebo
2018-06-27 11:08:30 +08:00
parent 8b5b3fbfa5
commit eeb8587d4c
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ package models
type ELMOrder struct {
Id int
OrderId string `orm:"size(50);unique;null"`
OrderId string `orm:"size(50);unique;null;column(orderid)"`
Data string `orm:"type(text);null"`
Type int `orm:"null"`
}

View File

@@ -115,7 +115,7 @@ func initElm() {
if token == "" {
db := orm.NewOrm()
var tokenInfo []orm.Params
num, err := db.Raw("SELECT * FROM thirdpartytoken WHERE thirdparty='eleme'").Values(&tokenInfo)
num, err := db.Raw("SELECT * FROM config WHERE thirdparty='eleme'").Values(&tokenInfo)
if err != nil || num != 1 {
panic(err.Error())
}