|
|
|
@ -1,6 +1,7 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
namespace App\Admin\Extensions\Grid; |
|
|
|
use App\Common\AgentType; |
|
|
|
use App\Common\UserStatus; |
|
|
|
use App\Models\Agent; |
|
|
|
use App\Models\Category; |
|
|
|
@ -111,9 +112,9 @@ class AuditAgent extends RowAction |
|
|
|
//插入权限表
|
|
|
|
if ($user->status == UserStatus::NORMAL) { |
|
|
|
$roleArr = [ |
|
|
|
1 => 2, //计调旅行社 role_id
|
|
|
|
2 => 2, //供应商旅行社 role_id
|
|
|
|
3 => 3, //组团旅行社 role_id
|
|
|
|
AgentType::CLUSTER => 4, //计调旅行社 role_id
|
|
|
|
AgentType::SUPPLIER => 2, //供应商旅行社 role_id
|
|
|
|
AgentType::OPERATOR => 3, //组团旅行社 role_id
|
|
|
|
]; |
|
|
|
DB::table(config('admin-agent.database.role_users_table')) |
|
|
|
->insertOrIgnore(['role_id' => $roleArr[$user->type], 'user_id' => $this->getKey()]); |
|
|
|
|