Commit 0ccb8b51 authored by zhz's avatar zhz

group

parent 6d169abe
......@@ -249,9 +249,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
return $group;
}
public function getStorePBundlingList($storeId,$dbName = \Our\DbNameConst::salveDBConnectName,$withKeyFlag= false){
public function getStorePBundlingList($storeId,$dbName = \Our\DbNameConst::salveDBConnectName,$withKeyFlag= false,$limit = ''){
$pbundlingInstance = \DAO\PBundlingModel::getInstance($dbName);
$groupList = \Our\RedisHelper::cachedFunction(\Redis\Db4\PBundlingRedisModel::getInstance(),array(&$pbundlingInstance, 'getList'),array($this->pBundingField,array('store_id'=>$storeId),array(\Our\ApiConst::zero,\Our\ApiConst::five)),\Our\ApiConst::oneDaySecond);
$limit == '' ? $limit = array(\Our\ApiConst::zero,\Our\ApiConst::five) : $limit = $limit;
$groupList = \Our\RedisHelper::cachedFunction(\Redis\Db4\PBundlingRedisModel::getInstance(),array(&$pbundlingInstance, 'getList'),array($this->pBundingField,array('store_id'=>$storeId),$limit),\Our\ApiConst::oneDaySecond);
$newGroupList = $this->getPBundlingList($groupList,$dbName,$withKeyFlag);
return $newGroupList;
}
......@@ -337,7 +338,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$limit = array($pageIndex*$pageSize,$pageSize);
$where = array('store_id'=>$storeId);
$pbundlingInstance = \DAO\PBundlingModel::getInstance();
$groupList = $this->getStorePBundlingList($storeId,\Our\DbNameConst::salveDBConnectName,true);
$groupList = $this->getStorePBundlingList($storeId,\Our\DbNameConst::salveDBConnectName,true, $limit);
$group = [];
if($groupList){
$totalCount = \Our\RedisHelper::cachedFunction(\Redis\Db4\PBundlingRedisModel::getInstance(),array(&$pbundlingInstance, 'getCount'),array(array('store_id'=>$storeId)),\Our\ApiConst::oneDaySecond,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