|
|
|
|
@ -278,7 +278,13 @@ class SupplyDemandController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
})->whereBetween('created_at', [$startDate, $endDate])
|
|
|
|
|
->paginate($all['page_size'] ?? 20);
|
|
|
|
|
|
|
|
|
|
foreach ($list as $item) {
|
|
|
|
|
$item->dialogue = Dialogue::with('user', 'toUser')->where(function ($query) use ($item) {
|
|
|
|
|
$query->where('user_id', $item->user_id)->where('to_user_id', $item->to_user_id);
|
|
|
|
|
})->orWhere(function ($query) use ($item) {
|
|
|
|
|
$query->where('user_id', $item->to_user_id)->where('to_user_id', $item->user_id);
|
|
|
|
|
})->first();
|
|
|
|
|
}
|
|
|
|
|
return $this->success([
|
|
|
|
|
'list' => $list,
|
|
|
|
|
'supply_demand_count' => $supplyDemandCount,
|
|
|
|
|
|