Commit 465e7327 authored by zhz's avatar zhz

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into master_dev

parents cfc13beb e2f657e5
......@@ -168,6 +168,7 @@ class AdvServiceModel extends \Business\AbstractModel{
return $advs;
}
public function checkAdvWhere($where){
if(!$where['storeId']){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyAdvStore);
......
......@@ -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;
......
......@@ -50,6 +50,11 @@ class AdvModel extends \DAO\AbstractModel{
}
public function delAdvCache($positionId){
\Our\Log::getInstance()->write('调用广告位'.$positionId);
\Our\RedisHelper::delCachedFunction(\Redis\Db9\AdvRedisModel::getInstance(), array(&$this, 'getPostionAdv'),array(),array($positionId));
}
/**
* 类实例
*/
......
......@@ -45,6 +45,12 @@ class AdvMobileModel extends \DAO\AbstractModel{
$result = $this->db->fetchAll();
return $result;
}
public function delAdvMobile($store){
$advRedis = \Redis\Db9\AdvRedisModel::getInstance();
$storeMiddleAdvsKey = \Our\NameConst::storeMiddleAdvsPrefix.$store;
$advRedis->tableDel($storeMiddleAdvsKey);
}
/**
* 类实例
*/
......
......@@ -82,6 +82,7 @@ class RefundReasonModel extends \DAO\AbstractModel
public function getAll($fields='*'){
$this->setDb($this->dbName);
$list = $this->db->from($this->_tableName)->select($fields)->fetchAll();
$list=$list?$list:array();
return $list;
}
......
......@@ -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));
......
......@@ -17,7 +17,7 @@
<body>
<div class="detail">
<ul>
<?php phpinfo();
<?php
$len = count($problemList);
foreach($problemList as $key=>$problem){?>
<li <?php if($key==($len-1)){?> class="li-last"<?php }?> onclick="goToDetail('<?php echo $problem['problemId'];?>')"><?php echo $problem['problemTitle']?></li>
......
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