Commit 98908cb0 authored by zhz's avatar zhz

store

parent e8b75618
...@@ -15,7 +15,7 @@ class GoodsController extends \Our\Controller_AbstractIndex { ...@@ -15,7 +15,7 @@ class GoodsController extends \Our\Controller_AbstractIndex {
public function getAction(){ public function getAction(){
$address = \Business\User\AddressServiceModel::getInstance()->getMyAddress($this->req[\Our\NameConst::data],$this->memberId,false); $address = \Business\User\AddressServiceModel::getInstance()->getMyAddress($this->req[\Our\NameConst::data],$this->memberId,false);
$goodsInfo = $this->goodsService->getCommonDetail($this->req[\Our\NameConst::data],$this->memberId,$address); $goodsInfo = $this->goodsService->getCommonDetail($this->req[\Our\NameConst::data],$this->memberId,$address);
$store = $this->goodsService->getStore($goodsInfo['storeId']); $store = $this->goodsService->getStore($goodsInfo['storeId'],false,false);
$goodsInfo['freeShippingPrice'] = $store['freeShippingPrice']; $goodsInfo['freeShippingPrice'] = $store['freeShippingPrice'];
$goodsInfo['isQuality'] = $store['isQuality']; $goodsInfo['isQuality'] = $store['isQuality'];
$evaluation =$this->goodsService->getEvaluation($this->req[\Our\NameConst::data]); $evaluation =$this->goodsService->getEvaluation($this->req[\Our\NameConst::data]);
......
...@@ -23,7 +23,7 @@ class GroupController extends \Our\Controller_AbstractIndex { ...@@ -23,7 +23,7 @@ class GroupController extends \Our\Controller_AbstractIndex {
$goods = $this->GroupSaleService->getGroupGoods($this->req[\Our\NameConst::data],$address); $goods = $this->GroupSaleService->getGroupGoods($this->req[\Our\NameConst::data],$address);
// $data = $this->GroupSaleService->getOnePBundingCache($this->req[\Our\NameConst::data]['groupId']); // $data = $this->GroupSaleService->getOnePBundingCache($this->req[\Our\NameConst::data]['groupId']);
// $this->GroupSaleService->handleData($data); // $this->GroupSaleService->handleData($data);
$storeInfo = \Business\Goods\GoodsCommonServiceModel::getInstance()->getStore($goods['store_id']); $storeInfo = \Business\Goods\GoodsCommonServiceModel::getInstance()->getStore($goods['store_id'],false,false);
unset($storeInfo['freeShippingPrice']);unset($storeInfo['isQuality']);unset($storeInfo['shareDesc']); unset($storeInfo['freeShippingPrice']);unset($storeInfo['isQuality']);unset($storeInfo['shareDesc']);
$otherGroups = \Business\Goods\GroupSaleServiceModel::getInstance()->getOtherGroup($goods['store_id'],$this->req[\Our\NameConst::data]['groupId']); $otherGroups = \Business\Goods\GroupSaleServiceModel::getInstance()->getOtherGroup($goods['store_id'],$this->req[\Our\NameConst::data]['groupId']);
\Business\Goods\GroupSaleServiceModel::getInstance()->addBrowseRecord($this->req[\Our\NameConst::data],$this->memberId); \Business\Goods\GroupSaleServiceModel::getInstance()->addBrowseRecord($this->req[\Our\NameConst::data],$this->memberId);
......
...@@ -29,7 +29,7 @@ class StoreServiceModel extends \Business\AbstractModel{ ...@@ -29,7 +29,7 @@ class StoreServiceModel extends \Business\AbstractModel{
\Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyStoreId); \Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyStoreId);
} }
list($storeInfo,$storeLabel) = \DAO\StoreModel::getInstance()->get($storeId); list($storeInfo,$storeLabel) = \DAO\StoreModel::getInstance()->get($storeId,true,false);
if((int)$param['isScan'] > 0) { if((int)$param['isScan'] > 0) {
//扫码进入 //扫码进入
if($memberId > 0) { if($memberId > 0) {
......
...@@ -266,14 +266,18 @@ class StoreModel extends \DAO\AbstractModel ...@@ -266,14 +266,18 @@ class StoreModel extends \DAO\AbstractModel
return $address; return $address;
} }
public function get($storeId,$label = true) public function get($storeId,$label = true,$reportError = true)
{ {
$storeInfo = $this->getStoreInfoCache($storeId); $storeInfo = $this->getStoreInfoCache($storeId);
if(!$storeInfo) { if(!$storeInfo) {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::storeNotExistOrClose); \Error\ErrorModel::throwException(\Error\CodeConfigModel::storeNotExistOrClose);
} }
if($storeInfo['open_flag'] != 1 || $storeInfo['store_state'] != 1){ if($storeInfo['open_flag'] != 1 || $storeInfo['store_state'] != 1){
if($reportError) {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::storeNotExistOrClose);
}else{
$storeInfo['isClose'] = 1; $storeInfo['isClose'] = 1;
}
}else{ }else{
$storeInfo['isClose'] = 0; $storeInfo['isClose'] = 0;
} }
......
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