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
00cf5e69
Commit
00cf5e69
authored
Nov 30, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询当前登录人权限
parent
c1c47869
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
16 deletions
+42
-16
VipService.php
application/api_broker/service/VipService.php
+23
-0
ImageDepot.php
application/index/controller/ImageDepot.php
+7
-13
PerformanceInfo.php
application/index/controller/PerformanceInfo.php
+12
-3
No files found.
application/api_broker/service/VipService.php
View file @
00cf5e69
...
...
@@ -43,4 +43,26 @@ class VipService
return
1
;
}
}
/**
* 根据经纪人id判断是否具有某些角色
* @param $agent_id
* @param $group_id
* @return bool
*/
public
function
getGroup
(
$agent_id
,
$group_id
)
{
if
(
!
$agent_id
or
!
$group_id
)
{
return
false
;
}
$agent
=
new
AAgents
();
$fields
=
'auth_group_id'
;
$auth_group_id
=
$agent
->
getAgentsById
(
$agent_id
,
$fields
);
$rules_arr
=
explode
(
','
,
$group_id
);
if
(
in_array
(
$auth_group_id
,
$rules_arr
))
{
return
true
;
}
else
{
return
false
;
}
}
}
\ No newline at end of file
application/index/controller/ImageDepot.php
View file @
00cf5e69
...
...
@@ -2,6 +2,7 @@
namespace
app\index\controller
;
use
app\api_broker\service\VipService
;
use
app\index\extend\Basic
;
use
app\index\service\ImageDepotService
;
use
app\index\service\UserService
;
...
...
@@ -176,19 +177,12 @@ class ImageDepot extends Basic
//查询客户是否在保护期内
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$user_service
=
new
UserService
();
// $is_outstrip_twenty_four_hours = $user_service->isUserProtect(1);
// dump($is_outstrip_twenty_four_hours);
// if ($is_outstrip_twenty_four_hours == 0) {
// dump('保护器内');
// } else {
// dump('超过保护期');
// }
$user_agent_id
=
5747
;
$agent_id
=
1
;
$user_service
->
isUserAgentDirector
(
$user_agent_id
,
$agent_id
);
$vip_services
=
new
VipService
();
//是否可以查看vip客户 0:可查看 1:不可查看
$agent_id
=
51
;
$group_id
=
'2,3,4,5'
;
$res
=
$vip_services
->
getGroup
(
$agent_id
,
$group_id
);
dump
(
$res
);
}
}
...
...
application/index/controller/PerformanceInfo.php
View file @
00cf5e69
...
...
@@ -9,6 +9,7 @@
namespace
app\index\controller
;
use
app\api_broker\service\VipService
;
use
app\index\extend\Basic
;
use
app\index\untils\ExportExcelUntil
;
use
app\model\OBargainModel
;
...
...
@@ -136,6 +137,9 @@ class PerformanceInfo extends Basic
*/
public
function
getPerformanceInfoExcel
()
{
//查询当前登录人权限
$vip_services
=
new
VipService
();
$get_group_res
=
$vip_services
->
getGroup
(
$this
->
userId
,
'2,3,4,5'
);
$where
[
'Obargain.status'
]
=
$this
->
status
;
/*开始结束时间*/
...
...
@@ -223,9 +227,14 @@ class PerformanceInfo extends Basic
}
//商铺地址截取字符串前3位,后面做隐藏 --暂时不用,后期可直接解除注释
// $landmark = $v["internal_address"] ? mb_substr($v["internal_address"],0,3,'utf-8').'****' : '';
$e_data_old
[
'landmark'
]
=
$v
[
"internal_address"
]
?
mb_substr
(
$v
[
"internal_address"
],
0
,
3
,
'utf-8'
)
.
'****'
:
''
;
//商铺地址
//商铺地址截取字符串前3位,角色'2,3,4,5'的做隐藏
if
(
$v
[
"internal_address"
]
&&
$get_group_res
){
$landmark
=
mb_substr
(
$v
[
"internal_address"
],
0
,
3
,
'utf-8'
)
.
'****'
;
}
else
{
$landmark
=
$v
[
"internal_address"
]
;
}
$e_data_old
[
'landmark'
]
=
$landmark
;
//商铺地址
$e_data_old
[
'house_id'
]
=
$v
[
'house_id'
];
//商铺编号
//$e_data_old['name_phone'] = $v['name'].'-'.$v['phone'];//分佣提成方
$e_data_old
[
'name_phone'
]
=
$v
[
'name'
];
//分佣提成方
...
...
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