hongze 7 months ago
parent
commit
e3a22c6680
2 changed files with 3 additions and 1 deletions
  1. 2 0
      models/report_approve/report_approve_flow.go
  2. 1 1
      models/search_key_word.go

+ 2 - 0
models/report_approve/report_approve_flow.go

@@ -171,6 +171,8 @@ func (m *ReportApproveFlow) GetPageItemsByCondition(condition string, pars []int
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
 	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
 	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }

+ 1 - 1
models/search_key_word.go

@@ -28,7 +28,7 @@ func AddTrendTagKeyWord(trend string) (err error) {
 // GetKeyWordListByFrom 根据来源获取搜索关键词列表
 func GetKeyWordListByFrom(from string) (list []*SearchKeyWord, err error) {
 	//o := orm.NewOrm()
-	sql := " SELECT * FROM search_key_word WHERE `from` = ? ORDER BY created_time ASC "
+	sql := ` SELECT * FROM search_key_word WHERE "from" = ? ORDER BY created_time ASC `
 	//_, err = o.Raw(sql, from).QueryRows(&list)
 	err = global.DEFAULT_DmSQL.Raw(sql, from).Find(&list).Error
 	return