【类 型】:

【主	题】:
【描	述】:
	[原因]:
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-06-28 13:02:06 +08:00
parent 3da2b05b36
commit 548625c46c

View File

@ -58,7 +58,7 @@ class PayController extends PublicController
// post参数检查
if ($_REQUEST['refund_price'] && $_REQUEST['order_sn'] && $_REQUEST['shop_id'] && ($_REQUEST['refundType'] == 'buyer' || $_REQUEST['refundType'] == 'seller')) {
echo json_encode(array('status' => 0, 'msg' => '退款参数有误'));
echo json_encode(array('status' => -1, 'msg' => '退款参数有误'));
exit();
}
// 获取订单信息
@ -67,18 +67,18 @@ class PayController extends PublicController
$field = array('order_sn, total_price, pay_sn,main_status,shop_id');
$orderDb = D('order');
if (!$order = $orderDb->where($where)->field($field)->find()) {
echo json_encode(array('status' => 0, 'msg' => '订单不存在'));
echo json_encode(array('status' => -1, 'msg' => '订单不存在'));
exit();
}
if ($order['total_price'] < $_REQUEST['refund_price']) {
echo json_encode(array('status' => 0, 'msg' => '退款申请超额'));
echo json_encode(array('status' => -1, 'msg' => '退款申请超额'));
exit();
}
if ($order['main_status'] == "已退款") {
// 构建发布主题 并向地面终端提示刷新信息
$topic = 'refreshQuestList/' . $order['shop_id'];
$this->publish($topic, 1);
echo json_encode(array('status' => 0, 'msg' => '此订单已完成退款'));
echo json_encode(array('status' => -1, 'msg' => '此订单已完成退款'));
exit();
}