mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
增加存储字段,小数点,倍数,和昨收价(对指数有效,个股无效)
This commit is contained in:
9
codes.go
9
codes.go
@@ -123,6 +123,9 @@ func (this *Codes) Code(byDatabase bool) ([]*CodeModel, error) {
|
||||
Name: v.Name,
|
||||
Code: v.Code,
|
||||
Exchange: exchange.String(),
|
||||
Multiple: v.Multiple,
|
||||
Decimal: v.Decimal,
|
||||
LastPrice: v.LastPrice,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
@@ -130,6 +133,9 @@ func (this *Codes) Code(byDatabase bool) ([]*CodeModel, error) {
|
||||
Name: v.Name,
|
||||
Code: v.Code,
|
||||
Exchange: exchange.String(),
|
||||
Multiple: v.Multiple,
|
||||
Decimal: v.Decimal,
|
||||
LastPrice: v.LastPrice,
|
||||
}
|
||||
insert = append(insert, code)
|
||||
list = append(list, code)
|
||||
@@ -164,6 +170,9 @@ type CodeModel struct {
|
||||
Name string `json:"name"` //名称,有时候名称会变,例STxxx
|
||||
Code string `json:"code" xorm:"index"` //代码
|
||||
Exchange string `json:"exchange" xorm:"index"` //交易所
|
||||
Multiple uint16 `json:"multiple"` //倍数
|
||||
Decimal int8 `json:"decimal"` //小数位
|
||||
LastPrice float64 `json:"lastPrice"` //昨收价格
|
||||
EditDate int64 `json:"editDate" xorm:"updated"` //修改时间
|
||||
InDate int64 `json:"inDate" xorm:"created"` //创建时间
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user