Commit d6af8669 authored by wwccw0591's avatar wwccw0591

updateStore

parent ea1c924f
......@@ -9,6 +9,7 @@ use Error\ErrorModel;
use Our\ApiConst;
use Our\Common;
use Our\CommonExtension;
use Our\DbNameConst;
use Our\ImageConst;
use Our\ImageUtil;
use Our\NameConst;
......@@ -34,6 +35,10 @@ class ShareServiceModel extends \Business\AbstractModel
$driverType = \Our\Common::getDriverType();
$data['driverType'] = $driverType;
$data['qrCode']=$this->growQrcode($data);
if($data['type']==ApiConst::shareStore){
$storeDao=\DAO\StoreMemberModel::getInstance(DbNameConst::salveDBConnectName);
$data['address']=$storeDao->getAddress($data['id']);
}
// $data['qrCode']=\Our\RedisHelper::cachedFunction(\Redis\Db0\MemberRedisModel::getInstance(), array(&$this, 'growQrcode'), array($data));
return $data;
......
......@@ -258,7 +258,20 @@ class StoreModel extends \DAO\AbstractModel
$returnStores = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$this, 'getOnlineStores'), array($condition, $field), \Our\ApiConst::oneHour, array($cityCode));
return $returnStores;
}
public function getAddress($storeId){
$storeInfo = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(),array(&$this, 'getInfoById'),array($storeId),\Our\ApiConst::sevenDaySecond,array($storeId));
//地址
$address = '';
if($storeInfo['area_info']){
$address .= $storeInfo['area_info'];
}
if($storeInfo['store_address']){
$address .= $storeInfo['store_address'];
}
return $address;
}
public function get($storeId,$label = true)
{
$storeInfo = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(),array(&$this, 'getInfoById'),array($storeId),\Our\ApiConst::sevenDaySecond,array($storeId));
......
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