|
@@ -249,7 +249,7 @@ func GetBaseFromCoalmineIndex(startDate, endDate string) (items []*BaseFromCoalm
|
|
|
}
|
|
|
|
|
|
type BaseFromCoalmineCompanyIndex struct {
|
|
|
- BaseFromCoalmineCompanyIndexId int `orm:"column(base_from_coalmine_company_index_id);pk" gorm:"primaryKey"`
|
|
|
+ BaseFromCoalmineCompanyIndexId int `gorm:"column:base_from_coalmine_company_index_id;primaryKey"`
|
|
|
IndexName string `description:"持买单量指标名称"`
|
|
|
IndexCode string `description:"持买单量指标编码"`
|
|
|
DealValue string `description:"成交量"`
|
|
@@ -264,6 +264,21 @@ type BaseFromCoalmineCompanyIndex struct {
|
|
|
ModifyTime string `description:"修改时间"`
|
|
|
}
|
|
|
|
|
|
+func (baseFromCoalmineCompanyIndex *BaseFromCoalmineCompanyIndex) AfterFind(tx *gorm.DB) (err error) {
|
|
|
+ if utils.NeedDateOrTimeFormat(utils.DbDriverName) {
|
|
|
+ if baseFromCoalmineCompanyIndex.CreateTime != "" {
|
|
|
+ baseFromCoalmineCompanyIndex.CreateTime = utils.GormDateStrToDateTimeStr(baseFromCoalmineCompanyIndex.CreateTime)
|
|
|
+ }
|
|
|
+ if baseFromCoalmineCompanyIndex.ModifyTime != "" {
|
|
|
+ baseFromCoalmineCompanyIndex.ModifyTime = utils.GormDateStrToDateTimeStr(baseFromCoalmineCompanyIndex.ModifyTime)
|
|
|
+ }
|
|
|
+ if baseFromCoalmineCompanyIndex.DataTime != "" {
|
|
|
+ baseFromCoalmineCompanyIndex.DataTime = utils.GormDateStrToDateStr(baseFromCoalmineCompanyIndex.DataTime)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// GetBaseFromCoalmineCompanyIndex 查询公司指标
|
|
|
func GetBaseFromCoalmineCompanyIndex(startDate, endDate string) (items []*BaseFromCoalmineCompanyIndex, err error) {
|
|
|
o := global.DbMap[utils.DbNameIndex]
|
|
@@ -287,6 +302,21 @@ type BaseFromCoalmineFirmIndex struct {
|
|
|
ModifyTime string `description:"修改时间"`
|
|
|
}
|
|
|
|
|
|
+func (baseFromCoalmineFirmIndex *BaseFromCoalmineFirmIndex) AfterFind(tx *gorm.DB) (err error) {
|
|
|
+ if utils.NeedDateOrTimeFormat(utils.DbDriverName) {
|
|
|
+ if baseFromCoalmineFirmIndex.CreateTime != "" {
|
|
|
+ baseFromCoalmineFirmIndex.CreateTime = utils.GormDateStrToDateTimeStr(baseFromCoalmineFirmIndex.CreateTime)
|
|
|
+ }
|
|
|
+ if baseFromCoalmineFirmIndex.ModifyTime != "" {
|
|
|
+ baseFromCoalmineFirmIndex.ModifyTime = utils.GormDateStrToDateTimeStr(baseFromCoalmineFirmIndex.ModifyTime)
|
|
|
+ }
|
|
|
+ if baseFromCoalmineFirmIndex.DataTime != "" {
|
|
|
+ baseFromCoalmineFirmIndex.DataTime = utils.GormDateStrToDateStr(baseFromCoalmineFirmIndex.DataTime)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// 查询指标
|
|
|
func GetBaseFromCoalmineFirmIndex(dataTime string) (items []*BaseFromCoalmineFirmIndex, err error) {
|
|
|
o := global.DbMap[utils.DbNameIndex]
|
|
@@ -350,6 +380,21 @@ type BaseFromCoalmineInlandIndex struct {
|
|
|
ModifyTime string `description:"修改时间"`
|
|
|
}
|
|
|
|
|
|
+func (baseFromCoalmineInlandIndex *BaseFromCoalmineInlandIndex) AfterFind(tx *gorm.DB) (err error) {
|
|
|
+ if utils.NeedDateOrTimeFormat(utils.DbDriverName) {
|
|
|
+ if baseFromCoalmineInlandIndex.CreateTime != "" {
|
|
|
+ baseFromCoalmineInlandIndex.CreateTime = utils.GormDateStrToDateTimeStr(baseFromCoalmineInlandIndex.CreateTime)
|
|
|
+ }
|
|
|
+ if baseFromCoalmineInlandIndex.ModifyTime != "" {
|
|
|
+ baseFromCoalmineInlandIndex.ModifyTime = utils.GormDateStrToDateTimeStr(baseFromCoalmineInlandIndex.ModifyTime)
|
|
|
+ }
|
|
|
+ if baseFromCoalmineInlandIndex.DataTime != "" {
|
|
|
+ baseFromCoalmineInlandIndex.DataTime = utils.GormDateStrToDateStr(baseFromCoalmineInlandIndex.DataTime)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// 查询指标
|
|
|
func GetBaseFromCoalmineInlandIndex(startDate, endDate string) (items []*BaseFromCoalmineInlandIndex, err error) {
|
|
|
o := global.DbMap[utils.DbNameIndex]
|