Commit 91d20a7d authored by christ's avatar christ

makerefund

parent 1aff3b17
...@@ -210,6 +210,21 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -210,6 +210,21 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturnDao->db->doRollback(); $refundReturnDao->db->doRollback();
return false; return false;
}
public function makeRefund($storeId,$refundId){
$refundReturnDao = \DAO\Order\RefundReturnModel::getInstance(DbNameConst::masterDBConnectName);
$returnDetail=$refundReturnDao->findByRefundId($refundId);
if($returnDetail['storeId']!=$storeId){
ErrorModel::throwException(CodeConfigModel::notExistRefund);
}$updateData=array();
$updateData['is_suc_refund']=ApiConst::refundSuccess;
$res=$refundReturnDao->update(array('refund_id'=>$refundId), $updateData);
if($res!==false){
return true;
}
return false;
} }
/** /**
* 退货审核页 * 退货审核页
......
...@@ -92,6 +92,7 @@ class RefundReturnModel extends \DAO\AbstractModel ...@@ -92,6 +92,7 @@ class RefundReturnModel extends \DAO\AbstractModel
public function update($where, $data) public function update($where, $data)
{ {
$this->setDb(\Our\DbNameConst::masterDBConnectName); $this->setDb(\Our\DbNameConst::masterDBConnectName);
$data['gmt_update']=TIMESTAMP;
return $this->db->update($this->_tableName)->where($where)->rows($data)->execute(); return $this->db->update($this->_tableName)->where($where)->rows($data)->execute();
} }
......
...@@ -268,6 +268,14 @@ class ShopkeeperController extends \Our\Controller_AbstractClient { ...@@ -268,6 +268,14 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
} }
//标记为已退款
public function makeRefundAction(){
$refundService=\Business\Order\RefundServiceModel::getInstance();
if( $refundService->makeRefund($this->storeId,$this->req['data']['refundId'])){
$this->success('操作成功');
};
ErrorModel::throwException(CodeConfigModel::commonError);
}
/** /**
* 拒绝退款 * 拒绝退款
*/ */
......
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