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
e702744c
Commit
e702744c
authored
Dec 17, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
a0248945
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
16 deletions
+27
-16
Shop.php
application/api_broker/controller/Shop.php
+2
-8
Houses.php
application/index/controller/Houses.php
+2
-8
HouseService.php
application/index/service/HouseService.php
+23
-0
No files found.
application/api_broker/controller/Shop.php
View file @
e702744c
...
@@ -656,16 +656,10 @@ class Shop extends Basic
...
@@ -656,16 +656,10 @@ class Shop extends Basic
$result
[
'external_image'
]
=
empty
(
$external_image
[
'img_name'
])
?
""
:
SHOP_IMAGE_DEPOT_URL
.
$external_image
[
'img_name'
];
$result
[
'external_image'
]
=
empty
(
$external_image
[
'img_name'
])
?
""
:
SHOP_IMAGE_DEPOT_URL
.
$external_image
[
'img_name'
];
}
}
//302版本
//判断是否有权限点击独家合同按钮 0:可查看 1:不可查看
//判断是否有权限点击独家合同按钮 0:可查看 1:不可查看
$s_house
=
new
HouseService
();
$s_house
=
new
HouseService
();
//是否存在独家方 查询
$result
[
'is_can_edit_only_contract'
]
=
$s_house
->
isCanEditOnlyContract
(
$this
->
agentId
,
$params
[
"id"
]);
$m_houses_to_agents_res
=
$s_house
->
getShopOnlyAgentId
(
$params
[
"id"
]);
if
(
$m_houses_to_agents_res
){
//存在独家方则判断当前经纪人是否是该独家方的总监或者店长
$result
[
'is_can_edit_only_contract'
]
=
$s_house
->
isUserAgentBoss
(
$m_houses_to_agents_res
,
$this
->
agentId
);
}
else
{
$result
[
'is_can_edit_only_contract'
]
=
0
;
//无独家方任何人都可以修改
}
unset
(
$result
[
'external_image_id'
]);
unset
(
$result
[
'external_image_id'
]);
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
...
...
application/index/controller/Houses.php
View file @
e702744c
...
@@ -10,6 +10,7 @@ namespace app\index\controller;
...
@@ -10,6 +10,7 @@ namespace app\index\controller;
use
app\api_broker\service\LookShopService
;
use
app\api_broker\service\LookShopService
;
use
app\api_broker\service\VipService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\index\service\BrokerService
;
use
app\index\service\BrokerService
;
use
app\index\service\HouseService
;
use
app\index\service\HouseService
;
...
@@ -423,14 +424,7 @@ class Houses extends Basic
...
@@ -423,14 +424,7 @@ class Houses extends Basic
//302版本
//302版本
//判断是否有权限点击独家合同按钮 0:可查看 1:不可查看
//判断是否有权限点击独家合同按钮 0:可查看 1:不可查看
$s_house
=
new
HouseService
();
$s_house
=
new
HouseService
();
//是否存在独家方 查询
$list
[
$k
][
'is_can_edit_only_contract'
]
=
$s_house
->
isCanEditOnlyContract
(
$this
->
userId
,
$v
[
"id"
]);
$m_houses_to_agents_res
=
$s_house
->
getShopOnlyAgentId
(
$v
[
"id"
]);
if
(
$m_houses_to_agents_res
){
//存在独家方则判断当前经纪人是否是该独家方的总监或者店长
$list
[
$k
][
'is_can_edit_only_contract'
]
=
$s_house
->
isUserAgentBoss
(
$m_houses_to_agents_res
,
$this
->
userId
);
}
else
{
$list
[
$k
][
'is_can_edit_only_contract'
]
=
0
;
//无独家方任何人都可以修改
}
}
}
...
...
application/index/service/HouseService.php
View file @
e702744c
...
@@ -709,6 +709,29 @@ class HouseService
...
@@ -709,6 +709,29 @@ class HouseService
return
$this
->
agent_house
->
getAgentHouseValue
(
'agents_id'
,
$where_houses_to_agents
);
return
$this
->
agent_house
->
getAgentHouseValue
(
'agents_id'
,
$where_houses_to_agents
);
}
}
/**
* 判断是否有权限点击独家合同按钮 0:可查看 1:不可查看
* @param $agent_id
* @param $shop_id
* @return int
*/
public
function
isCanEditOnlyContract
(
$agent_id
,
$shop_id
){
$s_vip
=
new
VipService
();
$is_quanxian
=
$s_vip
->
vip
(
$agent_id
);
if
(
$is_quanxian
==
1
){
//是否存在独家方 查询
$m_houses_to_agents_res
=
$this
->
getShopOnlyAgentId
(
$shop_id
);
if
(
$m_houses_to_agents_res
){
//存在独家方则判断当前经纪人是否是该独家方的总监或者店长
return
$this
->
isUserAgentBoss
(
$m_houses_to_agents_res
,
$agent_id
);
}
else
{
return
0
;
//无独家方任何人都可以修改
}
}
else
{
return
0
;
//有权限不判断独家方
}
}
/**
/**
* 独家附件操作
* 独家附件操作
*
*
...
...
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