Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
d2ad14c3
Commit
d2ad14c3
authored
Aug 09, 2023
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-去除缓存
parent
c0cf763f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
+0
-15
EconomicServiceImpl.java
...java/com/dsk/system/service/impl/EconomicServiceImpl.java
+0
-15
No files found.
dsk-system/src/main/java/com/dsk/system/service/impl/EconomicServiceImpl.java
View file @
d2ad14c3
...
...
@@ -54,26 +54,11 @@ public class EconomicServiceImpl implements EconomicService {
if
(
ObjectUtil
.
isEmpty
(
dto
.
getYear
()))
{
dto
.
setYear
(
DateUtils
.
getYear
()
-
1
);
}
String
redisKey
=
CacheConstants
.
DATA_ECONOMIC
+
dto
.
getPageIndex
()
+
dto
.
getYear
()
+
dto
.
getProvinceIds
()
+
dto
.
getCityIds
()
+
dto
.
getAreaIds
();
Map
<
String
,
Object
>
cacheMap
=
redisCache
.
getCacheObject
(
redisKey
);
if
(
ObjectUtil
.
isNotEmpty
(
cacheMap
))
{
return
BeanUtil
.
toBean
(
cacheMap
,
AjaxResult
.
class
);
}
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/economic/national/nationalPage"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
Integer
code
=
MapUtils
.
getInteger
(
map
,
"code"
,
300
);
if
(!
code
.
equals
(
HttpStatus
.
OK
.
value
()))
{
throw
new
RuntimeException
();
}
Map
data
=
MapUtils
.
getMap
(
map
,
"data"
,
null
);
List
<
Object
>
list
=
CommonUtils
.
assertAsArray
(
MapUtils
.
getObject
(
data
,
"list"
,
""
));
if
(
ObjectUtil
.
isNotEmpty
(
list
)
&&
TYPE
.
equals
(
dto
.
getType
()))
{
if
(
FIELD
.
equals
(
dto
.
getField
())
&&
ORDER
.
equals
(
dto
.
getOrder
()))
{
if
(
ObjectUtil
.
isEmpty
(
dto
.
getProvinceIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getCityIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getAreaIds
()))
{
redisCache
.
setCacheObject
(
redisKey
,
map
);
}
}
}
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
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