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
d4ff54a7
Commit
d4ff54a7
authored
Jul 29, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auth
parent
635af6d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
12 deletions
+38
-12
ApplyForCost.php
application/api_broker/controller/ApplyForCost.php
+38
-12
No files found.
application/api_broker/controller/ApplyForCost.php
View file @
d4ff54a7
...
...
@@ -37,7 +37,7 @@ class ApplyForCost extends Basic
$redis
=
new
RedisCacheService
();
$agent_data
=
$redis
->
getRedisCache
(
2
,
$this
->
agentId
);
$check_
rule
=
new
VipService
()
;
$check_
url
=
''
;
switch
(
$this
->
params
[
'type'
])
{
case
1
:
$check_url
=
'index/checkCostTwo/1'
;
...
...
@@ -67,28 +67,33 @@ class ApplyForCost extends Basic
}
break
;
case
3
:
$get_check_user
=
'index/getCostListThree/2'
;
$is_check
=
$this
->
checkAuth
(
$get_check_user
);
if
(
!
$is_check
)
{
$where
[
'a.store_id'
]
=
$agent_data
[
'store_id'
];
}
$check_url
=
'index/checkCostFour/3'
;
$where
[
'a.status'
]
=
2
;
break
;
//财务一审
case
4
:
$get_check_user
=
'index/getCostListFour/3'
;
$is_check
=
$this
->
checkAuth
(
$get_check_user
);
if
(
!
$is_check
)
{
$where
[
'a.store_id'
]
=
$agent_data
[
'store_id'
];
}
$check_url
=
'index/checkCostFive/4'
;
$where
[
'a.status'
]
=
3
;
break
;
//财务二审
case
5
:
$get_check_user
=
'index/getCostListFive/4'
;
$is_check
=
$this
->
checkAuth
(
$get_check_user
);
if
(
!
$is_check
)
{
$where
[
'a.store_id'
]
=
$agent_data
[
'store_id'
];
}
$where
[
'a.status'
]
=
4
;
break
;
//财务三审
default
:
return
$this
->
response
(
101
,
'请求错误'
);
}
if
(
isset
(
$check_url
))
{
$is_ok
=
$check_rule
->
checkRule
(
$this
->
agentId
,
$check_url
);
if
(
$is_ok
)
{
$is_check
=
0
;
}
else
{
$is_check
=
1
;
}
}
else
{
$is_check
=
0
;
}
$is_check
=
$this
->
checkAuth
(
$check_url
);
//审核通过权限
$field
=
'a.id,a.count_time,a.source,a.type,a.create_time,a.agent_id,a.total_fee,a.fee_item,a.purpose,'
;
$field
.=
'b.name as agent_name,a.card_name,a.bank,a.card_no,a.source,a.store_id,a.status'
;
$fee_model
=
new
FApplyForFee
();
...
...
@@ -179,4 +184,24 @@ class ApplyForCost extends Basic
}
return
$this
->
response
(
$code
,
$result
[
'msg'
]);
}
/**
* @param $check_url
* @return int
*/
private
function
checkAuth
(
$check_url
)
{
$check_rule
=
new
VipService
();
if
(
empty
(
$check_url
))
{
$is_check
=
0
;
}
else
{
$is_ok
=
$check_rule
->
checkRule
(
$this
->
agentId
,
$check_url
);
if
(
$is_ok
)
{
$is_check
=
0
;
}
else
{
$is_check
=
1
;
}
}
return
$is_check
;
}
}
\ No newline at end of file
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