- handle table config error.
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user