Commit bf96ee5b authored by zhuwei's avatar zhuwei

1

parent 4c69f602
...@@ -402,15 +402,15 @@ class AmercementService ...@@ -402,15 +402,15 @@ class AmercementService
public function cancelAmercement($id) public function cancelAmercement($id)
{ {
//判断是否有支付过 //判断是否有支付过
$payInfo = $this->isPay($id); $verify_pay = $this->verifyPayAmercement($id);
if ($payInfo) {//已支付 不允许取消 if ($verify_pay) {//无支付成功订单,可以取消
return ['code' => 101, 'msg' => '失败!该罚款已支付'];
} else {//无支付订单号 允许取消
$data = []; $data = [];
$data['id'] = $id; $data['id'] = $id;
$data['status'] = 2; $data['status'] = 2;
$this->m_amercement->updateAmercementData($data); $this->m_amercement->updateAmercementData($data);
return ['code' => 200, 'msg' => '已取消']; return ['code' => 200, 'msg' => '已取消'];
} else {//已支付
return ['code' => 101, 'msg' => '失败!该罚款已支付'];
} }
} }
......
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