mirror of
https://gitee.com/gokins/gokins.git
synced 2024-12-01 18:58:35 +08:00
bugs
This commit is contained in:
parent
61115cfa8b
commit
55126e2470
@ -17,6 +17,10 @@ func MoveModels() {
|
||||
return
|
||||
}
|
||||
for _, v := range olds {
|
||||
id, err := v.GetInt("id")
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
del, err := v.GetInt("del")
|
||||
if err != nil {
|
||||
continue
|
||||
@ -38,14 +42,14 @@ func MoveModels() {
|
||||
}
|
||||
_, err = comm.Db.Insert(ne)
|
||||
if err == nil {
|
||||
mvPlugin(ne)
|
||||
mvPlugin(id, ne)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func mvPlugin(md *model.TModel) {
|
||||
func mvPlugin(tid int64, md *model.TModel) {
|
||||
var olds []*ruisUtil.Map
|
||||
err := comm.Dbold.SQL("select * from t_plugin").Find(&olds)
|
||||
err := comm.Dbold.SQL("select * from t_plugin where tid=?", tid).Find(&olds)
|
||||
if err != nil {
|
||||
fmt.Println("find model err:" + err.Error())
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user