fix:修复删除项目时没有删除项目团队的BUG

pull/425/head
lifei6671 2018-11-16 10:46:37 +08:00
parent f3d8885723
commit 4702334604
1 changed files with 5 additions and 0 deletions

View File

@ -435,6 +435,11 @@ func (book *Book) ThoroughDeleteBook(id int) error {
o.Rollback() o.Rollback()
return err return err
} }
_,err = o.Raw(fmt.Sprintf("DELETE FROM %s WHERE book_id=?",NewTeamRelationship().TableNameWithPrefix()), book.BookId).Exec()
if err != nil {
o.Rollback()
return err
}
//删除模板 //删除模板
_, err = o.Raw("DELETE FROM "+NewTemplate().TableNameWithPrefix()+" WHERE book_id = ?", book.BookId).Exec() _, err = o.Raw("DELETE FROM "+NewTemplate().TableNameWithPrefix()+" WHERE book_id = ?", book.BookId).Exec()
if err != nil { if err != nil {