Commit 3faf2693 authored by zhz's avatar zhz

store

parent dd8b9e03
......@@ -60,13 +60,6 @@ class StoreController extends \Our\Controller_AbstractIndex {
$this->success($recommendWord);
}
/**
* 获取商家资质
*/
public function getStoreQualificationAction() {
$pics = $this->storeService->getStoreQualification($this->req[\Our\NameConst::data]);
$this->success($pics);
}
/**
* 获取推荐分类对应推荐店铺
*/
......
......@@ -165,7 +165,7 @@ class StoreServiceModel extends \Business\AbstractModel{
}
list($storeInfo,$storeLabel) = \DAO\StoreModel::getInstance()->get($storeId);
//资质图片
//展示图片
$detailImg = [];
if($storeInfo['store_detail_image']){
$storeDetailImg = unserialize($storeInfo['store_detail_image']);
......@@ -201,7 +201,8 @@ class StoreServiceModel extends \Business\AbstractModel{
$returnClass[] = $v['gc_name'];
}
}
return array('storeName'=>$storeInfo['store_name'],'storeLabel'=>$storeLabel,'fansCount'=>\DAO\FavoritesStoreModel::getInstance()->getFavoritesStoreCountByStoreId($storeId),'clazz'=>$returnClass,'address'=>$address,'storePhone'=>$storeInfo['store_phone'],'openingHours'=>$openingHours,'storeService'=>$storeInfo['store_notice'],"qualificationImage"=>$detailImg);
$qualificationPics = $this->getStoreQualification($storeId,$storeInfo['member_id']);
return array('storeName'=>$storeInfo['store_name'],'storeLabel'=>$storeLabel,'fansCount'=>\DAO\FavoritesStoreModel::getInstance()->getFavoritesStoreCountByStoreId($storeId),'clazz'=>$returnClass,'address'=>$address,'storePhone'=>$storeInfo['store_phone'],'openingHours'=>$openingHours,'storeService'=>$storeInfo['store_notice'],"qualificationImage"=>$qualificationPics,'showImage'=>$detailImg);
}
public function getRecommendGoodsCache($param,$memberId){
$storeId = intval($param['storeId']);
......@@ -419,16 +420,11 @@ class StoreServiceModel extends \Business\AbstractModel{
return true;
}
public function getStoreQualification($param) {
$storeId = $param['storeId'];
if(!$storeId){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyStoreId);
}
$storeInfo = \DAO\StoreModel::getInstance()->get($param['storeId'],false);
public function getStoreQualification($storeId,$memberId) {
$pics = \DAO\Store\QmStoreApplyClassModel::getInstance()->getApplyPicCache($storeId,'file_name');
$join = \DAO\Store\StoreJoininModel::getInstance()->getOneByMemberIdCache($storeInfo['member_id'],'business_licence_photo');
$join = \DAO\Store\StoreJoininModel::getInstance()->getOneByMemberIdCache($memberId,'business_licence_photo');
$join['business_licence_photo'] && $pics[] =\Our\Common::getStaticFile($join['business_licence_photo'], \Our\ImageConst::Register, 'ossHost');
return array('qualificationPics'=>\DAO\Store\QmStoreApplyClassModel::getInstance()->addWaterMark($pics));
return \DAO\Store\QmStoreApplyClassModel::getInstance()->addWaterMark($pics);
}
/**
* 获取搜索页推荐关键字
......
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