|
@@ -39,7 +39,7 @@ func (m *BookDAO) GetBookList(bookType, name, barcode, showzero, caseid string,
|
39
|
39
|
sql += ` and (book_name like '%` + name + `%' or author like '%` + name + `%')`
|
40
|
40
|
}
|
41
|
41
|
if barcode != "" {
|
42
|
|
- sql += ` and barcode = '` + barcode + `'`
|
|
42
|
+ sql += ` and book_barcode = '` + barcode + `'`
|
43
|
43
|
}
|
44
|
44
|
if showzero == "0" {
|
45
|
45
|
sql += ` and left_num>0`
|
|
@@ -57,7 +57,7 @@ func (m *BookDAO) GetBookListCount(bookType, name, showzero, barcode, caseid str
|
57
|
57
|
sql += ` and book_type_id = '` + bookType + `'`
|
58
|
58
|
}
|
59
|
59
|
if barcode != "" {
|
60
|
|
- sql += ` and barcode = '` + barcode + `'`
|
|
60
|
+ sql += ` and book_barcode = '` + barcode + `'`
|
61
|
61
|
}
|
62
|
62
|
if name != "" {
|
63
|
63
|
sql += ` and (book_name like '%` + name + `%' or author like '%` + name + `%')`
|
|
@@ -482,6 +482,7 @@ func (m *BookDAO) DeleteBook(bookId string) error {
|
482
|
482
|
var cols = []string{
|
483
|
483
|
"status",
|
484
|
484
|
}
|
|
485
|
+
|
485
|
486
|
_, err := m.db.Cols(cols...).Where("book_id = ?", book.BookId).Update(book)
|
486
|
487
|
return err
|
487
|
488
|
}
|