$event->model->id, 'uid' => $event->model->uid, 'sex' => $event->model->sex ]); } /** * 更新卡片事件 * @param UpdatedPartner $event */ public function updatedPartner(UpdatedPartner $event) { try { $model = FpdxCardStateListModel::findOrFail($event->model->id); } catch (ModelNotFoundException $exception) { return; } if (1 == $event->model->is_sell) { $model->hide_at = 0; } if ( 1 == $event->model->check_photo || 1 == $event->model->photo_1_check || 1 == $event->model->photo_2_check || 1 == $event->model->photo_3_check || 1 == $event->model->photo_4_check ) { $model->feed_push_type = 1; } elseif ( 1 != $event->model->check_photo && 1 != $event->model->photo_1_check && 1 != $event->model->photo_2_check && 1 != $event->model->photo_3_check && 1 != $event->model->photo_4_check && 1 == $event->model->voice_check ) { $model->feed_push_type = 2; } else { $model->feed_push_type = 3; } $model->is_sell = $event->model->is_sell; $model->is_push_feed = $event->model->is_push_feed; $model->is_recommend = $event->model->is_recommend; $model->base_score = $event->model->base_score; $model->save(); } /** * 隐藏卡片事件 * @param HidePartner $event */ public function hidePartner(HidePartner $event) { FpdxCardStateListModel::where('partner_id', $event->partner_id)->update(['is_sell' => 0, 'hide_at' => time()]); } }