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
60a29a19
Commit
60a29a19
authored
Feb 26, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
313d156b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
DailyPaperService.php
application/api_broker/service/DailyPaperService.php
+5
-9
No files found.
application/api_broker/service/DailyPaperService.php
View file @
60a29a19
...
@@ -77,10 +77,8 @@ class DailyPaperService
...
@@ -77,10 +77,8 @@ class DailyPaperService
// if ($agent_info["level"] != 20 && $agent_info["level"] != 40) {
// if ($agent_info["level"] != 20 && $agent_info["level"] != 40) {
// return ["code" => 101, "msg" => "非店长不能查看日报"];
// return ["code" => 101, "msg" => "非店长不能查看日报"];
// }
// }
$check_data
=
$this
->
checkAgent
(
$agent_info
[
'id'
],
$agent_info
[
'store_id'
],
$agent_info
[
'district_id'
]);
$check_data
=
$this
->
checkAgent
(
$agent_info
[
'id'
]);
if
(
$check_data
[
'code'
]
==
200
)
{
if
(
$check_data
[
'code'
]
!=
200
)
{
$result
[
'store_name'
]
=
$check_data
[
'data'
];
}
else
{
return
[
"code"
=>
101
,
"msg"
=>
$check_data
[
'msg'
]];
return
[
"code"
=>
101
,
"msg"
=>
$check_data
[
'msg'
]];
}
}
...
@@ -681,22 +679,20 @@ class DailyPaperService
...
@@ -681,22 +679,20 @@ class DailyPaperService
}
}
/**
/**
* 检查用户权限
并获取门店
* 检查用户权限
*
*
* @param $agent_id
* @param $agent_id
* @param $store_id
* @param $store_id
* @param $district_id
* @param $district_id
* @return array
* @return array
*/
*/
public
function
checkAgent
(
$agent_id
,
$store_id
)
{
public
function
checkAgent
(
$agent_id
)
{
$check_rule
=
new
VipService
();
$check_rule
=
new
VipService
();
$storeModel
=
new
AStore
();
$is_
=
$check_rule
->
checkRule
(
$agent_id
,
'index/dailyDetail'
);
$is_
=
$check_rule
->
checkRule
(
$agent_id
,
'index/dailyDetail'
);
if
(
$is_
)
{
if
(
$is_
)
{
$result
=
[
"code"
=>
101
,
"msg"
=>
"没有查看财务日报权限"
];
$result
=
[
"code"
=>
101
,
"msg"
=>
"没有查看财务日报权限"
];
}
else
{
}
else
{
$data
=
$storeModel
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$store_id
]);
$result
=
[
"code"
=>
200
];
$result
=
[
"code"
=>
200
,
"data"
=>
$data
];
}
}
return
$result
;
return
$result
;
}
}
...
...
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