|
@@ -7,6 +7,8 @@ import (
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
|
+
|
|
|
+ "gorm.io/gorm"
|
|
|
)
|
|
|
|
|
|
// BaseFromBloombergIndex Bloomberg原始指标
|
|
@@ -168,6 +170,10 @@ type BloombergData struct {
|
|
|
InputValue float64 `orm:"column(value)" description:"值"`
|
|
|
DataTime string `orm:"column(data_time)" description:"日期"`
|
|
|
}
|
|
|
+func (m *BloombergData) AfterFind(c *gorm.DB) (err error) {
|
|
|
+ m.DataTime = utils.GormDateStrToDateStr(m.DataTime)
|
|
|
+ return
|
|
|
+}
|
|
|
|
|
|
func GetBloombergDataByCondition(condition string, pars []interface{}) (item []*BloombergData, err error) {
|
|
|
sql1 := ` SELECT * FROM base_from_bloomberg_data WHERE 1=1 `
|