...
|
...
|
@@ -129,12 +129,20 @@ class PlusstarData |
|
|
|
|
|
// 客户端类型
|
|
|
$clientType = $isApp ? 'iphone' : 'h5';
|
|
|
$isUidOk = $uid && is_numeric($uid);
|
|
|
$key = CacheConfig::KEY_ACTION_GUANG_PLUSTAR_DATA . strval($id) . $clientType;
|
|
|
|
|
|
if (USE_CACHE) {
|
|
|
// 先尝试获取二级缓存(slave), 有数据则直接返回.
|
|
|
$cached = Cache::get($key, 'master');
|
|
|
if (!empty($cached)) {
|
|
|
// 判断用户是否已收藏
|
|
|
if ($isUidOk) {
|
|
|
$getUidBrandFav = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_FAVORITE, 'getUidBrandFav', array($uid, $cached['getBrandInfo']['brand_id']), false, 1000);
|
|
|
if (isset($getUidBrandFav['code']) && $getUidBrandFav['code'] == 200) {
|
|
|
$cached['getUidBrandFav'] = true;
|
|
|
}
|
|
|
}
|
|
|
return $cached;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -148,7 +156,6 @@ class PlusstarData |
|
|
}
|
|
|
|
|
|
// // 是否收藏店铺
|
|
|
// $isUidOk = $uid && is_numeric($uid);
|
|
|
// if ($isUidOk) {
|
|
|
// Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_FAVORITE, 'getUidBrandFav', array($uid, $brandInfo['data']['brand_id']), function($retval) use(&$result) {
|
|
|
// $result['getUidBrandFav'] = (isset($retval['message']) && $retval['message'] == 'favorite') ? true : false;
|
...
|
...
|
|