更新订单支付处理

This commit is contained in:
yaooo 2023-08-29 14:44:53 +08:00
parent 889dd01e45
commit b897d2ac4f

View File

@ -114,7 +114,7 @@ class StoreGroupOrderRepository extends BaseRepository
*/
public function detail($uid, $id, $flag = true)
{
//'paid' => 0,
// 'paid' => 0
$where = $this->getAll ? ['uid' => $uid] : ['uid' => $uid];
$order = StoreGroupOrder::where($where)
->where('group_order_id', $id)
@ -127,6 +127,9 @@ class StoreGroupOrderRepository extends BaseRepository
}, 'orderProduct', 'presellOrder']);
}, 'interest'])
->order('create_time DESC')->append(['cancel_time', 'cancel_unix'])->find();
if ($order['paid'] == 1 && $order['pay_type'] != 8) {
throw new DataNotFoundException('订单不存在或已取消');
}
if (empty($order)) {
throw new DataNotFoundException('订单不存在或已取消');
}