zwxi 7 月之前
父节点
当前提交
1a200cd532
共有 2 个文件被更改,包括 15 次插入15 次删除
  1. 12 12
      controllers/hisugar_data.go
  2. 3 3
      models/data_manage/base_from_hisugar.go

+ 12 - 12
controllers/hisugar_data.go

@@ -58,17 +58,17 @@ func (this *TradeCommonController) HisugarIndexList() {
 		this.Data["json"] = br
 		this.ServeJSON()
 	}()
-	pageSize, _ := this.GetInt("PageSize")
-	currentIndex, _ := this.GetInt("CurrentIndex")
-	var startSize int
-
-	if pageSize <= 0 {
-		pageSize = utils.PageSize20
-	}
-	if currentIndex <= 0 {
-		currentIndex = 1
-	}
-	startSize = utils.StartIndex(currentIndex, pageSize)
+	//pageSize, _ := this.GetInt("PageSize")
+	//currentIndex, _ := this.GetInt("CurrentIndex")
+	//var startSize int
+	//
+	//if pageSize <= 0 {
+	//	pageSize = utils.PageSize20
+	//}
+	//if currentIndex <= 0 {
+	//	currentIndex = 1
+	//}
+	//startSize = utils.StartIndex(currentIndex, pageSize)
 
 	classifyId, _ := this.GetInt("ClassifyId")
 
@@ -87,7 +87,7 @@ func (this *TradeCommonController) HisugarIndexList() {
 	//	pars = append(pars, "%"+keyword+"%")
 	//}
 
-	indexList, e := data_manage.GetHisugarIndexViewList(condition, pars, startSize, pageSize)
+	indexList, e := data_manage.GetHisugarIndexViewList(condition, pars)
 	if e != nil {
 		br.Msg = "获取失败"
 		br.ErrMsg = "获取泛糖科技分类数据分类失败, Err: " + e.Error()

+ 3 - 3
models/data_manage/base_from_hisugar.go

@@ -250,7 +250,7 @@ func GetHisugarFrequencyByCondition(condition string, pars []interface{}) (items
 }
 
 // GetHisugarIndexViewList 根据分类id获取泛糖科技指标列表
-func GetHisugarIndexViewList(condition string, pars []interface{}, startSize, pageSize int) (items []*BaseFromHisugarIndexView, err error) {
+func GetHisugarIndexViewList(condition string, pars []interface{}) (items []*BaseFromHisugarIndexView, err error) {
 	o := orm.NewOrmUsingDB("data")
 	sql := ` SELECT b.*, e.edb_info_id,
 	CASE WHEN e.edb_info_id IS NULL THEN 0 ELSE 1 END AS edb_exist
@@ -260,8 +260,8 @@ func GetHisugarIndexViewList(condition string, pars []interface{}, startSize, pa
 	if condition != "" {
 		sql += condition
 	}
-	sql += ` ORDER BY b.modify_time ASC LIMIT ?,? `
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	sql += ` ORDER BY b.modify_time ASC `
+	_, err = o.Raw(sql, pars).QueryRows(&items)
 	return
 }