Browse Source

fix:图标详情,新增返回指标类型:1:基础指标,2:计算指标

Roc 3 years ago
parent
commit
9c03cfa560
1 changed files with 3 additions and 2 deletions
  1. 3 2
      models/chart.go

+ 3 - 2
models/chart.go

@@ -3,8 +3,8 @@ package models
 import (
 	"errors"
 	"fmt"
-	"hongze/hongze_chart_lib/utils"
 	"github.com/rdlucklib/rdluck_tools/orm"
+	"hongze/hongze_chart_lib/utils"
 	"strconv"
 	"time"
 
@@ -58,6 +58,7 @@ type ChartEdbInfoMapping struct {
 	IsOrder     bool    `description:"true:正序,false:逆序"`
 	IsAxis      int     `description:"1:左轴,0:右轴"`
 	EdbInfoType int     `description:"1:标准指标,0:领先指标"`
+	EdbType int     `description:"指标类型:1:基础指标,2:计算指标"`
 	LeadValue   int     `description:"领先值"`
 	LeadUnit    string  `description:"领先单位"`
 	ChartStyle  string  `description:"图表类型"`
@@ -69,7 +70,7 @@ type ChartEdbInfoMapping struct {
 func GetChartEdbMappingList(chartInfoId int) (list []*ChartEdbInfoMapping, err error) {
 	o := orm.NewOrm()
 	o.Using("data")
-	sql := ` SELECT a.*,b.source_name,b.source,b.edb_code,b.edb_name,b.frequency,b.unit,b.start_date,b.end_date,b.modify_time 
+	sql := ` SELECT a.*,b.source_name,b.source,b.edb_code,b.edb_name,b.frequency,b.unit,b.start_date,b.end_date,b.modify_time,b.edb_type
              FROM chart_edb_mapping AS a
 			 INNER JOIN edb_info AS b ON a.edb_info_id=b.edb_info_id
 			 WHERE chart_info_id=?