Commit ba95df31 authored by zhuwei's avatar zhuwei

权限修改

parent 35361d03
......@@ -6,6 +6,7 @@ use app\api_broker\extend\Basic;
use app\api_broker\service\BargainService;
use app\api_broker\service\RedisCacheService;
use app\api_broker\service\VerifyService;
use app\api_broker\service\VipService;
use app\model\AAgents;
use think\Log;
use think\Request;
......@@ -115,11 +116,22 @@ class Bargain extends Basic
* @return array
*/
public function isCanLook($agent_id,$is_my_correlation){
$redis = new RedisCacheService();
//排除 总负责人等角色
$agent_data = $redis->getRedisCache(2, $agent_id);
$auth_rule_id = $agent_data['auth_group_id'];
if (!in_array($auth_rule_id, [1,2,22,23,25,26])) {
// $redis = new RedisCacheService();
// //排除 总负责人等角色
// $agent_data = $redis->getRedisCache(2, $agent_id);
// $auth_rule_id = $agent_data['auth_group_id'];
// if (!in_array($auth_rule_id, [1,2,22,23,25,26])) {
// $agent_field = "a.level";
// $agent_res = $this->agentModel->getAgentsInfoByAgentId($agent_field, [ "agent_id" => $agent_id ]);
// if(($agent_res[0]['level'] == 10) && ($is_my_correlation == 0)){
// return ['code'=>101,'msg'=>'暂无权限!'];
// }
// return [];
// }
$vip = new VipService();//0:有权限 1:无权限
$vip_house = $vip->checkRule($agent_id, 'index/inspectionRecordAll/3');
if($vip_house == 1){
$agent_field = "a.level";
$agent_res = $this->agentModel->getAgentsInfoByAgentId($agent_field, [ "agent_id" => $agent_id ]);
if(($agent_res[0]['level'] == 10) && ($is_my_correlation == 0)){
......
......@@ -1347,14 +1347,24 @@ class OrderLogService
$pageSize = empty($params["page_size"]) ? 15 : $params["page_size"];
$agent_id = $params["submit_agent_id"];
$redis = new RedisCacheService();
//排除 总负责人等角色
$agent_data = $redis->getRedisCache(2, $agent_id);
$auth_rule_id = $agent_data['auth_group_id'];
if (!in_array($auth_rule_id, [1,2,22,23,25,26])) {
$aService = new VerifyService();
$ids = $aService->getAgentsByAgentId($agent_id);
$params["ids"] = $ids;
// $redis = new RedisCacheService();
// //排除 总负责人等角色
// $agent_data = $redis->getRedisCache(2, $agent_id);
// $auth_group_id = $agent_data['auth_group_id'];
// if (!in_array($auth_group_id, [1,2,22,23,25,26])) {
// $aService = new VerifyService();
// $ids = $aService->getAgentsByAgentId($agent_id);
// $params["ids"] = $ids;
// }
$vip = new VipService();//0:有权限 1:无权限
$vip_house = $vip->checkRule($agent_id, 'index/inspectionRecordAll/3');
if($vip_house == 1){
$aService = new VerifyService();
$ids = $aService->getAgentsByAgentId($agent_id);
$params["ids"] = $ids;
}
$bargainModel = new OBargainModel();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment