Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openApi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hj
openApi
Commits
bda5d515
Commit
bda5d515
authored
Jul 07, 2025
by
hj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新提交
parent
172bc6ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
server/app/Http/Controllers/V1/Controller.php
server/app/Http/Controllers/V1/Controller.php
+15
-0
No files found.
server/app/Http/Controllers/V1/Controller.php
View file @
bda5d515
...
...
@@ -113,4 +113,19 @@ abstract class Controller extends BaseController
$urls
=
explode
(
'/'
,
app
()
->
request
->
url
);
return
array_values
(
array_filter
(
$urls
));
}
protected
function
checkCustomerType
(
$customerCode
,
$type
)
{
$customer
=
app
(
CustomerService
::
class
)
->
getPlatformCustomer
([
'cus_number'
=>
$customerCode
,
'cus_type'
=>
$type
]);
if
(
$customer
){
if
(
$customer
[
'cus_type'
]
!=
$type
){
switch
(
$type
){
case
'bh'
:
$this
->
returnErrorExecptionResponse
(
new
AuthenticationException
(
'不是百化用户,无法访问该类型接口'
));
break
;
case
'rhawn'
:
$this
->
returnErrorExecptionResponse
(
new
AuthenticationException
(
'不是罗恩用户,无法访问该类型接口'
));
break
;
case
'chemsite'
:
$this
->
returnErrorExecptionResponse
(
new
AuthenticationException
(
'不是chemsite用户,无法访问该类型接口'
));
break
;
default
:
$this
->
returnErrorExecptionResponse
(
new
AuthenticationException
(
'用户类型未知'
));
}
}
}
}
}
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