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
eb0842e9
Commit
eb0842e9
authored
Jul 30, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
总监和店长列表费用报销
parent
47de5e17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
14 deletions
+29
-14
ApplyForCost.php
application/api_broker/controller/ApplyForCost.php
+28
-14
RedisCacheService.php
application/api_broker/service/RedisCacheService.php
+1
-0
No files found.
application/api_broker/controller/ApplyForCost.php
View file @
eb0842e9
...
...
@@ -29,7 +29,7 @@ class ApplyForCost extends Basic
public
function
costList
()
{
$pageNo
=
empty
(
$this
->
params
[
'page_no'
])
?
1
:
$this
->
params
[
'page_no'
];
$pageSize
=
empty
(
$this
->
params
[
'page_size'
])
?
15
:
$this
->
params
[
'page_size'
];
$where
[
'a.is_del'
]
=
0
;
if
(
!
empty
(
$this
->
params
[
'site_id'
]))
{
$where
[
'a.site_id'
]
=
$this
->
params
[
'site_id'
];
}
...
...
@@ -43,13 +43,16 @@ class ApplyForCost extends Basic
$check_url
=
'index/checkCostTwo/1'
;
$where
[
'a.status'
]
=
0
;
$m_agent
=
new
AAgents
();
$district_id
=
$m_agent
->
getAgentsByWhereColumn
([
'id'
=>
[
'<>'
,
$this
->
agentId
],
'phone'
=>
$this
->
agentPhone
],
'district_id'
);
if
(
$district_id
)
{
$district_id
[]
=
$agent_data
[
'district_id'
];
$where
[
'b.district_id'
]
=
[
'in'
,
$district_id
];
$get_check_user
=
'index/getCostListOne/0'
;
$is_check
=
$this
->
checkAuth
(
$get_check_user
);
if
(
$is_check
)
{
$where
[
'a.store_id'
]
=
$agent_data
[
'store_id'
];
}
else
{
$where
[
'b.district_id'
]
=
$agent_data
[
'district_id'
];
$m_agent
=
new
AAgents
();
$district_id
=
$m_agent
->
getAgentsByWhereColumn
([
'phone'
=>
$this
->
agentPhone
],
'district_id'
);
if
(
$district_id
)
{
$where
[
'b.district_id'
]
=
[
'in'
,
$district_id
];
//总监多个账号查看
}
}
break
;
case
2
:
...
...
@@ -57,14 +60,25 @@ class ApplyForCost extends Basic
//总监权限查看
$where
[
'a.status'
]
=
1
;
$m_agent
=
new
AAgents
();
$district_id
=
$m_agent
->
getAgentsByWhereColumn
([
'id'
=>
[
'<>'
,
$this
->
agentId
],
'phone'
=>
$this
->
agentPhone
],
'district_id'
);
if
(
$district_id
)
{
$district_id
[]
=
$agent_data
[
'district_id'
];
$where
[
'b.district_id'
]
=
[
'in'
,
$district_id
];
}
else
{
$where
[
'b.district_id'
]
=
$agent_data
[
'district_id'
];
$get_check_user
=
'index/getCostListTwo/1'
;
$is_check
=
$this
->
checkAuth
(
$get_check_user
);
if
(
$is_check
)
{
$get_check_user
=
'index/getCostListOne/0'
;
$is_check
=
$this
->
checkAuth
(
$get_check_user
);
if
(
$is_check
)
{
$where
[
'a.store_id'
]
=
$agent_data
[
'store_id'
];
//店长查看
}
else
{
$m_agent
=
new
AAgents
();
$district_id
=
$m_agent
->
getAgentsByWhereColumn
([
'phone'
=>
$this
->
agentPhone
],
'district_id'
);
if
(
$district_id
)
{
$district_id
[]
=
$agent_data
[
'district_id'
];
$where
[
'b.district_id'
]
=
[
'in'
,
$district_id
];
//总监多个账号查看
}
}
}
//财务一审查看
break
;
case
3
:
$get_check_user
=
'index/getCostListThree/2'
;
...
...
application/api_broker/service/RedisCacheService.php
View file @
eb0842e9
...
...
@@ -433,6 +433,7 @@ class RedisCacheService
$rules_arr
=
explode
(
','
,
$rules
);
$result
=
1
;
big_log
(
json_encode
(
$rules_arr
),
'check_rule'
);
if
(
in_array
(
$auth_rule_id
,
$rules_arr
))
{
$result
=
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