Commit 28eaf956 authored by christ's avatar christ

refund

parent 628250b1
...@@ -215,11 +215,15 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -215,11 +215,15 @@ class RefundServiceModel extends \Business\AbstractModel
public function makeRefund($storeId,$refundId){ public function makeRefund($storeId,$refundId){
$refundReturnDao = \DAO\Order\RefundReturnModel::getInstance(DbNameConst::masterDBConnectName); $refundReturnDao = \DAO\Order\RefundReturnModel::getInstance(DbNameConst::masterDBConnectName);
$returnDetail=$refundReturnDao->findByRefundId($refundId,$refundReturnDao->refundDetailField); $returnDetail=$refundReturnDao->findByRefundId($refundId,$refundReturnDao->refundDetailField);
$storeDao=\DAO\StoreModel::getInstance(DbNameConst::masterDBConnectName);
if($returnDetail['storeId']!=$storeId){ if($returnDetail['storeId']!=$storeId){
ErrorModel::throwException(CodeConfigModel::notExistRefund); ErrorModel::throwException(CodeConfigModel::notExistRefund);
}$updateData=array(); }$updateData=array();
$updateData['is_suc_refund']=ApiConst::refundSuccess; $updateData['is_suc_refund']=ApiConst::refundSuccess;
$res=$refundReturnDao->update(array('refund_id'=>$refundId), $updateData); $res=$refundReturnDao->update(array('refund_id'=>$refundId), $updateData);
\Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$refundReturnDao, 'getList'), array(), array($refund['store_id']));
$storeDao->deleteStoreCache($storeId,$refund['order_id']);
$storeDao->deleteStoreRefundCache($storeId,$refund['order_id']);
if($res!==false){ if($res!==false){
return true; return true;
} }
......
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