package offical

import (
	"applet/app/db"
	officialModel "applet/app/db/offical/model"
)

func SysCfgByKey(key string) *officialModel.SysCfg {
	var data officialModel.SysCfg
	get, err := db.Db.Where("k=?", key).Get(&data)
	if get == false || err != nil {
		return nil
	}
	return &data
}
func SysCfgByKeyStr(key string) string {
	var data officialModel.SysCfg
	get, err := db.Db.Where("k=?", key).Get(&data)
	if get == false || err != nil {
		return ""
	}
	return data.V
}
