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
502c8840
Commit
502c8840
authored
Apr 09, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
9de2b588
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
7 deletions
+65
-7
Report.php
application/api_broker/controller/Report.php
+63
-7
AAgents.php
application/model/AAgents.php
+0
-0
route.php
application/route.php
+2
-0
No files found.
application/api_broker/controller/Report.php
View file @
502c8840
...
@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
...
@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\ReportService
;
use
app\api_broker\service\ReportService
;
use
app\model\AAgents
;
use
app\model\FollowUpLogModel
;
use
app\model\FollowUpLogModel
;
use
app\model\OReportModel
;
use
app\model\OReportModel
;
use
think\Exception
;
use
think\Exception
;
...
@@ -85,13 +86,13 @@ class Report extends Basic
...
@@ -85,13 +86,13 @@ class Report extends Basic
*/
*/
public
function
reportList
()
public
function
reportList
()
{
{
/* $params = array(
/* $params = array(
"agent_id" =>1,
"agent_id" =>1,
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"page_no"=>1,
"page_no"=>1,
"page_size"=>15
"page_size"=>15
);*/
);*/
$params
=
$this
->
params
;
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
...
@@ -114,6 +115,61 @@ class Report extends Basic
...
@@ -114,6 +115,61 @@ class Report extends Basic
}
}
/**
* 权限判定
* @return \think\Response
*/
public
function
appAgentAuth
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 51,
);*/
$auth_arr
=
[
'broker/report'
,
'broker/addFollowUp'
,
'broker/marchIn'
,
'broker/collectingBill'
,
'broker/refund'
,
'broker/bargain'
,
'broker/statusBargain'
,
];
$param
[
"name"
]
=
array
(
"in"
,
$auth_arr
);
$agents
=
new
AAgents
();
$is_auth
=
$agents
->
agentsAuthIds
(
$params
[
"agent_id"
],
$param
);
$result
[
"report"
]
=
$result
[
"addFollowUp"
]
=
$result
[
"marchIn"
]
=
$result
[
"collectingBill"
]
=
$result
[
"refund"
]
=
$result
[
"bargain"
]
=
$result
[
"statusBargain"
]
=
false
;
if
(
count
(
$is_auth
)
>
0
)
{
foreach
(
$is_auth
as
$item
)
{
if
(
$item
[
'name'
]
==
"broker/report"
)
{
$result
[
"report"
]
=
true
;
}
if
(
$item
[
'name'
]
==
"broker/addFollowUp"
)
{
$result
[
"addFollowUp"
]
=
true
;
}
if
(
$item
[
'name'
]
==
"broker/marchIn"
)
{
$result
[
"marchIn"
]
=
true
;
}
if
(
$item
[
'name'
]
==
"broker/collectingBill"
)
{
$result
[
"collectingBill"
]
=
true
;
}
if
(
$item
[
'name'
]
==
"broker/refund"
)
{
$result
[
"refund"
]
=
true
;
}
if
(
$item
[
'name'
]
==
"broker/bargain"
)
{
$result
[
"bargain"
]
=
true
;
}
if
(
$item
[
'name'
]
==
"broker/statusBargain"
)
{
$result
[
"statusBargain"
]
=
true
;
}
}
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
return
$this
->
response
(
"200"
,
"request null"
);
}
/**
/**
* 新增跟进
* 新增跟进
...
...
application/model/AAgents.php
View file @
502c8840
This diff is collapsed.
Click to expand it.
application/route.php
View file @
502c8840
...
@@ -367,6 +367,8 @@ Route::group('broker', [
...
@@ -367,6 +367,8 @@ Route::group('broker', [
'searchAgents'
=>
[
'api_broker/OrderLog/searchAgents'
,
[
'method'
=>
'get'
]
],
'searchAgents'
=>
[
'api_broker/OrderLog/searchAgents'
,
[
'method'
=>
'get'
]
],
'appAgentAuth'
=>
[
'api_broker/Report/appAgentAuth'
,
[
'method'
=>
'get'
]
],
'center'
=>
[
'api_broker/MyCenter/center'
,
[
'method'
=>
'get|post'
]
],
'center'
=>
[
'api_broker/MyCenter/center'
,
[
'method'
=>
'get|post'
]
],
'houseEdit'
=>
[
'api_broker/shop/edit'
,
[
'method'
=>
'get|post'
]],
//编辑商铺
'houseEdit'
=>
[
'api_broker/shop/edit'
,
[
'method'
=>
'get|post'
]],
//编辑商铺
...
...
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