Commit 07404f86 authored by liuyuzhen's avatar liuyuzhen

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

parents 0b439d60 0c2b576a
...@@ -134,7 +134,9 @@ class MessageServiceModel extends \Business\AbstractModel ...@@ -134,7 +134,9 @@ class MessageServiceModel extends \Business\AbstractModel
if ($type == 4) { if ($type == 4) {
$store = \DAO\StoreModel::getInstance(); $store = \DAO\StoreModel::getInstance();
$store->setDb($db); $store->setDb($db);
$avatar = $store->getInfoById($userid, 'store_label', 'store_label'); $storeData=\Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$store, 'getInfoById'), array($this->order['storeId'], $this->storeField), \Our\ApiConst::oneDaySecond);
$avatar=$storeData['storeLabel'];
// $avatar = $store->getInfoById($userid, 'store_label', 'store_label');
$avatar = Common::getStaticFile($avatar, ImageConst::storeLabel, ImageConst::imageDomain); $avatar = Common::getStaticFile($avatar, ImageConst::storeLabel, ImageConst::imageDomain);
} }
......
...@@ -254,9 +254,9 @@ class OrderServiceModel extends \Business\AbstractModel ...@@ -254,9 +254,9 @@ class OrderServiceModel extends \Business\AbstractModel
$this->orderGoodsList = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByOrderIds'), array($orderId, $this->getGoodsDetailField()), \Our\ApiConst::oneDaySecond, array($orderId)); $this->orderGoodsList = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByOrderIds'), array($orderId, $this->getGoodsDetailField()), \Our\ApiConst::oneDaySecond, array($orderId));
//商店相关信息 //商店相关信息
$this->store=$storeDao->get($this->order['storeId']); // $this->store=$storeDao->get($this->order['storeId']);
$this->store=Common::convertUnderline($this->store[0]); // $this->store=Common::convertUnderline($this->store[0]);
// $this->store = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$storeDao, 'getInfoById'), array($this->order['storeId'], $this->storeField), \Our\ApiConst::oneDaySecond,array($this->order['storeId'])); $this->store = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$storeDao, 'getInfoById'), array($this->order['storeId'], $storeDao->detailField), \Our\ApiConst::sevenDaySecond,array($this->order['storeId']));
$returnData = $this->order; $returnData = $this->order;
//配送员信息 //配送员信息
$this->diliveryman = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$diliverymanDao, 'findById'), array($returnData['diliverymanId']), \Our\ApiConst::oneDaySecond); $this->diliveryman = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$diliverymanDao, 'findById'), array($returnData['diliverymanId']), \Our\ApiConst::oneDaySecond);
...@@ -832,8 +832,9 @@ class OrderServiceModel extends \Business\AbstractModel ...@@ -832,8 +832,9 @@ class OrderServiceModel extends \Business\AbstractModel
if (empty($this->orderGoodsList)) { if (empty($this->orderGoodsList)) {
ErrorModel::throwException(CodeConfigModel::notExistOrderGoods); ErrorModel::throwException(CodeConfigModel::notExistOrderGoods);
} }
//商店相关信息 //商店相关信息
$this->store = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$storeDao, 'getInfoById'), array($this->order['storeId'], $this->storeField), \Our\ApiConst::oneDaySecond); $this->store = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$storeDao, 'getInfoById'), array($this->order['storeId'],$storeDao->detailField), \Our\ApiConst::oneDaySecond);
$orderGoods = $goodsDao->convert($this->orderGoodsList); $orderGoods = $goodsDao->convert($this->orderGoodsList);
if (empty($orderGoods)) { if (empty($orderGoods)) {
......
...@@ -235,8 +235,9 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -235,8 +235,9 @@ class RefundServiceModel extends \Business\AbstractModel
$orderGoodses = \Our\RedisHelper::cachedFunction(\Redis\Db5\RefundReasonRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByOrderIds'), array($orderInfo['orderId'], $this->orderGoodsField), \Our\ApiConst::oneDaySecond); $orderGoodses = \Our\RedisHelper::cachedFunction(\Redis\Db5\RefundReasonRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByOrderIds'), array($orderInfo['orderId'], $this->orderGoodsField), \Our\ApiConst::oneDaySecond);
$orderGoodses = $orderGoodsDao->convertOrderGoods($orderGoodses, 'goodsId'); $orderGoodses = $orderGoodsDao->convertOrderGoods($orderGoodses, 'goodsId');
$goodsIds = $orderGoodsDao->getRefundOrderGoodsIds($orderGoodses); $goodsIds = $orderGoodsDao->getRefundOrderGoodsIds($orderGoodses);
$this->store=$storeDao->get($this->order['storeId']); // $this->store=$storeDao->get($this->order['storeId']);
$this->store=Common::convertUnderline($this->store[0]); // $this->store=Common::convertUnderline($this->store[0]);
$this->store = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$storeDao, 'getInfoById'), array($orderInfo['storeId'], $storeDao->detailField), \Our\ApiConst::sevenDaySecond,array($orderInfo['storeId']));
if(!empty($orderGoodses[$goodsId])){ if(!empty($orderGoodses[$goodsId])){
$orderGoods = $orderGoodses[$goodsId]; $orderGoods = $orderGoodses[$goodsId];
} }
...@@ -443,8 +444,10 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -443,8 +444,10 @@ class RefundServiceModel extends \Business\AbstractModel
ErrorModel::throwException(CodeConfigModel::notExistRefund); ErrorModel::throwException(CodeConfigModel::notExistRefund);
} }
$orderGoods = \Our\RedisHelper::cachedFunction(\Redis\Db5\RefundReasonRedisModel::getInstance(), array(&$orderGoodsDao, 'findByRecId'), array($refundReturn['orderGoodsId'], $this->getGoodsDetailField()), \Our\ApiConst::oneDaySecond); $orderGoods = \Our\RedisHelper::cachedFunction(\Redis\Db5\RefundReasonRedisModel::getInstance(), array(&$orderGoodsDao, 'findByRecId'), array($refundReturn['orderGoodsId'], $this->getGoodsDetailField()), \Our\ApiConst::oneDaySecond);
$this->store=$storeDao->get($refundReturn['storeId']); // $this->store=$storeDao->get($refundReturn['storeId']);
$this->store=Common::convertUnderline($this->store[0]); // $this->store=Common::convertUnderline($this->store[0]);
$this->store = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$storeDao, 'getInfoById'), array($refundReturn['storeId'],$storeDao->detailField), \Our\ApiConst::sevenDaySecond,array($refundReturn['storeId']));
$refundReturn['goodsGroup'] = $goodsDao->getGoodsGroup($orderGoods['goodsGroup']); $refundReturn['goodsGroup'] = $goodsDao->getGoodsGroup($orderGoods['goodsGroup']);
$refundReturn['goodsAttr'] = $goodsDao->getFormatGoodsAttr($orderGoods['goodsSpec']); $refundReturn['goodsAttr'] = $goodsDao->getFormatGoodsAttr($orderGoods['goodsSpec']);
$refundReturn['sellerStateName'] = ArrayConst::sellerState[$refundReturn['sellerState']]; $refundReturn['sellerStateName'] = ArrayConst::sellerState[$refundReturn['sellerState']];
......
...@@ -238,7 +238,7 @@ class OrderGoodsModel extends \DAO\AbstractModel { ...@@ -238,7 +238,7 @@ class OrderGoodsModel extends \DAO\AbstractModel {
public function getMemberStoreStaticsByCreateTime($gmtCreate,$pageIndex,$pageSize){ public function getMemberStoreStaticsByCreateTime($gmtCreate,$pageIndex,$pageSize){
$this->setDb($this->dbName); $this->setDb($this->dbName);
$where =\Our\Common::format(' gmt_update>={0} and gmt_update<{1} ',$gmtCreate,TIMESTAMP); $where =\Our\Common::format(' gmt_update>={0} and gmt_update<{1} ',$gmtCreate,TIMESTAMP);
$res=$this->lists($where,array('gmt_create'=>'asc'),$this->sumField,$pageIndex,$pageSize); $res=$this->lists($where,array('gmt_update'=>'asc'),$this->sumField,$pageIndex,$pageSize);
return $res['list']?$res:false; return $res['list']?$res:false;
} }
public function getMemberStoreOrderGoodsCount($storeIds,$memberIds){ public function getMemberStoreOrderGoodsCount($storeIds,$memberIds){
......
...@@ -13,6 +13,7 @@ use Our\ImageConst; ...@@ -13,6 +13,7 @@ use Our\ImageConst;
class StoreModel extends \DAO\AbstractModel class StoreModel extends \DAO\AbstractModel
{ {
public $detailField= " member_id as memberId,store_id as storeId,offline_payway as offlinePayway,store_label as storeLabel";
protected function init() protected function init()
{ {
......
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