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
462a7bb4
Commit
462a7bb4
authored
Sep 19, 2024
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加处理gtdata接口
parent
4fa2baba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
2 deletions
+34
-2
DataTempcache.java
.../com/upyuns/platform/rs/website/entity/DataTempcache.java
+3
-1
DataTempcacheController.java
...rm/rs/website/controller/web/DataTempcacheController.java
+31
-1
No files found.
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/DataTempcache.java
View file @
462a7bb4
...
...
@@ -27,6 +27,8 @@ public class DataTempcache implements Serializable {
public
static
final
int
UPTYPE_GTDATA
=
2
;
public
static
final
int
UPTYPE_URL
=
3
;
public
static
final
int
UPTYPE_GTDIR
=
4
;
/**
*
*/
...
...
@@ -166,7 +168,7 @@ public class DataTempcache implements Serializable {
private
String
remark
;
@Column
(
name
=
"uptype"
)
@ApiModelProperty
(
value
=
"上传类型 1--文件上传;2--gtdata路径;3--url"
)
@ApiModelProperty
(
value
=
"上传类型 1--文件上传;2--gtdata路径;3--url
;4--gain
"
)
private
Integer
uptype
;
@Column
(
name
=
"upurl"
)
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/DataTempcacheController.java
View file @
462a7bb4
...
...
@@ -14,6 +14,7 @@ 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.universal.utils.DateUtil
;
import
com.upyuns.platform.rs.website.biz.DataTempcacheBiz
;
import
com.upyuns.platform.rs.website.entity.DataTempcache
;
import
com.upyuns.platform.rs.website.entity.FileData
;
...
...
@@ -26,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.web.bind.annotation.*
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -51,9 +53,37 @@ public class DataTempcacheController extends BaseController<DataTempcacheBiz,Dat
//BaseController.baseLogicPages
//BaseController.del
@RequestMapping
(
value
=
"/app/unauth/dealGtdataDir"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
ObjectRestResponse
dealGtdataPath
(
String
gtdataPaths
)
{
if
(
StrUtil
.
isBlank
(
gtdataPaths
))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"分布式路径不对"
);
}
String
[]
gtdataPathArray
=
gtdataPaths
.
split
(
","
);
//创建临时目录
String
gtdataDirPath
=
"/rscloudmart"
+
tempcachePath
+
"/"
+
(
new
Date
()).
getTime
();
gtDataRestClient
.
mkdirs
(
gtdataDirPath
);
//循环判断复制数据
for
(
String
gtdataPath
:
gtdataPathArray
)
{
Integer
indexNum
=
StrUtil
.
lastIndexOfIgnoreCase
(
gtdataPath
,
"/"
);
//带/的filename
String
fileName
=
gtdataPath
.
substring
(
indexNum
,
gtdataPath
.
length
());
String
targetPath
=
gtdataDirPath
+
fileName
;
gtDataRestClient
.
copy
(
gtdataPath
,
targetPath
);
}
return
ObjectRestResponse
.
succ
(
gtdataDirPath
);
}
@RequestMapping
(
value
=
"/app/unauth/dealGtdataPath"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
ObjectRestResponse
dealGtdataPath
(
DataTempcache
dataTempcache
)
throws
Exception
{
public
ObjectRestResponse
dealGtdataPath
(
DataTempcache
dataTempcache
)
{
//查询dataTempcache 的上传方式
DataTempcache
dataTempcacheDB
=
baseBiz
.
selectById
(
dataTempcache
.
getId
());
String
resultPath
=
""
;
...
...
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