Răsfoiți Sursa

Merge branch 'ETA_2.0.5' into debug

zwxi 7 luni în urmă
părinte
comite
084b14b980
2 a modificat fișierele cu 17 adăugiri și 17 ștergeri
  1. 12 12
      controllers/hisugar_data.go
  2. 5 5
      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()

+ 5 - 5
models/data_manage/base_from_hisugar.go

@@ -250,18 +250,18 @@ 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
 	FROM base_from_hisugar_index AS b
-	LEFT JOIN edb_info AS e ON b.index_code=e.edb_code AND e.source=89
+	LEFT JOIN edb_info AS e ON b.index_code=e.edb_code AND e.source=93
 	WHERE 1=1   `
 	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
 }
 
@@ -270,7 +270,7 @@ func GetHisugarIndexViewListCount(condition string, pars []interface{}) (count i
 	o := orm.NewOrmUsingDB("data")
 	sql := ` SELECT COUNT(1) AS count
 	FROM base_from_hisugar_index AS b
-	LEFT JOIN edb_info AS e ON b.index_code=e.edb_code AND e.source=89
+	LEFT JOIN edb_info AS e ON b.index_code=e.edb_code AND e.source=93
 	WHERE 1=1   `
 	if condition != "" {
 		sql += condition