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
d81b7f14
Commit
d81b7f14
authored
Sep 13, 2024
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gtdata路径处理
parent
e0760405
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
44 deletions
+46
-44
AdminDataTempcacheController.java
...m/rs/website/controller/AdminDataTempcacheController.java
+0
-44
DataTempcacheController.java
...rm/rs/website/controller/web/DataTempcacheController.java
+46
-0
No files found.
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/AdminDataTempcacheController.java
View file @
d81b7f14
...
@@ -95,50 +95,6 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi
...
@@ -95,50 +95,6 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi
return
ObjectRestResponse
.
succ
(
resultUrl
);
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
);
//上传文件
String
fileGtdataPath
=
gtdataPath
+
"/"
+
dataTempcacheDB
.
getFilename
();
String
filepath
=
dataTempcacheDB
.
getFilepath
();
// if(StrUtil.isBlank(filepath)) {
// //下载文件
// }
if
(!
gtDataRestClient
.
isExist
(
fileGtdataPath
).
get
(
"exist"
).
toString
().
equals
(
"true"
)){
Map
<
String
,
Object
>
responseMap
=
gtDataRestClient
.
createLarge
(
filepath
,
fileGtdataPath
);
if
(
responseMap
==
null
||
200
!=
(
Integer
)
responseMap
.
get
(
"HttpStatusCode"
))
{
log
.
error
(
JSONUtil
.
toJsonStr
(
responseMap
),
responseMap
);
}
}
baseBiz
.
updateSelectiveById
(
new
DataTempcache
()
{{
setId
(
dataTempcache
.
getId
());
setGtdataPath
(
fileGtdataPath
);
setHasGtdata
(
HASGTDATA_FIN
);
}});
dataTempcacheDB
.
setGtdataPath
(
fileGtdataPath
);
}
}
resultPath
=
dataTempcacheDB
.
getGtdataPath
();
return
ObjectRestResponse
.
succ
(
resultPath
);
}
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
GainData
>>
getPageList
(
DataTempcacheDTO
dto
)
{
public
ObjectRestResponse
<
List
<
GainData
>>
getPageList
(
DataTempcacheDTO
dto
)
{
PageDataVO
pageDataVO
=
PageDataVO
.
pageInfo
(
dto
.
getPage
(),
dto
.
getLimit
(),
()->
baseBiz
.
pageList
(
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 @
d81b7f14
...
@@ -4,6 +4,7 @@ import cn.hutool.core.convert.Convert;
...
@@ -4,6 +4,7 @@ import cn.hutool.core.convert.Convert;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
...
@@ -19,6 +20,7 @@ import com.upyuns.platform.rs.website.entity.FileData;
...
@@ -19,6 +20,7 @@ import com.upyuns.platform.rs.website.entity.FileData;
import
com.upyuns.platform.rs.website.entity.GainData
;
import
com.upyuns.platform.rs.website.entity.GainData
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -31,6 +33,7 @@ import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TR
...
@@ -31,6 +33,7 @@ import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TR
@RestController
@RestController
@RequestMapping
(
"dataTempcache/web"
)
@RequestMapping
(
"dataTempcache/web"
)
@Slf4j
public
class
DataTempcacheController
extends
BaseController
<
DataTempcacheBiz
,
DataTempcache
>
{
public
class
DataTempcacheController
extends
BaseController
<
DataTempcacheBiz
,
DataTempcache
>
{
@Autowired
@Autowired
...
@@ -48,6 +51,49 @@ public class DataTempcacheController extends BaseController<DataTempcacheBiz,Dat
...
@@ -48,6 +51,49 @@ public class DataTempcacheController extends BaseController<DataTempcacheBiz,Dat
//BaseController.baseLogicPages
//BaseController.baseLogicPages
//BaseController.del
//BaseController.del
@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
);
//上传文件
String
fileGtdataPath
=
gtdataPath
+
"/"
+
dataTempcacheDB
.
getFilename
();
String
filepath
=
dataTempcacheDB
.
getFilepath
();
// if(StrUtil.isBlank(filepath)) {
// //下载文件
// }
if
(!
gtDataRestClient
.
isExist
(
fileGtdataPath
).
get
(
"exist"
).
toString
().
equals
(
"true"
)){
Map
<
String
,
Object
>
responseMap
=
gtDataRestClient
.
createLarge
(
filepath
,
fileGtdataPath
);
if
(
responseMap
==
null
||
200
!=
(
Integer
)
responseMap
.
get
(
"HttpStatusCode"
))
{
log
.
error
(
JSONUtil
.
toJsonStr
(
responseMap
),
responseMap
);
}
}
baseBiz
.
updateSelectiveById
(
new
DataTempcache
()
{{
setId
(
dataTempcache
.
getId
());
setGtdataPath
(
fileGtdataPath
);
setHasGtdata
(
HASGTDATA_FIN
);
}});
dataTempcacheDB
.
setGtdataPath
(
fileGtdataPath
);
}
}
resultPath
=
dataTempcacheDB
.
getGtdataPath
();
return
ObjectRestResponse
.
succ
(
resultPath
);
}
@ApiOperation
(
"查询分页-ObjectRestResponse"
)
@ApiOperation
(
"查询分页-ObjectRestResponse"
)
@RequestMapping
(
value
=
"/app/unauth/logicPages"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/unauth/logicPages"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
@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