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
88d7150c
Commit
88d7150c
authored
Jun 13, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
特殊权限处理
parent
dab5ff36
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
1 deletion
+48
-1
Basic.php
application/index/extend/Basic.php
+48
-1
No files found.
application/index/extend/Basic.php
View file @
88d7150c
...
@@ -17,6 +17,8 @@ use app\model\AAgents;
...
@@ -17,6 +17,8 @@ use app\model\AAgents;
use
app\model\GHouses
;
use
app\model\GHouses
;
use
app\model\GHousesToAgents
;
use
app\model\GHousesToAgents
;
use
app\model\GOperatingRecords
;
use
app\model\GOperatingRecords
;
use
app\model\OfficeGRoom
;
use
app\model\OfficeGRoomToAgent
;
use
app\model\Users
;
use
app\model\Users
;
use
think\Config
;
use
think\Config
;
use
think\Controller
;
use
think\Controller
;
...
@@ -200,7 +202,6 @@ class Basic extends Controller
...
@@ -200,7 +202,6 @@ class Basic extends Controller
if
(
empty
(
$this
->
params
[
'id'
]))
{
if
(
empty
(
$this
->
params
[
'id'
]))
{
$is_auth
=
1
;
$is_auth
=
1
;
}
else
{
}
else
{
$agent_house
=
new
GHousesToAgents
();
$where
[
'houses_id'
]
=
$this
->
params
[
'id'
];
$where
[
'houses_id'
]
=
$this
->
params
[
'id'
];
$where
[
'type'
]
=
2
;
$where
[
'type'
]
=
2
;
$where
[
'agents_id'
]
=
$this
->
userId
;
$where
[
'agents_id'
]
=
$this
->
userId
;
...
@@ -241,6 +242,52 @@ class Basic extends Controller
...
@@ -241,6 +242,52 @@ class Basic extends Controller
}
}
}
}
//处理盘方编辑商铺
if
(
$requestPath
==
'office_index/houseEdit'
&&
isset
(
$this
->
params
[
'id'
]))
{
$agent_house
=
new
OfficeGRoomToAgent
();
if
(
empty
(
$this
->
params
[
'id'
]))
{
$is_auth
=
1
;
}
else
{
$where
[
'houses_id'
]
=
$this
->
params
[
'id'
];
$where
[
'type'
]
=
2
;
$where
[
'agents_id'
]
=
$this
->
userId
;
$where
[
'is_del'
]
=
0
;
$is_
=
$agent_house
->
getTotal
(
$where
);
$is_auth
=
$is_
>
0
?
1
:
0
;
}
//处理店长权限
if
(
!
$is_auth
)
{
$where_agent
[
'a.houses_id'
]
=
$this
->
params
[
'id'
];
$where_agent
[
'a.type'
]
=
2
;
$where_agent
[
'a.is_del'
]
=
0
;
$store_id_arr
=
$agent_house
->
getAgentsByRoomColumn
(
'b.store_id'
,
$where_agent
);
if
(
!
empty
(
$store_id_arr
))
{
$store_id
=
implode
(
','
,
array_unique
(
$store_id_arr
));
}
if
(
!
empty
(
$store_id
))
{
$agents
=
new
AAgents
();
$is_
=
$agents
->
getTotal
([
'store_id'
=>
[
'in'
,
$store_id
],
'id'
=>
$this
->
userId
,
'level'
=>
20
]);
$is_auth
=
$is_
>
0
?
1
:
0
;
}
}
//有VIP盘权限处理
if
(
!
$is_auth
)
{
$m_house
=
new
OfficeGRoom
();
$is_vip
=
$m_house
->
getFieldOneValue
(
'is_vip'
,
[
'id'
=>
$this
->
params
[
'id'
]]);
if
(
$is_vip
)
{
$check_auth
=
new
VipService
();
$check_rule
=
$check_auth
->
checkRule
(
$this
->
userId
,
'office_index/vipHouse'
);
if
(
!
$check_rule
)
{
$is_auth
=
1
;
}
}
}
}
//处理客方编辑、跟进、公客客户
//处理客方编辑、跟进、公客客户
if
((
$requestPath
==
'index/pcEditClient'
||
$requestPath
==
'index/pcAddFollow'
||
$requestPath
==
'index/useraction_search'
)
&&
isset
(
$this
->
params
[
'id'
]))
{
if
((
$requestPath
==
'index/pcEditClient'
||
$requestPath
==
'index/pcAddFollow'
||
$requestPath
==
'index/useraction_search'
)
&&
isset
(
$this
->
params
[
'id'
]))
{
...
...
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