12345678910111213141516171819202122 |
- package cygx_config
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CygxConfig struct {
- ConfigId int `json:"-" orm:"column(config_id);pk"`
- ConfigCode string `json:"-"`
- ConfigValue string
- Remark string `json:"-"`
- CreateTime time.Time `json:"-"`
- }
- func GetConfigByCode(configCode string) (item *CygxConfig, err error) {
- o := orm.NewOrmUsingDB("hz_cygx")
- sql := `SELECT * FROM cygx_config WHERE config_code=? `
- err = o.Raw(sql, configCode).QueryRow(&item)
- return
- }
|