Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
e1ec2cb4
Commit
e1ec2cb4
authored
Feb 17, 2022
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交excle 导出时401权限的问题
parent
e64c96dc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
ControllerAop.java
...a/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
+2
-1
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+10
-2
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
View file @
e1ec2cb4
...
...
@@ -89,7 +89,7 @@ public class ControllerAop {
// 不需要校验token的接口直接返回
if
(
joinPoint
.
getSignature
()
instanceof
MethodSignature
)
{
if
(!((
MethodSignature
)
joinPoint
.
getSignature
()).
getMethod
().
getAnnotation
(
TycloudOperation
.
class
).
needAuth
())
{
if
(!((
MethodSignature
)
joinPoint
.
getSignature
()).
getMethod
().
getAnnotation
(
TycloudOperation
.
class
).
needAuth
()
&&
!
request
.
getParameterMap
().
containsKey
(
"token"
)
)
{
return
;
}
}
...
...
@@ -111,6 +111,7 @@ public class ControllerAop {
if
(
userModel
==
null
)
{
throw
new
Exception
(
"无法获取用户信息"
);
}
RequestContext
.
setExeUserId
(
userModel
.
getUserId
());
}
catch
(
Exception
e
)
{
//删除失效token缓存
redisUtils
.
getAndDeletePatternKeys
(
pattern
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
e1ec2cb4
...
...
@@ -211,8 +211,7 @@ public class ExcelServiceImpl {
}
public
void
commonExport
(
HttpServletResponse
response
,
ExcelDto
excelDto
,
Map
par
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
String
bizOrgCode
=
getCurrentAllInfo
().
getPersonIdentity
().
getBizOrgCode
();
boolean
authFalg
=
false
;
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isBlank
(
bizOrgCode
)){
authFalg
=
true
;
...
...
@@ -1805,4 +1804,13 @@ public class ExcelServiceImpl {
userModel
.
setRecDate
(
new
Date
());
return
userModel
;
}
public
ReginParams
getCurrentAllInfo
()
{
BaseEntity
userModel
=
new
BaseEntity
();
FeignClientResult
<
AgencyUserModel
>
agencyUserModel
=
Privilege
.
agencyUserClient
.
getme
();
AgencyUserModel
userModel1
=
agencyUserModel
.
getResult
();
String
keyString
=
userModel1
.
getUserId
();
String
token
=
RequestContext
.
getToken
();
return
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
keyString
,
token
)).
toString
(),
ReginParams
.
class
);
}
}
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