Commit 1e032787 authored by chenchuanwen's avatar chenchuanwen

Merge branch 'master_dev' of tui.shenbd.com:api-project-dev/api.shenbd.com into ccw

parents 04b9cc44 c1079899
...@@ -130,17 +130,32 @@ class IndexController extends \Our\Controller_Abstract { ...@@ -130,17 +130,32 @@ class IndexController extends \Our\Controller_Abstract {
} }
public function getSendHtmlAction(){ public function getSendHtmlAction(){
$req=$this->getRequest()->getQuery(); $req=$this->getRequest()->getQuery();
if(empty($req['params'] )){ if(empty($req['cacheKey'] )){
echo 'error';exit; echo 'error';exit;
} }
$params=base64_decode($req['params']); $this->memberDb0Redis=\Redis\Db0\MemberRedisModel::getInstance();
$res= $this->memberDb0Redis->tableCacheGet($req['cacheKey']);
$params=unserialize($res);
$params=base64_decode($params);
$params=\Our\Common::paramToJson($params); $params=\Our\Common::paramToJson($params);
$shareService=\Business\User\ShareServiceModel::getInstance(); $shareService=\Business\User\ShareServiceModel::getInstance();
$params['id']=$params['storeId']; $params['id']=$params['storeId'];
$params['qrCode']=$shareService->getQrUrl($params); $params['qrCode']=$shareService->getQrUrl($params);
$this->_view->assign("params", $params); $this->_view->assign("params", $params);
} }
// public function getSendHtmlAction(){
// $req=$this->getRequest()->getQuery();
// if(empty($req['params'] )){
// echo 'error';exit;
// }
// $params=base64_decode($req['params']);
// $params=\Our\Common::paramToJson($params);
// $shareService=\Business\User\ShareServiceModel::getInstance();
// $params['id']=$params['storeId'];
// $params['qrCode']=$shareService->getQrUrl($params);
// $this->_view->assign("params", $params);
//
// }
public function getOpenHtmlAction(){ public function getOpenHtmlAction(){
$req=$this->getRequest()->getQuery(); $req=$this->getRequest()->getQuery();
if(empty($req['params'] )){ if(empty($req['params'] )){
......
...@@ -70,14 +70,17 @@ class ShopkeeperServiceModel extends \Business\AbstractModel ...@@ -70,14 +70,17 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$storeFavariteCount = $favoritesStoreDao->getFavoritesCountByStoreIdCache($storeId); $storeFavariteCount = $favoritesStoreDao->getFavoritesCountByStoreIdCache($storeId);
$todayTotalOnline=\Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderDao, 'getOrderOrderTotalOnlineByStoreId'), array($storeId,true), ApiConst::oneDaySecond, array($storeId)); $todayTotalOnline=\Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderDao, 'getOrderOrderTotalOnlineByStoreId'), array($storeId,true), ApiConst::oneDaySecond, array($storeId));
$orderTotalOnline=\Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$storeStaticDao, 'getByStoreId'), array($storeId), ApiConst::oneDaySecond, array($storeId));; $orderTotalOnline=\Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$storeStaticDao, 'getByStoreId'), array($storeId), ApiConst::oneDaySecond, array($storeId));;
$commonDAO = \DAO\GoodsCommonModel::getInstance();
$count = \Our\RedisHelper::cachedFunction(\Redis\Db4\GoodsCommonRedisModel::getInstance(),array(&$commonDAO, 'getCount'),array(array('store_id'=>$storeId)),\Our\ApiConst::oneDaySecond);
$orderTotalOnline=$orderTotalOnline['orderTotalOnline']?$orderTotalOnline['orderTotalOnline']:ApiConst::zero; $orderTotalOnline=$orderTotalOnline['orderTotalOnline']?$orderTotalOnline['orderTotalOnline']:ApiConst::zero;
$goodsCount = $totalOrderCount['orderGoodsCount']; $goodsCount = $totalOrderCount['orderGoodsCount'];
$orderTotal = $totalOrderCount['orderTotal']; $orderTotal = $totalOrderCount['orderTotal'];
$data['storeId'] = $store['store_id']; $data['storeId'] = $store['store_id'];
$data['storeName'] = $store['store_name']; $data['storeName'] = $store['store_name'];
$data['storeLabel'] = $store['store_label']; $data['storeLabel'] = $store['store_label'];
$data['goodsCount'] = $goodsCount?$goodsCount:ApiConst::zero; // $data['goodsCount'] = $goodsCount?$goodsCount:ApiConst::zero;
$data['goodsCount']=(int)$data['goodsCount']; //$data['goodsCount']=(int)$data['goodsCount'];
$data['goodsCount']=$count;
$data['orderCount'] = $storeStats['orderCount']; $data['orderCount'] = $storeStats['orderCount'];
$data['orderTotal'] = $orderTotal?$orderTotal:ApiConst::zero; $data['orderTotal'] = $orderTotal?$orderTotal:ApiConst::zero;
$data['orderTotal']= (int)$data['orderTotal']; $data['orderTotal']= (int)$data['orderTotal'];
......
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