Selaa lähdekoodia

修改搜索条件

xyxie 1 vuosi sitten
vanhempi
commit
87124ae186
2 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 3 3
      controllers/english_report/report.go
  2. 1 1
      controllers/report.go

+ 3 - 3
controllers/english_report/report.go

@@ -2,8 +2,6 @@ package english_report
 
 import (
 	"encoding/json"
-	"fmt"
-	"github.com/rdlucklib/rdluck_tools/paging"
 	"eta/eta_api/controllers"
 	"eta/eta_api/models"
 	"eta/eta_api/models/company"
@@ -11,6 +9,8 @@ import (
 	"eta/eta_api/services"
 	"eta/eta_api/services/alarm_msg"
 	"eta/eta_api/utils"
+	"fmt"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"html"
 	"strconv"
 	"strings"
@@ -338,7 +338,7 @@ func (this *EnglishReportController) ListReport() {
 	var pars []interface{}
 
 	if keyWord != "" {
-		condition += ` AND (title LIKE '%` + keyWord + `%' OR author LIKE '%` + keyWord + `%' ) `
+		condition += ` AND (title LIKE '%` + keyWord + `%' OR admin_real_name LIKE '%` + keyWord + `%' ) `
 	}
 
 	if timeType == "" {

+ 1 - 1
controllers/report.go

@@ -93,7 +93,7 @@ func (this *ReportController) ListReport() {
 	var pars []interface{}
 
 	if keyWord != "" {
-		condition += ` AND (title LIKE '%` + keyWord + `%' OR author LIKE '%` + keyWord + `%' ) `
+		condition += ` AND (title LIKE '%` + keyWord + `%' OR admin_real_name LIKE '%` + keyWord + `%' ) `
 	}
 	if startDate != "" {
 		condition += ` AND ` + timeType + ` >= ? `