query.go 307 B

12345678910
  1. package business_conf
  2. import "hongze/hongze_yb/global"
  3. // GetItemByConfKey 获取配置项
  4. func (b *BusinessConf) GetItemByConfKey(key string) (item *BusinessConf, err error) {
  5. sql := `SELECT * FROM business_conf WHERE conf_key = ? `
  6. err = global.MYSQL["eta"].Raw(sql, key).First(&item).Error
  7. return
  8. }