wugg 2 years ago
parent
commit
8ab23fc146
2 changed files with 7 additions and 7 deletions
  1. 6 6
      app/admin/controller/Payment.php
  2. 1 1
      app/common.php

+ 6 - 6
app/admin/controller/Payment.php

@@ -36,7 +36,7 @@ class Payment extends BaseController
     {
         $post = $this->post;
         $condition = "a.is_del=0 ";
-        $check = checkRole($this->roleid,79);
+        $check = checkRole($this->roleid,[79,119]);
         if($check){
             $condition.=" and b.apply_id={$this->uid}";
         }
@@ -136,7 +136,7 @@ class Payment extends BaseController
     {
         $post = $this->post;
         $condition = [["is_del","=",0]];
-        $check = checkRole($this->roleid,77);
+        $check = checkRole($this->roleid,[77,117]);
         if($check){
             $condition[]=["apply_id","=",$this->uid];
         }
@@ -822,7 +822,7 @@ class Payment extends BaseController
         $post = $this->post;
         $condition = [["cgdSource|cgdType","<>",1],['is_del',"=",0]];
 
-        $check = checkRole($this->roleid,76);
+        $check = checkRole($this->roleid,[76,116]);
         if($check){
             $condition []=["ownerid","=",$this->uid];
         }
@@ -1302,7 +1302,7 @@ class Payment extends BaseController
         $post = $this->post;
         $condition = [["a.is_del","=",0 ],["b.is_del","=",0 ]];
         $invtype = isset($post['invType'])&&$post['invType']!='' ? intval($post['invType']):"";
-        $check = checkRole($this->roleid,82);
+        $check = checkRole($this->roleid,[82,120]);
         if($check){
             $condition []=["a.apply_id","=",$this->uid];
         }
@@ -1625,7 +1625,7 @@ class Payment extends BaseController
 		$param =$this->request->only(["relaComNo"=>"","companyNo"=>"","supplierNo"=>"","start"=>"","end"=>"","returnCode"=>"",
 		"status"=>"","hpNo"=>"","payNo"=>"","page"=>1,"size"=>15],"post","trim");
 		$condition=[["a.is_del","=",0],['a.returnType',"=",1]];
-		 $check = checkRole($this->roleid,132);
+		 $check = checkRole($this->roleid,[132,130]);
         if($check){
             $condition []=["a.apply_id","=",$this->uid];
         }
@@ -1756,7 +1756,7 @@ class Payment extends BaseController
 		$param =$this->request->only(["relaComNo"=>"","companyNo"=>"","supplierNo"=>"","start"=>"","end"=>"","returnCode"=>"","payNo"=>"",
 		"status"=>"","dzNo"=>"","page"=>1,"size"=>15],"post","trim");
 		$condition=[["a.is_del","=",0],['a.returnType',"=",2]];
-		  $check = checkRole($this->roleid,131);
+		  $check = checkRole($this->roleid,[131,129]);
         if($check){
             $condition []=["a.apply_id","=",$this->uid];
         }

+ 1 - 1
app/common.php

@@ -326,7 +326,7 @@ function curl_request($url,$post='',$header=[]){
 * @throws \think\db\exception\ModelNotFoundException
  */
 function checkRole($roleid,$menu){
-    $roleinfo = \think\facade\Db::name("role_action")->where([['role_id',"=",$roleid],["status","=",1]])->find();
+    $roleinfo = \think\facade\Db::name("role_action")->where([['role_id',"in",$roleid],["status","=",1]])->find();
     if($roleinfo['private_data']!=""){
 
         $private = explode(",",$roleinfo['private_data']);