|
|
@@ -99,7 +99,12 @@ class SettleController extends BaseController
|
|
|
//2、再销账
|
|
|
if (is_numeric($id)) {
|
|
|
$order = OrderClass::getById($id, true);
|
|
|
- OrderClass::valid($order, $this->mainId);
|
|
|
+ if (empty($order)) {
|
|
|
+ util::fail('没有找到订单');
|
|
|
+ }
|
|
|
+ if ($order->mainId != $this->mainId) {
|
|
|
+ util::fail('不是你的订单');
|
|
|
+ }
|
|
|
SettleClass::confirmSettle($order, $payWay, $staff);
|
|
|
} else {
|
|
|
$idArr = json_decode($id, true);
|
|
|
@@ -107,7 +112,12 @@ class SettleController extends BaseController
|
|
|
$orderList = OrderClass::getAllByCondition(['id' => ['in', $ids]], null, '*', null, true);
|
|
|
if (!empty($orderList)) {
|
|
|
foreach ($orderList as $order) {
|
|
|
- OrderClass::valid($order, $this->mainId);
|
|
|
+ if (empty($order)) {
|
|
|
+ util::fail('没有找到订单');
|
|
|
+ }
|
|
|
+ if ($order->mainId != $this->mainId) {
|
|
|
+ util::fail('不是你的订单');
|
|
|
+ }
|
|
|
SettleClass::confirmSettle($order, $payWay, $staff);
|
|
|
}
|
|
|
}
|