Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
cloud-backend
Commits
ad86dc4a
Commit
ad86dc4a
authored
May 30, 2022
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.0
parent
e67bc01a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
26 deletions
+0
-26
api-server/src/main/java/com/zq/api/controller/ApiController.java
+0
-26
No files found.
api-server/src/main/java/com/zq/api/controller/ApiController.java
View file @
ad86dc4a
...
...
@@ -9,9 +9,7 @@ import com.zq.api.form.ApiForm;
import
com.zq.api.form.ApiResp
;
import
com.zq.api.service.ApiService
;
import
com.zq.api.utils.ApiUtils
;
import
com.zq.common.config.security.ApiTokenUtils
;
import
com.zq.common.utils.ThrowableUtil
;
import
com.zq.common.vo.ApiTokenVo
;
import
com.zq.common.vo.ResultVo
;
import
feign.FeignException
;
import
io.swagger.annotations.Api
;
...
...
@@ -22,7 +20,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
@Api
(
tags
=
"API接口"
)
@Slf4j
...
...
@@ -34,11 +31,6 @@ public class ApiController {
private
final
ApiService
apiService
;
/**
* 允许用户未登录状态下执行的方法名
*/
private
final
String
[]
allowMethod
=
{
"sendCode"
};
/**
* 获取信息入口
* <p>
* 2016年10月3日 下午1:38:27
...
...
@@ -64,24 +56,6 @@ public class ApiController {
form
.
setMethod
(
method
);
}
if
(
StrUtil
.
isBlank
(
form
.
getToken
()))
{
boolean
contains
=
Arrays
.
asList
(
allowMethod
).
contains
(
method
);
if
(!
contains
)
{
return
ApiUtils
.
getLoginValidError
(
form
);
}
}
ApiTokenVo
tokenVo
=
ApiTokenUtils
.
getAppTokenVo
(
form
.
getToken
());
if
(
tokenVo
==
null
)
{
boolean
contains
=
Arrays
.
asList
(
allowMethod
).
contains
(
method
);
if
(!
contains
)
{
return
ApiUtils
.
getLoginValidError
(
form
);
}
}
else
{
form
.
setUserId
(
String
.
valueOf
(
tokenVo
.
getUserId
()));
form
.
setApiTokenVo
(
tokenVo
);
}
String
stackTrace
=
""
;
// 调用接口方法
ApiResp
resp
;
...
...
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