Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
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
周健威
rs-cloud-platform
Commits
4a7abea5
Commit
4a7abea5
authored
Sep 12, 2024
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加免token接口
parent
07144e28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
4 deletions
+70
-4
AdminDataTempcacheController.java
...m/rs/website/controller/AdminDataTempcacheController.java
+53
-0
DataTempcacheController.java
...rm/rs/website/controller/web/DataTempcacheController.java
+17
-4
No files found.
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/AdminDataTempcacheController.java
View file @
4a7abea5
...
...
@@ -89,6 +89,59 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi
return
ObjectRestResponse
.
succ
(
resultUrl
);
}
@RequestMapping
(
value
=
"/app/unauth/dealGtdataPath"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
ObjectRestResponse
dealGtdataPath
(
DataTempcache
dataTempcache
)
throws
Exception
{
//查询dataTempcache 的上传方式
DataTempcache
dataTempcacheDB
=
baseBiz
.
selectById
(
dataTempcache
.
getId
());
String
resultPath
=
""
;
//判断是否存在处理GTDATA
if
(
null
==
dataTempcacheDB
.
getGtdataPath
()
||
DataTempcache
.
HASGTDATA_FIN
!=
dataTempcacheDB
.
getHasGtdata
())
{
if
(
StrUtil
.
isBlank
(
dataTempcacheDB
.
getGtdataPath
()))
{
//生成gtdataPath
//根据id创建gtdata目录
String
gtdataPath
=
"/rscloudmart"
+
tempcachePath
+
"/"
+
dataTempcacheDB
.
getId
();
gtDataRestClient
.
mkdirs
(
gtdataPath
);
// gainData.setGtdataPath(gtdataPath);
String
finalGtdataPath
=
gtdataPath
;
// updateSelectiveById(new GainData() {{
// setId(gainData.getId());
// setGtdataPath(finalGtdataPath);
// setHasGtdata(HASGTDATA_FIN);
// }});
// Map<String, Object> result = gtDataRestClient.open(dataTempcacheDB.getGtdataPath());
// byte[] content = (byte[]) result.get("file");
// getResponse().setContentLength(content.length);
//
// String realPath = tempcachePath+"/"+dataTempcache.getId();
// String serverPath = baseUploadPath + realPath;
// //创建目录
// if(!FileUtil.exist(serverPath)) {
// FileUtil.mkdir(serverPath);
// }
//
// FileUtil.writeBytes(content, serverPath + "/" + dataTempcache.getFilename());
// baseBiz.updateSelectiveById(new DataTempcache(){{
// setId(dataTempcacheDB.getId());
// setFilepath(serverPath + "/" + dataTempcache.getFilename());
// setFileurl(xx_url+ SystemConfig.XXMP_URL + realPath + "/" + dataTempcache.getFilename());
// }});
// dataTempcacheDB.setFilepath(serverPath + "/" + dataTempcache.getFilename());
// dataTempcacheDB.setFileurl(xx_url+ SystemConfig.XXMP_URL + realPath + "/" + dataTempcache.getFilename());
}
// else if (DataTempcache.UPTYPE_URL == dataTempcacheDB.getUptype()) {
//
// }
}
resultPath
=
dataTempcacheDB
.
getGtdataPath
();
return
ObjectRestResponse
.
succ
(
resultPath
);
}
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
GainData
>>
getPageList
(
DataTempcacheDTO
dto
)
{
PageDataVO
pageDataVO
=
PageDataVO
.
pageInfo
(
dto
.
getPage
(),
dto
.
getLimit
(),
()->
baseBiz
.
pageList
(
dto
));
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/DataTempcacheController.java
View file @
4a7abea5
...
...
@@ -7,8 +7,10 @@ import cn.hutool.http.HttpUtil;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.SystemConfig
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.upyuns.platform.rs.gtdata.GtDataRestClient
;
import
com.upyuns.platform.rs.gtdata.GtFileInfo
;
import
com.upyuns.platform.rs.website.biz.DataTempcacheBiz
;
...
...
@@ -16,12 +18,10 @@ import com.upyuns.platform.rs.website.entity.DataTempcache;
import
com.upyuns.platform.rs.website.entity.FileData
;
import
com.upyuns.platform.rs.website.entity.GainData
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.math.BigDecimal
;
import
java.util.List
;
...
...
@@ -45,6 +45,19 @@ public class DataTempcacheController extends BaseController<DataTempcacheBiz,Dat
@Value
(
"${universal.url}"
)
private
String
xx_url
;
//BaseController.baseLogicPages
//BaseController.del
@ApiOperation
(
"查询分页-ObjectRestResponse"
)
@RequestMapping
(
value
=
"/app/unauth/logicPages"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
@ResponseBody
public
ObjectRestResponse
<
PageDataVO
<
DataTempcache
>>
unauthBaseLogicPages
(
@RequestParam
Map
<
String
,
Object
>
params
){
//查询列表数据
Query
query
=
new
Query
(
params
);
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectByQueryLogicPage
(
query
));
}
@ApiModelProperty
(
"添加修改文件"
)
@RequestMapping
(
value
=
"/app/unauth/saveDataTempcache"
,
method
=
RequestMethod
.
POST
)
@IgnoreUserToken
...
...
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