diff --git a/backstage/application/backstage/controllers/Recharge.php b/backstage/application/backstage/controllers/Recharge.php index e8711e0..f07eaa0 100644 --- a/backstage/application/backstage/controllers/Recharge.php +++ b/backstage/application/backstage/controllers/Recharge.php @@ -804,6 +804,13 @@ class Recharge extends CI_Controller { $this->load->library('lw_pagination2'); $jobId = $this->input->post('jobId'); + + // 判断管理员 roleID 是否 = 1,如果不是就要限制只能看当前管理员的job_id + $where = ''; + if($this->session->roleId != '1'){ + $where = " and d.admin_id = '".$this->session->adminId."'"; + } + $sql = "SELECT a.id, a.job_id, @@ -823,7 +830,7 @@ class Recharge extends CI_Controller LEFT JOIN tb_user b ON a.user_id = b.id LEFT JOIN tb_area c on b.area_id = c.id ,tb_jf_recharge_job d - WHERE a.job_id = d.id and a.job_id = {$jobId}"; + WHERE a.job_id = d.id and a.job_id = {$jobId} {$where}"; $param = null; $hasWhere = true; $group = null; diff --git a/backstage/application/backstage/models/Recharge_model.php b/backstage/application/backstage/models/Recharge_model.php index ebf877d..e5cb5e8 100644 --- a/backstage/application/backstage/models/Recharge_model.php +++ b/backstage/application/backstage/models/Recharge_model.php @@ -308,7 +308,7 @@ class Recharge_model extends CI_Model $where .= " and recharge_type_id = " . $data['recharge_type_id']; } if (!$this->admin_model->chk_system_role($this->session->userdata['roleId'])) { - $where .= " and a.company_id = " . $this->session->userdata("companyId"); + $where .= " and a.company_id = " . $this->session->userdata("companyId") . " and jrj.admin_id=" . $this->session->userdata("adminId") . " "; } $sql = "SELECT