|
@@ -38,34 +38,35 @@ type EdbInfo struct {
|
|
|
CreateTime time.Time
|
|
|
ModifyTime time.Time
|
|
|
BaseModifyTime time.Time
|
|
|
- MinValue float64 `description:"指标最小值"`
|
|
|
- MaxValue float64 `description:"指标最大值"`
|
|
|
- CalculateFormula string `description:"计算公式"`
|
|
|
- EdbType int `description:"指标类型:1:基础指标,2:计算指标"`
|
|
|
- Sort int `description:"排序字段"`
|
|
|
- LatestDate string `description:"数据最新日期(实际日期)"`
|
|
|
- LatestValue float64 `description:"数据最新值(实际值)"`
|
|
|
- EndValue float64 `description:"数据的最新值(预测日期的最新值)"`
|
|
|
- MoveType int `description:"移动方式:1:领先(默认),2:滞后"`
|
|
|
- MoveFrequency string `description:"移动频度"`
|
|
|
- NoUpdate int8 `description:"是否停止更新,0:继续更新;1:停止更新"`
|
|
|
- ServerUrl string `description:"服务器地址"`
|
|
|
- ChartImage string `description:"图表图片"`
|
|
|
- Calendar string `description:"公历/农历" orm:"default(公历);"`
|
|
|
- DataDateType string `orm:"column(data_date_type);size(255);null;default(交易日)"`
|
|
|
- ManualSave int `description:"是否有手动保存过上下限: 0-否; 1-是"`
|
|
|
- EmptyType int `description:"空值处理类型(0查找前后35天,1不计算,2前值填充,3后值填充,4等于0)"`
|
|
|
- MaxEmptyType int `description:"MAX、MIN公式空值处理类型(1、等于0;2、跳过空值)"`
|
|
|
- TerminalCode string `description:"终端编码,用于配置在机器上"`
|
|
|
- DataUpdateTime string `description:"最近一次数据发生变化的时间"`
|
|
|
- ErDataUpdateDate string `description:"本次更新,数据发生变化的最早日期"`
|
|
|
- SourceIndexName string `description:"数据源中的指标名称"`
|
|
|
- SubSource int `description:"子数据来源:0:经济数据库,1:日期序列"`
|
|
|
- SubSourceName string `description:"子数据来源名称"`
|
|
|
- IndicatorCode string `description:"指标代码"`
|
|
|
- StockCode string `description:"证券代码"`
|
|
|
- Extra string `description:"指标额外配置"`
|
|
|
- IsJoinPermission int `description:"是否加入权限管控,0:不加入;1:加入;默认:0"`
|
|
|
+ MinValue float64 `description:"指标最小值"`
|
|
|
+ MaxValue float64 `description:"指标最大值"`
|
|
|
+ CalculateFormula string `description:"计算公式"`
|
|
|
+ EdbType int `description:"指标类型:1:基础指标,2:计算指标"`
|
|
|
+ Sort int `description:"排序字段"`
|
|
|
+ LatestDate string `description:"数据最新日期(实际日期)"`
|
|
|
+ LatestValue float64 `description:"数据最新值(实际值)"`
|
|
|
+ EndValue float64 `description:"数据的最新值(预测日期的最新值)"`
|
|
|
+ MoveType int `description:"移动方式:1:领先(默认),2:滞后"`
|
|
|
+ MoveFrequency string `description:"移动频度"`
|
|
|
+ NoUpdate int8 `description:"是否停止更新,0:继续更新;1:停止更新"`
|
|
|
+ ServerUrl string `description:"服务器地址"`
|
|
|
+ ChartImage string `description:"图表图片"`
|
|
|
+ Calendar string `description:"公历/农历" orm:"default(公历);"`
|
|
|
+ DataDateType string `orm:"column(data_date_type);size(255);null;default(交易日)"`
|
|
|
+ ManualSave int `description:"是否有手动保存过上下限: 0-否; 1-是"`
|
|
|
+ EmptyType int `description:"空值处理类型(0查找前后35天,1不计算,2前值填充,3后值填充,4等于0)"`
|
|
|
+ MaxEmptyType int `description:"MAX、MIN公式空值处理类型(1、等于0;2、跳过空值)"`
|
|
|
+ TerminalCode string `description:"终端编码,用于配置在机器上"`
|
|
|
+ DataUpdateTime string `description:"最近一次数据发生变化的时间"`
|
|
|
+ ErDataUpdateDate string `description:"本次更新,数据发生变化的最早日期"`
|
|
|
+ SourceIndexName string `description:"数据源中的指标名称"`
|
|
|
+ SubSource int `description:"子数据来源:0:经济数据库,1:日期序列"`
|
|
|
+ SubSourceName string `description:"子数据来源名称"`
|
|
|
+ IndicatorCode string `description:"指标代码"`
|
|
|
+ StockCode string `description:"证券代码"`
|
|
|
+ Extra string `description:"指标额外配置"`
|
|
|
+ IsJoinPermission int `description:"是否加入权限管控,0:不加入;1:加入;默认:0"`
|
|
|
+ SetUpdateTime time.Time `description:"设置启用/禁用刷新状态的时间"`
|
|
|
}
|
|
|
|
|
|
type EdbInfoFullClassify struct {
|
|
@@ -1797,15 +1798,15 @@ func ModifyEdbInfoUpdateStatus(edbIdList []int, isStop int, calculateEdbInfoIds
|
|
|
}()
|
|
|
|
|
|
// 更改指标的更新状态
|
|
|
- sql := ` UPDATE edb_info SET no_update = ? WHERE edb_info_id IN (` + utils.GetOrmInReplace(idNum) + `) `
|
|
|
- _, err = o.Raw(sql, isStop, edbIdList).Exec()
|
|
|
+ sql := ` UPDATE edb_info SET no_update = ?, set_update_time=? WHERE edb_info_id IN (` + utils.GetOrmInReplace(idNum) + `) `
|
|
|
+ _, err = o.Raw(sql, isStop, time.Now(), edbIdList).Exec()
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
if len(calculateEdbInfoIds) > 0 {
|
|
|
// 批量更新相关联的指标ID
|
|
|
- sql = ` UPDATE edb_info SET no_update = ? WHERE edb_info_id IN (` + utils.GetOrmInReplace(len(calculateEdbInfoIds)) + `) `
|
|
|
- _, err = o.Raw(sql, isStop, calculateEdbInfoIds).Exec()
|
|
|
+ sql = ` UPDATE edb_info SET no_update = ?, set_update_time=? WHERE edb_info_id IN (` + utils.GetOrmInReplace(len(calculateEdbInfoIds)) + `) `
|
|
|
+ _, err = o.Raw(sql, isStop, time.Now(), calculateEdbInfoIds).Exec()
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|