|
@@ -6,7 +6,6 @@ import (
|
|
|
"eta/eta_api/models/data_manage"
|
|
|
"eta/eta_api/utils"
|
|
|
"fmt"
|
|
|
- "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
)
|
|
|
|
|
|
// FenWeiIndexAddValidate 指标添加校验
|
|
@@ -122,14 +121,14 @@ func FenWeiIndexAdd(req data_manage.FenWeiIndexAddReq, lang string) (edb *data_m
|
|
|
}
|
|
|
edb = edbInfo
|
|
|
|
|
|
- // todo EdbInfoAdd方法已经新增es,这里不需要再新增???
|
|
|
+ // EdbInfoAdd方法已经新增es,这里不需要再新增???
|
|
|
// 新增es
|
|
|
// go AddOrEditEdbInfoToEs(edbInfo.EdbInfoId)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
// GetFenWeiIndexInfo 获取指标信息-分页
|
|
|
-func GetFenWeiIndexInfo(keyWord string, classifyIdList []string, frequencyList []string, currentIndex int, pageSize int) (baseFromFenWeiIndexPage *data_manage.BaseFromFenWeiIndexPage, err error) {
|
|
|
+func GetFenWeiIndexInfo(keyWord string, classifyIdList []string, frequencyList []string) (fenWeiIndexInfoList []*data_manage.BaseFromFenweiIndex, err error) {
|
|
|
|
|
|
// 获取指标
|
|
|
var condition string
|
|
@@ -154,27 +153,10 @@ func GetFenWeiIndexInfo(keyWord string, classifyIdList []string, frequencyList [
|
|
|
condition = condition[:len(condition)-1] + `)`
|
|
|
}
|
|
|
|
|
|
- count, err := data_manage.GetFenWeiIndexInfoCount(condition, pars)
|
|
|
+ fenWeiIndexInfoList, err = data_manage.GetFenWeiIndexInfoPage(condition, pars)
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
- page := paging.GetPaging(currentIndex, pageSize, count)
|
|
|
- if count <= 0 {
|
|
|
- baseFromFenWeiIndexPage = &data_manage.BaseFromFenWeiIndexPage{
|
|
|
- List: []*data_manage.BaseFromFenweiIndex{},
|
|
|
- Paging: page,
|
|
|
- }
|
|
|
- return
|
|
|
- }
|
|
|
|
|
|
- startSize := utils.StartIndex(currentIndex, pageSize)
|
|
|
- fenWeiIndexInfoList, err := data_manage.GetFenWeiIndexInfoPage(condition, pars, startSize, pageSize)
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
- baseFromFenWeiIndexPage = &data_manage.BaseFromFenWeiIndexPage{
|
|
|
- List: fenWeiIndexInfoList,
|
|
|
- Paging: page,
|
|
|
- }
|
|
|
return
|
|
|
}
|