package svc import ( "applet/app/db" "applet/app/utils/cache" "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" "strings" ) func GetOssUrl(img string) string { redisConn := cache.GetPool().Get() sysCfgDb := implement.NewSysCfgDb(db.Db, redisConn) sysCfg := sysCfgDb.SysCfgFindWithDb("oss_domain") if strings.Contains(img, "http") == false && img != "" { http := "" if strings.Contains(sysCfg["oss_domain"], "http") == false { http = "http://" } img = http + sysCfg["oss_domain"] + img } return img } func GetSysCfgStr(key string) string { redisConn := cache.GetPool().Get() sysCfgDb := implement.NewSysCfgDb(db.Db, redisConn) return sysCfgDb.SysCfgGetWithDb(key) }