附近小店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
473 B

  1. package offical
  2. import (
  3. "applet/app/db"
  4. officialModel "applet/app/db/offical/model"
  5. )
  6. func SysCfgByKey(key string) *officialModel.SysCfg {
  7. var data officialModel.SysCfg
  8. get, err := db.Db.Where("k=?", key).Get(&data)
  9. if get == false || err != nil {
  10. return nil
  11. }
  12. return &data
  13. }
  14. func SysCfgByKeyStr(key string) string {
  15. var data officialModel.SysCfg
  16. get, err := db.Db.Where("k=?", key).Get(&data)
  17. if get == false || err != nil {
  18. return ""
  19. }
  20. return data.V
  21. }