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
bdc3a9ee
Commit
bdc3a9ee
authored
Dec 06, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
店长权限
parent
213e2cc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
Basic.php
application/index/extend/Basic.php
+10
-11
No files found.
application/index/extend/Basic.php
View file @
bdc3a9ee
...
@@ -152,7 +152,7 @@ class Basic extends Controller
...
@@ -152,7 +152,7 @@ class Basic extends Controller
$agents
=
new
AAgents
();
$agents
=
new
AAgents
();
$is_auth
=
$agents
->
agentsAuth
(
$auth_id
,
$this
->
userId
);
$is_auth
=
$agents
->
agentsAuth
(
$auth_id
,
$this
->
userId
);
$is_auth
=
empty
(
$is_auth
[
'id'
])
?
0
:
1
;
$is_auth
=
empty
(
$is_auth
[
'id'
])
?
0
:
1
;
$agent_house
=
new
GHousesToAgents
();
if
(
$is_auth
==
0
)
{
if
(
$is_auth
==
0
)
{
//处理盘方编辑商铺
//处理盘方编辑商铺
if
(
$requestPath
==
'index/houseEdit'
&&
isset
(
$this
->
params
[
'id'
]))
{
if
(
$requestPath
==
'index/houseEdit'
&&
isset
(
$this
->
params
[
'id'
]))
{
...
@@ -160,29 +160,29 @@ class Basic extends Controller
...
@@ -160,29 +160,29 @@ class Basic extends Controller
if
(
empty
(
$this
->
params
[
'id'
]))
{
if
(
empty
(
$this
->
params
[
'id'
]))
{
$is_auth
=
1
;
$is_auth
=
1
;
}
else
{
}
else
{
$agent
=
new
GHousesToAgents
();
$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
;
$where
[
'is_del'
]
=
0
;
$where
[
'is_del'
]
=
0
;
$is_
=
$agent
->
getTotal
(
$where
);
$is_
=
$agent
_house
->
getTotal
(
$where
);
$is_auth
=
$is_
>
0
?
1
:
0
;
$is_auth
=
$is_
>
0
?
1
:
0
;
}
}
//处理店长权限
//处理店长权限
if
(
!
$is_auth
)
{
if
(
!
$is_auth
)
{
$agent
=
new
GHousesToAgents
();
$agent
_house
=
new
GHousesToAgents
();
$where
[
'a.houses_id'
]
=
$this
->
params
[
'id'
];
$where
_agent
[
'a.houses_id'
]
=
$this
->
params
[
'id'
];
$where
[
'a.type'
]
=
2
;
$where
_agent
[
'a.type'
]
=
2
;
$where
[
'a.is_del'
]
=
0
;
$where
_agent
[
'a.is_del'
]
=
0
;
$store_id_arr
=
$agent
->
getAgentsHouseField
(
'b.store_id'
,
$where
);
$store_id_arr
=
$agent
_house
->
getAgentsHouseField
(
'b.store_id'
,
$where_agent
);
if
(
!
empty
(
$store_id_arr
))
{
if
(
!
empty
(
$store_id_arr
))
{
$store_id
=
implode
(
','
,
array_unique
(
$store_id_arr
));
$store_id
=
implode
(
','
,
array_unique
(
$store_id_arr
));
}
}
if
(
!
empty
(
$store_id
))
{
if
(
!
empty
(
$store_id
))
{
$is_
=
$agent
->
getTotal
([
'store_id'
=>
$store_id
,
'id'
=>
$this
->
userId
,
'level'
=>
20
]);
$is_
=
$agent
s
->
getTotal
([
'store_id'
=>
$store_id
,
'id'
=>
$this
->
userId
,
'level'
=>
20
]);
$is_auth
=
$is_
>
0
?
1
:
0
;
$is_auth
=
$is_
>
0
?
1
:
0
;
}
}
}
}
...
@@ -209,9 +209,8 @@ class Basic extends Controller
...
@@ -209,9 +209,8 @@ class Basic extends Controller
//没有独家方编辑权限处理
//没有独家方编辑权限处理
if
(
$requestPath
==
'index/editExclusive'
&&
isset
(
$this
->
params
[
'exclusive_id'
]))
{
if
(
$requestPath
==
'index/editExclusive'
&&
isset
(
$this
->
params
[
'exclusive_id'
]))
{
$m_house_agent
=
new
GHousesToAgents
();
//独家方
//独家方
$exclusive_num
=
$
m_house_agent
->
getAgentHouseNum
(
$this
->
params
[
'exclusive_id'
],
$this
->
params
[
'id'
],
3
);
$exclusive_num
=
$
agent_house
->
getAgentHouseNum
(
$this
->
params
[
'exclusive_id'
],
$this
->
params
[
'id'
],
3
);
if
(
$exclusive_num
>
0
)
{
if
(
$exclusive_num
>
0
)
{
$is_auth
=
1
;
$is_auth
=
1
;
}
}
...
...
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