- user man and user store bind.
This commit is contained in:
@@ -187,3 +187,17 @@ func DeleteEntity(db *DaoDB, item interface{}, conditions map[string]interface{}
|
||||
}, reflect.TypeOf(item).Name())
|
||||
return num, err
|
||||
}
|
||||
|
||||
func UpdateBySQL(db *DaoDB, sql string, params ...interface{}) (num int64, err error) {
|
||||
if db == nil {
|
||||
db = GetDB()
|
||||
}
|
||||
err = utils.CallFuncLogError(func() error {
|
||||
result, err2 := db.db.Raw(sql, params...).Exec()
|
||||
if err2 == nil {
|
||||
num, _ = result.RowsAffected()
|
||||
}
|
||||
return err2
|
||||
}, sql)
|
||||
return num, err
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package model
|
||||
|
||||
type WeiXins struct {
|
||||
ID int `orm:"column(id)"`
|
||||
JxStoreID int `orm:"column(jxstoreid)"`
|
||||
OpenID string `orm:"column(openid);size(70);index"`
|
||||
Tel string `orm:"size(15);index"`
|
||||
ParentID int `orm:"column(parentid)"`
|
||||
NickName string `orm:"column(nickname);size(30)"`
|
||||
ID int `orm:"column(id)" json:"id"`
|
||||
JxStoreID int `orm:"column(jxstoreid)" json:"storeID"`
|
||||
OpenID string `orm:"column(openid);size(70);index" json:"openID"`
|
||||
Tel string `orm:"size(15);index" json:"tel"`
|
||||
ParentID int `orm:"column(parentid)" json:"parentID"`
|
||||
NickName string `orm:"column(nickname);size(30)" json:"nickname"`
|
||||
}
|
||||
|
||||
func (*WeiXins) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user