update example

This commit is contained in:
kevin
2020-11-14 22:01:35 +08:00
parent 16bfb1b7be
commit 13d1c5cd00
5 changed files with 26 additions and 3 deletions

View File

@@ -72,7 +72,6 @@ func (m *BookModel) Update(data Book) error {
}
func (m *BookModel) Delete(book string) error {
bookBookKey := fmt.Sprintf("%s%v", cacheBookBookPrefix, book)
_, err := m.Exec(func(conn sqlx.SqlConn) (result sql.Result, err error) {
query := `delete from ` + m.table + ` where book = ?`