【类 型】:test
【原 因】: 【过 程】: 【影 响】:
This commit is contained in:
parent
b58e30b2af
commit
3acb2aed00
@ -187,10 +187,10 @@ class CheckController extends PublicController
|
|||||||
$where['openid'] = $this->openid;
|
$where['openid'] = $this->openid;
|
||||||
$order = $orderDb->where($where)->find();
|
$order = $orderDb->where($where)->find();
|
||||||
|
|
||||||
// 获取 apply_price 并强制转换为浮动类型,保留两位小数
|
// // 获取 apply_price 并强制转换为浮动类型,保留两位小数
|
||||||
$applyPrice = round(floatval($_REQUEST['apply_price']), 2);
|
// $applyPrice = round(floatval($_REQUEST['apply_price']), 2);
|
||||||
// 获取订单的 total_price 并强制转换为浮动类型,保留两位小数
|
// // 获取订单的 total_price 并强制转换为浮动类型,保留两位小数
|
||||||
$totalPrice = round(floatval($order['total_price']), 2);
|
// $totalPrice = round(floatval($order['total_price']), 2);
|
||||||
// 比较时确保两者都是浮动类型并且格式一致
|
// 比较时确保两者都是浮动类型并且格式一致
|
||||||
if ($applyPrice > $totalPrice) {
|
if ($applyPrice > $totalPrice) {
|
||||||
echo json_encode(array('status' => 0, 'msg' => '申请退款金额不能超过订单总额'));
|
echo json_encode(array('status' => 0, 'msg' => '申请退款金额不能超过订单总额'));
|
||||||
|
Loading…
Reference in New Issue
Block a user