xyxie 1 жил өмнө
parent
commit
9bbf6c31da

+ 3 - 3
controllers/english_report/report.go

@@ -2,14 +2,14 @@ package english_report
 
 import (
 	"encoding/json"
-	"fmt"
-	"github.com/rdlucklib/rdluck_tools/paging"
 	"eta/eta_mobile/controllers"
 	"eta/eta_mobile/models"
 	"eta/eta_mobile/models/company"
 	"eta/eta_mobile/services"
 	"eta/eta_mobile/services/alarm_msg"
 	"eta/eta_mobile/utils"
+	"fmt"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"html"
 	"sort"
 	"strconv"
@@ -372,7 +372,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 == "" {
 		timeType = "publish_time"

+ 4 - 4
controllers/report.go

@@ -2,13 +2,13 @@ package controllers
 
 import (
 	"encoding/json"
-	"fmt"
-	"github.com/beego/beego/v2/server/web"
-	"github.com/rdlucklib/rdluck_tools/paging"
 	"eta/eta_mobile/models"
 	"eta/eta_mobile/services"
 	"eta/eta_mobile/services/alarm_msg"
 	"eta/eta_mobile/utils"
+	"fmt"
+	"github.com/beego/beego/v2/server/web"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"html"
 	"os"
 	"path"
@@ -85,7 +85,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 + ` >= ? `