12345678910111213141516171819202122232425262728293031323334353637 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type EdbInfoCalculateItemReq struct {
- EdbCode string `description:"指标编码"`
- }
- type EdbInfoCalculateMapping struct {
- EdbInfoCalculateMappingId int `orm:"column(edb_info_calculate_mapping_id);pk"`
- EdbInfoId int `description:"计算指标id"`
- Source int `description:"计算指标来源"`
- SourceName string `description:"计算指标来源名称"`
- EdbCode string `description:"计算指标编码"`
- FromEdbInfoId int `description:"基础指标id"`
- FromEdbCode string `description:"基础指标编码"`
- FromEdbName string `description:"基础指标名称"`
- FromSource int `description:"基础指标来源"`
- FromSourceName string `description:"基础指标来源名称"`
- FromTag string `description:"来源指标标签"`
- MoveValue int `description:"移动的值,小于0是提前,0是不变,大于0是滞后"`
- Sort int `description:"计算指标名称排序"`
- CreateTime time.Time `description:"创建时间"`
- ModifyTime time.Time `description:"修改时间"`
- }
- func GetEdbInfoCalculateMappingByEdbCode(edbCode string) (list []*EdbInfoCalculateMapping, err error) {
- o := orm.NewOrm()
- sql := ` SELECT * FROM edb_info_calculate_mapping AS a
- WHERE a.edb_code=?
- ORDER BY a.edb_info_calculate_mapping_id ASC `
- _, err = o.Raw(sql, edbCode).QueryRows(&list)
- return
- }
|