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("file_bucket_scheme", "file_bucket_host") if strings.Contains(img, "http") == false && img != "" { img = sysCfg["file_bucket_scheme"] + "://" + sysCfg["file_bucket_host"] + img } return img }