sign in
This commit is contained in:
parent
f740363649
commit
dedef1b8a0
@ -1007,6 +1007,23 @@ class ActivityController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function communityActivitySignInList(Request $request, $id)
|
||||||
|
{
|
||||||
|
$activity = CommunityActivity::where('id', $id)->first();
|
||||||
|
if (empty($activity)) reutrn $this->failure("活动不存在");
|
||||||
|
|
||||||
|
$qrCode = Qrcode::where("merchant_id", $activity->merchant_id)->where("type_id", $activity->merchant_id)->first();
|
||||||
|
if (empty($qrCode)) reutrn $this->failure("签到码不存在");
|
||||||
|
|
||||||
|
$list = SignIn::where("qr_code_id", $qrCode->id)->paginate();
|
||||||
|
foreach ($list as $item) {
|
||||||
|
$item->is_sign = true;
|
||||||
|
$item->sign_time = $item->created_at->toDateTimeString();
|
||||||
|
}
|
||||||
|
return $this->success("Ok", $list)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 移除活动或服务
|
* 移除活动或服务
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
@ -2938,21 +2955,15 @@ 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 = '';
|
||||||
// $sign = ActivityMeetingApply::where('activity_id', $activity_id)->where('mobile', $item->mobile)->first();
|
|
||||||
if ($qrCode) {
|
|
||||||
$sign = SignIn::where("qr_code_id", $qrCode->id)->where("merchant_user_id", $item->user_id)->first();
|
|
||||||
if (!empty($sign)) {
|
if (!empty($sign)) {
|
||||||
$item->is_sign = true;
|
$item->is_sign = true;
|
||||||
$item->sign_time = $sign->created_at->toDateTimeString();
|
$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');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,9 +32,10 @@ class AddVirtualMember implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
Log::info("创建活动成员");
|
||||||
$linkmen = $this->linkmen;
|
$linkmen = $this->linkmen;
|
||||||
foreach ($linkmen as $linkman) {
|
foreach ($linkmen as $linkman) {
|
||||||
$this->activity->virtualMembers()->firstOrCreate(['mobile'=>$linkman['mobile'],'name'=>$linkman['name'], 'order_id'=>$this->order->id]);
|
$this->activity->virtualMembers()->create(['mobile'=>$linkman['mobile'], 'name'=>$linkman['name'],'order_id'=>$this->order->id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -223,6 +223,9 @@ Route::middleware('merchant')->group(function () {
|
|||||||
Route::get('plat/user/reports', 'ActivityController@userReports');
|
Route::get('plat/user/reports', 'ActivityController@userReports');
|
||||||
//服务 活动详情
|
//服务 活动详情
|
||||||
Route::get('plat/community/activity/{id}', 'ActivityController@communityActivityPlat')->where('id', '[0-9]+');
|
Route::get('plat/community/activity/{id}', 'ActivityController@communityActivityPlat')->where('id', '[0-9]+');
|
||||||
|
// 活动签到列表
|
||||||
|
Route::get('plat/community/activity/{id}/signIn/list', 'ActivityController@communityActivitySignInList')->where('id', '[0-9]+');
|
||||||
|
|
||||||
//服务 活动图片列表
|
//服务 活动图片列表
|
||||||
Route::get('plat/community/activity/{id}/photos', 'ActivityController@activityPhotos')->where('id', '[0-9]+');
|
Route::get('plat/community/activity/{id}/photos', 'ActivityController@activityPhotos')->where('id', '[0-9]+');
|
||||||
Route::post('plat/community/activity/{id}/photos', 'ActivityController@storeActvityPhotos')->where('id', '[0-9]+');
|
Route::post('plat/community/activity/{id}/photos', 'ActivityController@storeActvityPhotos')->where('id', '[0-9]+');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user