Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
ba95df31
Commit
ba95df31
authored
Aug 16, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限修改
parent
35361d03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
13 deletions
+35
-13
Bargain.php
application/api_broker/controller/Bargain.php
+17
-5
OrderLogService.php
application/api_broker/service/OrderLogService.php
+18
-8
No files found.
application/api_broker/controller/Bargain.php
View file @
ba95df31
...
...
@@ -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
)){
...
...
application/api_broker/service/OrderLogService.php
View file @
ba95df31
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment