code review by fei.hong: do merge yang.yang and shaofeng.zhou fixes bugs codes
Showing
3 changed files
with
10 additions
and
7 deletions
@@ -78,7 +78,7 @@ class BrandData | @@ -78,7 +78,7 @@ class BrandData | ||
78 | */ | 78 | */ |
79 | public static function getBrandLogoByDomain($domain, $fields = 'less') | 79 | public static function getBrandLogoByDomain($domain, $fields = 'less') |
80 | { | 80 | { |
81 | - return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URL_BRAND_LOGO, 'getBrandByDomain', array($domain, $fields)); | 81 | + return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URL_BRAND_LOGO, 'getBrandByDomain', array($domain, $fields), 600); |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
@@ -266,6 +266,9 @@ class HelperSearch | @@ -266,6 +266,9 @@ class HelperSearch | ||
266 | $val['default_images'] = $v['images_url']; | 266 | $val['default_images'] = $v['images_url']; |
267 | } | 267 | } |
268 | } | 268 | } |
269 | + if (!$defaultGood) { | ||
270 | + continue; | ||
271 | + } | ||
269 | $defaultUrl = Helpers::getUrlBySkc($val['product_id'], $defaultGood, $val['cn_alphabet']); | 272 | $defaultUrl = Helpers::getUrlBySkc($val['product_id'], $defaultGood, $val['cn_alphabet']); |
270 | $cover = $cover ? $cover : $skcPic ; | 273 | $cover = $cover ? $cover : $skcPic ; |
271 | if ($cover) { | 274 | if ($cover) { |
@@ -286,7 +289,7 @@ class HelperSearch | @@ -286,7 +289,7 @@ class HelperSearch | ||
286 | //即将售罄 | 289 | //即将售罄 |
287 | $isFew = $val['is_soon_sold_out'] === 'Y' ? true : false; | 290 | $isFew = $val['is_soon_sold_out'] === 'Y' ? true : false; |
288 | //SALE | 291 | //SALE |
289 | - $isSale = ($val['is_discount'] == 'Y' && $val['market_price']/$val['sales_price'] >= 2) ? true : false; | 292 | + $isSale = ($val['is_discount'] == 'Y' && $val['market_price']/$val['sales_price'] > 2) ? true : false; |
290 | //新品节 | 293 | //新品节 |
291 | //再到着 | 294 | //再到着 |
292 | //年终大促 | 295 | //年终大促 |
@@ -77,12 +77,12 @@ class BrandsModel | @@ -77,12 +77,12 @@ class BrandsModel | ||
77 | $urlList = array(); | 77 | $urlList = array(); |
78 | if (USE_CACHE) { | 78 | if (USE_CACHE) { |
79 | $key = WebCacheConfig::KEY_WEB_PRODUCT_INDEX_BRANDINTRO; | 79 | $key = WebCacheConfig::KEY_WEB_PRODUCT_INDEX_BRANDINTRO; |
80 | - if (!empty($customOptions['userInput'])) { | ||
81 | - $key .= http_build_query($customOptions['userInput'], null, '&'); | 80 | + if (!empty($customOptions['brandId'])) { |
81 | + $key .= $customOptions['brandId']; | ||
82 | + } | ||
83 | + if (!empty($customOptions['brandName'])) { | ||
84 | + $key .= $customOptions['brandName']; | ||
82 | } | 85 | } |
83 | - $channel = HomeModel::getSwitchChannel(); | ||
84 | - //key加上性别参数 | ||
85 | - $key .= $channel; | ||
86 | // 先尝试获取一级缓存(master), 有数据则直接返回. | 86 | // 先尝试获取一级缓存(master), 有数据则直接返回. |
87 | $result = Cache::get($key, 'master'); | 87 | $result = Cache::get($key, 'master'); |
88 | if (!empty($result)) { | 88 | if (!empty($result)) { |
-
Please register or login to post a comment