更新订单处理

This commit is contained in:
yaooo 2023-08-29 14:14:38 +08:00
parent 604bb129a0
commit 51f2898ab1

View File

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