|
@@ -7,6 +7,7 @@ import (
|
|
|
"eta/eta_hub/utils"
|
|
|
"fmt"
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
+ "strings"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -20,6 +21,8 @@ type EnglishReportController struct {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
func (this *EnglishReportController) List() {
|
|
@@ -43,6 +46,18 @@ func (this *EnglishReportController) List() {
|
|
|
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
+ keyword := this.GetString("Keyword")
|
|
|
+ keyword = strings.TrimSpace(keyword)
|
|
|
+ if keyword != "" {
|
|
|
+ kw := fmt.Sprint("%", keyword, "%")
|
|
|
+ condition += ` AND title LIKE ? `
|
|
|
+ pars = append(pars, kw)
|
|
|
+ }
|
|
|
+ state, _ := this.GetInt("State")
|
|
|
+ if state > 0 {
|
|
|
+ condition += ` AND state = ? `
|
|
|
+ pars = append(pars, state)
|
|
|
+ }
|
|
|
|
|
|
reportOb := new(models.EnglishReport)
|
|
|
total, e := reportOb.GetCountByCondition(condition, pars)
|