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
37fda09f
Commit
37fda09f
authored
Sep 07, 2021
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
平台配置导出接口bug修改
parent
c90d00b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
ControllerAop.java
...a/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
+12
-1
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+9
-4
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
View file @
37fda09f
...
@@ -63,8 +63,10 @@ public class ControllerAop {
...
@@ -63,8 +63,10 @@ public class ControllerAop {
HttpServletRequest
request
=
attributes
.
getRequest
();
HttpServletRequest
request
=
attributes
.
getRequest
();
//TODO tyboot 框架拦截器已缓存数据
//TODO tyboot 框架拦截器已缓存数据
String
token
=
RequestContext
.
getToken
();
String
token
=
RequestContext
.
getToken
();
// 平台studio配置的下载接口token从url里取
if
(
ValidationUtil
.
isEmpty
(
token
))
{
if
(
ValidationUtil
.
isEmpty
(
token
))
{
token
=
request
.
getHeader
(
"X-Access-Token"
);
fillRequestContext
(
request
);
token
=
RequestContext
.
getToken
();
}
}
// 不需要添加请求头的接口
// 不需要添加请求头的接口
String
[]
url
=
new
String
[]{
"/api/user/selectInfo"
,
"/api/user/save/curCompany"
,
"/jcs/command/lookHtmlText"
};
String
[]
url
=
new
String
[]{
"/api/user/selectInfo"
,
"/api/user/save/curCompany"
,
"/jcs/command/lookHtmlText"
};
...
@@ -138,4 +140,13 @@ public class ControllerAop {
...
@@ -138,4 +140,13 @@ public class ControllerAop {
// GlobalCache.paramMap.remove(token);
// GlobalCache.paramMap.remove(token);
// }
// }
}
}
private
void
fillRequestContext
(
HttpServletRequest
request
)
{
String
token
=
request
.
getParameterMap
().
get
(
"token"
)[
0
];
String
product
=
request
.
getParameterMap
().
get
(
"product"
)[
0
];
String
appKey
=
request
.
getParameterMap
().
get
(
"appKey"
)[
0
];
RequestContext
.
setToken
(
token
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setAppKey
(
appKey
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ExcelController.java
View file @
37fda09f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestPart
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -16,7 +21,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -16,7 +21,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
/**
* 导出导入
* 导出导入
...
@@ -150,7 +154,8 @@ public class ExcelController extends BaseController {
...
@@ -150,7 +154,8 @@ public class ExcelController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出公用类带过滤参数"
)
@ApiOperation
(
value
=
"导出公用类带过滤参数"
)
@PostMapping
(
"/exportByParams/{type}"
)
@PostMapping
(
"/exportByParams/{type}"
)
public
void
getFireStationFileByParams
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"params"
)
String
params
)
{
public
void
getFireStationFileByParams
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"params"
)
String
params
)
{
try
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
...
...
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