- handle table config error.
This commit is contained in:
@@ -2,7 +2,7 @@ package models
|
|||||||
|
|
||||||
type ELMOrder struct {
|
type ELMOrder struct {
|
||||||
Id int
|
Id int
|
||||||
OrderId string `orm:"size(50);unique;null"`
|
OrderId string `orm:"size(50);unique;null;column(orderid)"`
|
||||||
Data string `orm:"type(text);null"`
|
Data string `orm:"type(text);null"`
|
||||||
Type int `orm:"null"`
|
Type int `orm:"null"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ func initElm() {
|
|||||||
if token == "" {
|
if token == "" {
|
||||||
db := orm.NewOrm()
|
db := orm.NewOrm()
|
||||||
var tokenInfo []orm.Params
|
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 {
|
if err != nil || num != 1 {
|
||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user