Commit 6f46c9b8 authored by christ's avatar christ

pc

parent 012b0122
......@@ -908,6 +908,7 @@ class OrderServiceModel extends \Business\AbstractModel
$orderLogDao=\DAO\Order\OrderLogModel::getInstance(DbNameConst::masterDBConnectName);
$orderDetail=$orderDao->getByOrderId($orderId,$orderDao->getOrderDetailField());
$orderDetail=$orderDetail[ApiConst::arrBegin];
$storeDao=\DAO\StoreModel::getInstance();
if($orderDetail['storeId']!=$storeId){
ErrorModel::throwException(CodeConfigModel::orderNotExist);
}
......@@ -917,6 +918,7 @@ class OrderServiceModel extends \Business\AbstractModel
$data['order_amount']=$newOrderAmount;
$res=$orderDao->updateByOrderId($data,$orderId);
$orderDao->deleteOrderCache($orderDetail['memberId'], $orderId, $storeId, true);
$storeDao->
$orderLogDao->add($orderDetail['orderId'],ArrayConst::logMsgType[ApiConst::sellerUpdateOrderAmount],DescribeConst::sellerLog,$memberName,$orderDetail['orderState']);
return $res;
}
......
......@@ -508,7 +508,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$qmDeliveryManLogWhere['order_id']=$orderId;
$qmDeliveryManLogWhere['order_type']=ApiConst::orderTypeBuy;
$qmDeliveryManLog=\Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderCommonDao, 'find'), array($qmDeliveryManLogWhere,$qmDeliveryManLogDao->fieldDetail), \Our\ApiConst::oneDaySecond, array($orderId));
$qmDeliveryManLog=\Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$qmDeliveryManLogDao, 'find'), array($qmDeliveryManLogWhere,$qmDeliveryManLogDao->fieldDetail), \Our\ApiConst::oneDaySecond, array($orderId));
//$this->orderCommon = $orderCommonDao->findByOrderId($orderId, $this->orderCommonField);
$reciverInfo = $this->orderCommon['reciverInfo'];
$reciverInfo = unserialize($reciverInfo);
......
......@@ -249,10 +249,14 @@ class StoreModel extends \DAO\AbstractModel
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderDao, 'findByOrderId'), array(), array($orderId));
}
}
public function deleteStoreCache($storeId){
public function deleteStoreCache($storeId,$orderId){
if(!empty($storeId)){
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$this, 'getList'), array(), array($storeId));
}
if(!empty($orderId)){
$orderDao=\DAO\Order\OrderModel::getInstance(DbNameConst::salveDBConnectName);
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderDao, 'findByOrderId'), array(), array($orderId));
}
}
public function getStoresByCityCode($cityCode, $field = 'store_id,store_longitude,store_latitude,max_sign_rang,max_sales_rang,store_sales_scope')
......
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