mirror of
https://gitee.com/gokins/gokins.git
synced 2024-12-02 03:07:46 +08:00
bugs
This commit is contained in:
parent
61115cfa8b
commit
55126e2470
@ -17,6 +17,10 @@ func MoveModels() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, v := range olds {
|
for _, v := range olds {
|
||||||
|
id, err := v.GetInt("id")
|
||||||
|
if err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
del, err := v.GetInt("del")
|
del, err := v.GetInt("del")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
@ -38,14 +42,14 @@ func MoveModels() {
|
|||||||
}
|
}
|
||||||
_, err = comm.Db.Insert(ne)
|
_, err = comm.Db.Insert(ne)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
mvPlugin(ne)
|
mvPlugin(id, ne)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func mvPlugin(md *model.TModel) {
|
func mvPlugin(tid int64, md *model.TModel) {
|
||||||
var olds []*ruisUtil.Map
|
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 {
|
if err != nil {
|
||||||
fmt.Println("find model err:" + err.Error())
|
fmt.Println("find model err:" + err.Error())
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user