|
@@ -850,7 +850,7 @@ func getHisugarClassifyTree(items []*data_manage.BaseFromHisugarClassifyItem, pa
|
|
|
// @Param Frequency query string true "频率"
|
|
|
// @Success 200 {object} data_manage.LzFrequency
|
|
|
// @router /data/hisugar/index/data [get]
|
|
|
-func (this *TradeCommonController) FenweiIndexData() {
|
|
|
+func (this *TradeCommonController) HisugarIndexData() {
|
|
|
br := new(models.BaseResponse).Init()
|
|
|
defer func() {
|
|
|
if br.ErrMsg == "" {
|
|
@@ -969,4 +969,64 @@ func (this *TradeCommonController) FenweiIndexData() {
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|
|
|
br.Data = resultList
|
|
|
+}
|
|
|
+
|
|
|
+// GetFenWeiIndexInfo
|
|
|
+// @Title 添加指标-根据条件获取指标信息
|
|
|
+// @Description 添加指标-根据条件获取指标信息
|
|
|
+// @Param KeyWord query string false "关键字"
|
|
|
+// @Param ClassifyIds query string false "分类id"
|
|
|
+// @Param Frequencies query string false "频率"
|
|
|
+// @Param PageSize query int false "每页数据条数"
|
|
|
+// @Param CurrentIndex query int false "当前页页码,从1开始"
|
|
|
+// @Success 200 {object} data_manage.BaseFromFenWeiIndexPage
|
|
|
+// @router /data/hisugar/index/info [get]
|
|
|
+func (this *TradeCommonController) GetHisugarIndexInfo() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ if br.ErrMsg == "" {
|
|
|
+ br.IsSendEmail = false
|
|
|
+ }
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ sysUser := this.SysUser
|
|
|
+ if sysUser == nil {
|
|
|
+ br.Msg = "请登录"
|
|
|
+ br.ErrMsg = "请登录,SysUser Is Empty"
|
|
|
+ br.Ret = 408
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ pageSize, _ := this.GetInt("PageSize")
|
|
|
+ currentIndex, _ := this.GetInt("CurrentIndex")
|
|
|
+
|
|
|
+ if pageSize <= 0 {
|
|
|
+ pageSize = utils.PageSize20
|
|
|
+ }
|
|
|
+ if currentIndex <= 0 {
|
|
|
+ currentIndex = 1
|
|
|
+ }
|
|
|
+
|
|
|
+ keyWord := this.GetString("KeyWord")
|
|
|
+ classifyIds := this.GetString("ClassifyIds")
|
|
|
+ frequencies := this.GetString("Frequencies")
|
|
|
+
|
|
|
+ var classifyIdList []string
|
|
|
+ var frequencyList []string
|
|
|
+ if classifyIds != "" {
|
|
|
+ classifyIdList = strings.Split(classifyIds, ",")
|
|
|
+ }
|
|
|
+ if frequencies != "" {
|
|
|
+ frequencyList = strings.Split(frequencies, ",")
|
|
|
+ }
|
|
|
+ indexInfoPage, err := data.GethisugarIndexInfo(keyWord, classifyIdList, frequencyList, currentIndex, pageSize)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ br.Data = indexInfoPage
|
|
|
}
|