Commit 83407fe5 authored by zhz's avatar zhz

store

parent d0a17eba
...@@ -619,7 +619,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -619,7 +619,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$commonInstance = \DAO\GoodsCommonModel::getInstance(); $commonInstance = \DAO\GoodsCommonModel::getInstance();
$count = \Our\RedisHelper::cachedFunction(\Redis\Db4\GoodsCommonRedisModel::getInstance(),array(&$commonInstance, 'getCount'),array(array('store_id'=>$storeId)),\Our\ApiConst::oneDaySecond); $count = \Our\RedisHelper::cachedFunction(\Redis\Db4\GoodsCommonRedisModel::getInstance(),array(&$commonInstance, 'getCount'),array(array('store_id'=>$storeId)),\Our\ApiConst::oneDaySecond);
return array('storeId'=>$storeId,'storeName'=>$storeInfo['store_name'],'storeLabel'=>\DAO\StoreModel::getInstance()->getStoreLabelSrc($storeInfo['store_label'],\Our\ImageConst::goodsStoreImg),'goodsTotal'=>$count,'isQuality'=>$storeInfo['store_zhping'],'freeShippingPrice'=>$storeInfo['free_shipping_price'],'shareDesc'=>$storeInfo['store_share_desc'],'memberId'=>$storeInfo['member_id']); return array('storeId'=>$storeId,'storeName'=>$storeInfo['store_name'],'storeLabel'=>\DAO\StoreModel::getInstance()->getStoreLabelSrc($storeInfo['store_label'],\Our\ImageConst::goodsStoreImg),'goodsTotal'=>$count,'isQuality'=>$storeInfo['store_zhping'],'freeShippingPrice'=>$storeInfo['free_shipping_price'],'shareDesc'=>$storeInfo['store_share_desc'],'memberId'=>$storeInfo['member_id'],'isClose'=>$storeInfo['isClose']);
} }
/** /**
......
...@@ -138,7 +138,7 @@ class StoreServiceModel extends \Business\AbstractModel{ ...@@ -138,7 +138,7 @@ class StoreServiceModel extends \Business\AbstractModel{
$businessHours = $storeInfo['store_start_time'].' - '.$storeInfo['store_close_time']; $businessHours = $storeInfo['store_start_time'].' - '.$storeInfo['store_close_time'];
$sellerDistribution = $storeInfo['seller_distribution']; $sellerDistribution = $storeInfo['seller_distribution'];
$buyerDistribution = $storeInfo['buyer_distribution']; $buyerDistribution = $storeInfo['buyer_distribution'];
return array('storeLabel'=>$storeLabel,'storeName'=>$storeInfo['store_name'],'grade'=>$grade,'fansCount'=>\DAO\FavoritesStoreModel::getInstance()->getFavoritesStoreCountByStoreId($storeId),'favType'=>$favType,'monthlySalesCount'=>$monthlySalesCount,'defaultDeliveryTime'=>$defaultDeliveryTime,'freeShippingPrice'=>$storeInfo['free_shipping_price'],'storeDistance'=>$distince,'storeNotice'=>$storeInfo['store_notice'],'startShippingPrice'=>$storeInfo['start_shipping_price'],'memberId'=>$storeInfo['member_id'],'inStoreService'=>$in_store_service_flag,'adv'=>$adv,'memberId'=>$storeInfo['member_id'],'businessHours'=>$businessHours,'sellerDistribution'=>$sellerDistribution,'buyerDistribution'=>$buyerDistribution,'bannerColor'=>'#ffa92f'); return array('storeLabel'=>$storeLabel,'storeName'=>$storeInfo['store_name'],'grade'=>$grade,'fansCount'=>\DAO\FavoritesStoreModel::getInstance()->getFavoritesStoreCountByStoreId($storeId),'favType'=>$favType,'monthlySalesCount'=>$monthlySalesCount,'defaultDeliveryTime'=>$defaultDeliveryTime,'freeShippingPrice'=>$storeInfo['free_shipping_price'],'storeDistance'=>$distince,'storeNotice'=>$storeInfo['store_notice'],'startShippingPrice'=>$storeInfo['start_shipping_price'],'memberId'=>$storeInfo['member_id'],'inStoreService'=>$in_store_service_flag,'adv'=>$adv,'memberId'=>$storeInfo['member_id'],'businessHours'=>$businessHours,'sellerDistribution'=>$sellerDistribution,'buyerDistribution'=>$buyerDistribution,'bannerColor'=>'#ffa92f','isClose'=>$storeInfo['isClose']);
} }
/** /**
......
...@@ -269,9 +269,14 @@ class StoreModel extends \DAO\AbstractModel ...@@ -269,9 +269,14 @@ class StoreModel extends \DAO\AbstractModel
public function get($storeId,$label = true) public function get($storeId,$label = true)
{ {
$storeInfo = $this->getStoreInfoCache($storeId); $storeInfo = $this->getStoreInfoCache($storeId);
if(!$storeInfo || $storeInfo['open_flag'] != 1 || $storeInfo['store_state'] != 1){ if(!$storeInfo) {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::storeNotExistOrClose); \Error\ErrorModel::throwException(\Error\CodeConfigModel::storeNotExistOrClose);
} }
if($storeInfo['open_flag'] != 1 || $storeInfo['store_state'] != 1){
$storeInfo['isClose'] = 1;
}else{
$storeInfo['isClose'] = 0;
}
if($label){ if($label){
//店铺头像 //店铺头像
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment