123456789101112131415161718192021 |
- package data_manage
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- type GlIndex struct {
- Id int `orm:"column(ID)"`
- IndexCode string `orm:"column(INDEX_CODE)"`
- IndexName string `orm:"column(INDEX_NAME)"`
- UnitName string `orm:"column(UNIT_NAME)"`
- FrequencyName string `orm:"column(FREQUENCY_NAME)"`
- UpdateTime string `orm:"column(UPDATE_TIME)"`
- }
- func GetGlIndexByCode(indexCode string) (items *GlIndex, err error) {
- sql := ` SELECT * FROM mb_index_main_info WHERE INDEX_CODE=? `
- o := orm.NewOrmUsingDB("gl")
- err = o.Raw(sql, indexCode).QueryRow(&items)
- return
- }
|