Authored by hf

code review by fei.hong: do merge yang.yang and shaofeng.zhou fixes bugs codes

... ... @@ -78,7 +78,7 @@ class BrandData
*/
public static function getBrandLogoByDomain($domain, $fields = 'less')
{
return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URL_BRAND_LOGO, 'getBrandByDomain', array($domain, $fields));
return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URL_BRAND_LOGO, 'getBrandByDomain', array($domain, $fields), 600);
}
/**
... ...
... ... @@ -266,6 +266,9 @@ class HelperSearch
$val['default_images'] = $v['images_url'];
}
}
if (!$defaultGood) {
continue;
}
$defaultUrl = Helpers::getUrlBySkc($val['product_id'], $defaultGood, $val['cn_alphabet']);
$cover = $cover ? $cover : $skcPic ;
if ($cover) {
... ... @@ -286,7 +289,7 @@ class HelperSearch
//即将售罄
$isFew = $val['is_soon_sold_out'] === 'Y' ? true : false;
//SALE
$isSale = ($val['is_discount'] == 'Y' && $val['market_price']/$val['sales_price'] >= 2) ? true : false;
$isSale = ($val['is_discount'] == 'Y' && $val['market_price']/$val['sales_price'] > 2) ? true : false;
//新品节
//再到着
//年终大促
... ...
... ... @@ -77,12 +77,12 @@ class BrandsModel
$urlList = array();
if (USE_CACHE) {
$key = WebCacheConfig::KEY_WEB_PRODUCT_INDEX_BRANDINTRO;
if (!empty($customOptions['userInput'])) {
$key .= http_build_query($customOptions['userInput'], null, '&');
if (!empty($customOptions['brandId'])) {
$key .= $customOptions['brandId'];
}
if (!empty($customOptions['brandName'])) {
$key .= $customOptions['brandName'];
}
$channel = HomeModel::getSwitchChannel();
//key加上性别参数
$key .= $channel;
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result = Cache::get($key, 'master');
if (!empty($result)) {
... ...