|
@@ -29,7 +29,7 @@ type BaseFromSciHqIndexView struct {
|
|
|
ClassifyId int `description:"指标分类id"`
|
|
|
IndexCode string `description:"指标编码"`
|
|
|
IndexName string `description:"指标名称"`
|
|
|
- Unit string `description:"单位"`
|
|
|
+ UniqueCode string `description:"唯一code"`
|
|
|
Frequency string `description:"频度"`
|
|
|
StartDate string `description:"开始日期"`
|
|
|
EndDate string `description:"结束日期"`
|
|
@@ -166,9 +166,9 @@ func GetSciHqIndexByPage(startSize, pageSize int) (items []*BaseFromSciHqIndex,
|
|
|
}
|
|
|
|
|
|
// GetSciHqIndexBaseInfoByClassifyId 根据分类id获取卓创红期指标列表
|
|
|
-func GetSciHqIndexBaseInfoByClassifyId(classifyId int) (items []*BaseFromSciHqIndex, err error) {
|
|
|
+func GetSciHqIndexBaseInfoByClassifyId(classifyId int) (items []*BaseFromSciHqIndexView, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
- sql := ` SELECT base_from_sci_hq_index_id, classify_id, index_code, index_name FROM base_from_sci_hq_index WHERE classify_id = ? ORDER BY sort ASC `
|
|
|
+ sql := ` SELECT base_from_sci_hq_index_id, classify_id, index_code, index_name, CONCAT(classify_id, '_', base_from_sci_hq_index_id) AS unique_code FROM base_from_sci_hq_index WHERE classify_id = ? ORDER BY sort ASC `
|
|
|
_, err = o.Raw(sql, classifyId).QueryRows(&items)
|
|
|
return
|
|
|
}
|