Commit 6f1fab25 authored by wwccw0591's avatar wwccw0591

time

parents ee85d0cd 87d2ca77
...@@ -91,6 +91,13 @@ class IndexController extends \Our\Controller_Abstract { ...@@ -91,6 +91,13 @@ class IndexController extends \Our\Controller_Abstract {
$this->_view->assign('totalCount',$returnMessage['totalCount']); $this->_view->assign('totalCount',$returnMessage['totalCount']);
} }
public function goodsDetailAction() {
$goodsCommonId=(int)$this->getRequest()->getQuery()['goodsCommonId'];
if($goodsCommonId > 0) {
$commonGoodsInstance = \DAO\GoodsCommonModel::getInstance();
$commonInfo = \Our\RedisHelper::cachedFunction(\Redis\Db4\GoodsCommonRedisModel::getInstance(),array(&$commonGoodsInstance, 'getOneById'),array($goodsCommonId),0,array($goodsCommonId));
}
$this->_view->assign('commonInfo',$commonInfo);
}
} }
...@@ -191,7 +191,7 @@ class OrderServiceModel extends \Business\AbstractModel ...@@ -191,7 +191,7 @@ class OrderServiceModel extends \Business\AbstractModel
// } // }
//定单商品表 //定单商品表
$this->orderGoodsList = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByOrderIds'), array($orderId, $this->getGoodsDetailField()), \Our\ApiConst::oneDaySecond); $this->orderGoodsList = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByOrderIds'), array($orderId, $this->getGoodsDetailField()), \Our\ApiConst::oneDaySecond,array($orderId));
//商店相关信息 //商店相关信息
$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'], $this->storeField), \Our\ApiConst::oneDaySecond);
$returnData = $this->order; $returnData = $this->order;
......
...@@ -709,7 +709,7 @@ class OrderModel extends \DAO\AbstractModel ...@@ -709,7 +709,7 @@ class OrderModel extends \DAO\AbstractModel
if(!empty($orderId)){ if(!empty($orderId)){
$this->deleteFindByOrderIdCache($orderId); $this->deleteFindByOrderIdCache($orderId);
$orderGoodsDao=\DAO\Order\OrderGoodsModel::getInstance(DbNameConst::masterDBConnectName); $orderGoodsDao=\DAO\Order\OrderGoodsModel::getInstance(DbNameConst::masterDBConnectName);
$orderGoodsDao->deleteOrderGoodsCache($orderId); $orderGoodsDao->deleteOrderGoodsCache($memberId,$orderId);
} }
} }
......
...@@ -100,9 +100,14 @@ class OrderGoodsModel extends \DAO\AbstractModel { ...@@ -100,9 +100,14 @@ class OrderGoodsModel extends \DAO\AbstractModel {
return $this->getOrderGoods($where,$field); return $this->getOrderGoods($where,$field);
} }
public function deleteOrderGoodsCache($orderIds){ public function deleteOrderGoodsCache($memberId,$orderIds){
if($memberId){
return \Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$this, 'getOrderGoodsByOrderIds'), array($memberId));
}
if($orderIds){
return \Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$this, 'getOrderGoodsByOrderIds'), array($orderIds)); return \Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$this, 'getOrderGoodsByOrderIds'), array($orderIds));
} }
}
public function getIsRefundMoney($orderGoodses,$promotionsId){ public function getIsRefundMoney($orderGoodses,$promotionsId){
$isRefundMoney=ApiConst::zero; $isRefundMoney=ApiConst::zero;
foreach($orderGoodses as $orderGood){ foreach($orderGoodses as $orderGood){
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8 ?>">
<title>Document</title>
</head>
<body>
<div style="width: 750px">
<?php echo $commonInfo['goods_body']; ?>
</div>
</body>
</html>
<style>
*{
margin:0;
padding: 0;
}
</style>
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