123456789101112131415161718192021222324252627282930 |
- package models
- import (
- "eta_gn/eta_index_lib/global"
- "time"
- )
- // EdbDataInsertConfig 指标数据插入配置表
- type EdbDataInsertConfig struct {
- EdbInfoId int `gorm:"primaryKey;autoIncrement;column:edb_info_id" description:"指标id"`
- Date time.Time `description:"插入的日期"`
- Value string `description:"插入的值"`
- RealDate time.Time `description:"实际数据的日期"`
- ModifyTime time.Time `description:"数据更新时间"`
- CreateTime time.Time `description:"数据插入的时间"`
- }
- // GetEdbDataInsertConfigByEdbId 根据指标id 获取数据插入配置详情
- func GetEdbDataInsertConfigByEdbId(edbInfoId int) (item *EdbDataInsertConfig, err error) {
- sql := ` SELECT * FROM edb_data_insert_config WHERE edb_info_id=? `
- err = global.DEFAULT_DmSQL.Raw(sql, edbInfoId).First(&item).Error
- return
- }
- // DeleteEdbDataInsertConfigByEdbId 根据指标id 删除数据插入配置详情
- func DeleteEdbDataInsertConfigByEdbId(edbInfoId int) (err error) {
- sql := ` DELETE FROM edb_data_insert_config WHERE edb_info_id=? `
- err = global.DEFAULT_DmSQL.Exec(sql, edbInfoId).Error
- return
- }
|