|
@@ -146,11 +146,14 @@ class MeituanLianmengUtilV1 extends BaseUtil
|
|
{
|
|
{
|
|
$key = "meituanUrl:".$userId."linktype:".$linkType."actid:".$actId;
|
|
$key = "meituanUrl:".$userId."linktype:".$linkType."actid:".$actId;
|
|
$val = self::getCacheFromRedis($key);
|
|
$val = self::getCacheFromRedis($key);
|
|
|
|
+ $instance = new LoggerFactoryUtil(MeituanLianmengUtilV1::class);
|
|
if($val){
|
|
if($val){
|
|
|
|
+ $instance->info("从缓存中获取美团链接");
|
|
return $val;
|
|
return $val;
|
|
}
|
|
}
|
|
//不存在则从官方获取
|
|
//不存在则从官方获取
|
|
$val = self::generateLink($actId,$spreadId,$linkType);
|
|
$val = self::generateLink($actId,$spreadId,$linkType);
|
|
|
|
+ $instance->info("从接口中获取美团链接");
|
|
self::setRedisCache($key,$val,0);
|
|
self::setRedisCache($key,$val,0);
|
|
return $val;
|
|
return $val;
|
|
}
|
|
}
|