This commit is contained in:
Hankin 2026-04-28 15:59:36 +08:00
parent d4af7568e0
commit 2989f039e8

View File

@ -2938,14 +2938,22 @@ class ActivityController extends Controller
} else { } else {
$apply_user = $query->paginate(); $apply_user = $query->paginate();
} }
$qrCode = QrCode::where("type", "community")->where("type_id", $activity_id)->first();
foreach ($apply_user as $item) { foreach ($apply_user as $item) {
$sign = ActivityMeetingApply::where('activity_id', $activity_id)->where('mobile', $item->mobile)->first();
$item->is_sign = false; $item->is_sign = false;
$item->sign_time = ''; $item->sign_time = '';
if (!empty($sign)) { // $sign = ActivityMeetingApply::where('activity_id', $activity_id)->where('mobile', $item->mobile)->first();
$item->is_sign = true; if ($qrCode) {
$item->sign_time = $sign->created_at->toDateTimeString(); $sign = SignIn::where("qrcode_id", $qrCode->id)->where("merchant_user_id", $item->user_id)->first();
if (!empty($sign)) {
$item->is_sign = true;
$item->sign_time = $sign->created_at->toDateTimeString();
}
} }
} }
if ($is_export) { if ($is_export) {
return \Excel::download(new ActivityApplyUserExport($apply_user), 'activity_member.xlsx'); return \Excel::download(new ActivityApplyUserExport($apply_user), 'activity_member.xlsx');