胡轶钦 vor 6 Jahren
Ursprung
Commit
bf2d90a947
1 geänderte Dateien mit 7 neuen und 5 gelöschten Zeilen
  1. 7
    5
      models/book/book.go

+ 7
- 5
models/book/book.go Datei anzeigen

@@ -507,16 +507,18 @@ func (m *BookDAO) IsBarcodeExist(barcode, caseId string) (int, error) {
507 507
 }
508 508
 
509 509
 type CustomerInfo struct {
510
-	Name      string
511
-	Phone     string
512
-	BorrowNum int
513
-	LateNum   int
514
-	IsLate    string
510
+	CustomerId string
511
+	Name       string
512
+	Phone      string
513
+	BorrowNum  int
514
+	LateNum    int
515
+	IsLate     string
515 516
 }
516 517
 
517 518
 func (m *BookDAO) GetCustomerBorrowInfo(customerInfo string) (*CustomerInfo, error) {
518 519
 	var customer []CustomerInfo
519 520
 	sql := `SELECT
521
+	a.customer_id
520 522
 	a.name,
521 523
 	a.phone ,
522 524
 	(select count(1) from ta_book_borrow_record c WHERE borrow_status = '1' and c.customer_id = a.customer_id)as borrow_num,