|
|
@@ -13,48 +13,48 @@ class MasterWokerTaskRequiredService
|
|
|
{
|
|
|
|
|
|
|
|
|
- public function learningStatus($userId)
|
|
|
+ public function learningStatus($userId) : bool
|
|
|
{
|
|
|
return (bool)TrainingWorkerTask::where('master_worker_id', $userId)->value('shop_orders_id');
|
|
|
}
|
|
|
|
|
|
- public function trainingTask($userId)
|
|
|
+ public function trainingTask($userId): bool
|
|
|
{
|
|
|
return TrainingWorkerTask::where('master_worker_id', $userId)->value('training_status')==2;
|
|
|
}
|
|
|
|
|
|
- public function operateStatus($userId)
|
|
|
+ public function operateStatus($userId): bool
|
|
|
{
|
|
|
return TrainingWorkerTask::where('master_worker_id', $userId)->value('operate_status')==1;
|
|
|
}
|
|
|
- public function bankStatus($userId)
|
|
|
+ public function bankStatus($userId): bool
|
|
|
{
|
|
|
return (bool)BankAccount::where('worker_id',$userId)->where('audit_state',1)->value('id');
|
|
|
}
|
|
|
- public function categoryStatus($userId)
|
|
|
+ public function categoryStatus($userId): bool
|
|
|
{
|
|
|
return (bool)MasterWorker::where('id',$userId)->value('category_ids');
|
|
|
}
|
|
|
- public function serviceStatus($userId)
|
|
|
+ public function serviceStatus($userId): bool
|
|
|
{
|
|
|
$masterWorker = MasterWorker::where('id',$userId)->find();
|
|
|
return !((empty($masterWorker['lon']) || empty($masterWorker['lat'])));
|
|
|
}
|
|
|
- public function tenantRegisterStatus($userId)
|
|
|
+ public function tenantRegisterStatus($userId): bool
|
|
|
{
|
|
|
$masterWorker = MasterWorker::where('id',$userId)->find();
|
|
|
return (bool)TenantRegister::where('mobile', $masterWorker['mobile'])->value('status');
|
|
|
}
|
|
|
- public function tenantAgreeStatus($userId)
|
|
|
+ public function tenantAgreeStatus($userId): bool
|
|
|
{
|
|
|
return (bool)TenantAgree::where('worker_id',$userId)->where('audit_state',1)->value('id');
|
|
|
}
|
|
|
|
|
|
- public function harmlessAgreeStatus($userId)
|
|
|
+ public function harmlessAgreeStatus($userId): bool
|
|
|
{
|
|
|
return (bool)MasterWorkerAgree::where(['agree_type'=>'harmless_content','worker_id'=>$userId,'audit_state'=>1])->value('id');
|
|
|
}
|
|
|
- public function crimeAgreeStatus($userId)
|
|
|
+ public function crimeAgreeStatus($userId): bool
|
|
|
{
|
|
|
return (bool)MasterWorkerAgree::where(['agree_type'=>'crime_content','worker_id'=>$userId,'audit_state'=>1])->value('id');
|
|
|
}
|