target.go 989 B

123456789101112131415161718192021222324252627
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. )
  5. type Edbinfo struct {
  6. TradeCode string `orm:"column(TRADE_CODE);pk" description:"指标code"`
  7. SecName string `orm:"column(SEC_NAME);" description:"指标名称"`
  8. Unit string `orm:"column(UNIT);" description:"单位"`
  9. Remark string `orm:"column(REMARK);" description:"备注"`
  10. Frequency string `description:"频度"`
  11. ClassifyId int `description:"分类id"`
  12. ClassifyName string `description:"分类名称"`
  13. CreateDate string `description:"创建时间"`
  14. UserId int `description:"录入用户id"`
  15. UserName string `description:"录入用户名称"`
  16. NoticeTime string `description:"通知时间"`
  17. Mobile string `description:"录入者手机号"`
  18. }
  19. func GetEdbinfoByTradeCode(tradeCode string) (item *Edbinfo, err error) {
  20. sql := `SELECT * FROM edbinfo WHERE TRADE_CODE=? `
  21. o := orm.NewOrmUsingDB("edb")
  22. err = o.Raw(sql, tradeCode).QueryRow(&item)
  23. return
  24. }