Commit 0bec686c authored by zw's avatar zw

bug

parent bd6d0990
......@@ -254,6 +254,8 @@ class OrderLog extends Basic
return $this->response("200", "request success", [ "bill_id" => $is_ok ]);
}elseif($is_ok == -1){
return $this->response("101", "付款类型或支付方式错误");
}elseif($is_ok == -2){
return $this->response("101", "调整金额不能多于可被调整的金额");
}
return $this->response("101", "request faild");
}
......
......@@ -129,6 +129,12 @@ class OrderLogService
}
$money = $collecting["money"];
$type = $collecting["type"];
if($pay_id > 0){
$is_ok = $this->verifyMoney($pay_id,$money);
if($is_ok != 0){
return $is_ok;
}
}
if ($father_id == 0) {
$params = $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id,
$order_id, $order_no,$house_number, $industry_type, $remark, $transfer_img, $source, $income_time,
......@@ -163,6 +169,21 @@ class OrderLogService
return $father_id;
}
/**
* 验证金额是否合法
* @param $pay_id
* @param $money
* @return int
*/
private function verifyMoney($pay_id,$money){
$payLogService = new PayLogService();
$residue_money = $payLogService->adjustment($pay_id);
if($residue_money < $money){
return -2;
}
return 0;
}
/**
* @param $type
* @param $pay_type
......
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