getPartnerId()) { $partner = PartnerModel::findOrFail($partner_id); } else { $uid = $message->getUid(); $partner = PartnerModel::whereUid($uid)->firstOrFail(); } /** @var PartnerModel $partner */ $partnerManager = new PartnerManager(); $message->setResponse($partnerManager->partnerUser($uid, $partner)); } public function thumbPartner(ThumbPartnerMessage $message) { $uid = Auth::auth(); $partnerId = $message->getPartnerId(); $thumb = $message->getThumb(); $ps = new \App\Services\User\PartnerService(); $data = $ps->thumb($uid, $partnerId, $thumb); $message->setResponse($data); } public function lockLikeMe(LockLikeMeMessage $message) { $origin = $message->getOrigin() ?: 'supvip'; $partnerId = $message->getPartnerId(); $uid = Auth::auth(); $ps = new \App\Services\User\PartnerService(); if ($origin == 'app_sign') { $ps->appLockLikeMe($uid, $partnerId); } else { $ps->lockLikeme($uid, $partnerId); } } /** * 设置(开/关)隐身模式 * @param SetPartnerSellMessage $message * @throws \App\Exceptions\AlertException */ public function setPartnerSell(SetPartnerSellMessage $message) { $uid = Auth::auth(); $sell = $message->getIs_sell(); $user = UserModel::find($uid); $ups = new \App\Services\User\PartnerService(); $ups->sell($user->partner_id, $sell); } }