19 lines
557 B
Go
19 lines
557 B
Go
package psiMysql
|
|
|
|
import (
|
|
"planA/initialization/golabl"
|
|
psiMysqlType "planA/type/psiMysql"
|
|
)
|
|
|
|
// GetBookInfo 获取书籍信息
|
|
func GetBookInfo(isbn string, fisbn string) (bookInfo psiMysqlType.BookInfo, err error) {
|
|
err = golabl.PsiMysqlDb.Where("isbn = ? and fisbn = ?", isbn, fisbn).First(&bookInfo).Error
|
|
return bookInfo, err
|
|
}
|
|
|
|
// GetBookInfoSingle 获取书籍信息
|
|
func GetBookInfoSingle(isbn string) (bookInfo psiMysqlType.BookInfo, err error) {
|
|
err = golabl.PsiMysqlDb.Where("isbn = ?", isbn).First(&bookInfo).Error
|
|
return bookInfo, err
|
|
}
|