|
@@ -1037,3 +1037,48 @@ func (this *TradeCommonController) GetHisugarIndexInfo() {
|
|
|
br.Msg = "获取成功"
|
|
|
br.Data = indexInfoPage
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+// FrequencyList
|
|
|
+// @Title 指标频度列表
|
|
|
+// @Description 指标频度列表
|
|
|
+// @Success 200 string "获取成功"
|
|
|
+// @router /data/hisugar/frequency_list [get]
|
|
|
+func (this *TradeCommonController) FrequencyList() {
|
|
|
+ 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"
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ classifyId, _ := this.GetInt("ClassifyId")
|
|
|
+
|
|
|
+ var condition string
|
|
|
+ var pars []interface{}
|
|
|
+
|
|
|
+ if classifyId > 0 {
|
|
|
+ condition += ` AND classify_id=? `
|
|
|
+ pars = append(pars, classifyId)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ frequencies, err := data_manage.GetHisugarFrequencyByCondition(condition, pars)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("GetSciFrequency err:", err.Error())
|
|
|
+ utils.FileLog.Info("GetSciFrequency err:" + err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ br.Data = frequencies
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+}
|