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
42b7d834
Commit
42b7d834
authored
Aug 09, 2023
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-
parent
c61d57e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
EconomicServiceImpl.java
...java/com/dsk/system/service/impl/EconomicServiceImpl.java
+14
-3
No files found.
dsk-system/src/main/java/com/dsk/system/service/impl/EconomicServiceImpl.java
View file @
42b7d834
...
...
@@ -40,13 +40,21 @@ public class EconomicServiceImpl implements EconomicService {
*/
private
static
final
Integer
TYPE
=
1
;
/**
* 默认排序
*/
private
static
final
String
FIELD
=
"gdp"
;
private
static
final
String
ORDER
=
"desc"
;
@Override
public
AjaxResult
nationalPage
(
OpRegionalEconomicDataV1PageDto
dto
)
{
if
(
ObjectUtil
.
isEmpty
(
dto
.
getYear
()))
{
dto
.
setYear
(
DateUtils
.
getYear
()
-
1
);
}
String
redisKey
=
CacheConstants
.
DATA_ECONOMIC
+
dto
.
getYear
()
+
dto
.
getProvinceIds
()
+
dto
.
getCityIds
()
+
dto
.
getAreaIds
();
String
redisKey
=
CacheConstants
.
DATA_ECONOMIC
+
dto
.
get
PageIndex
()
+
dto
.
get
Year
()
+
dto
.
getProvinceIds
()
+
dto
.
getCityIds
()
+
dto
.
getAreaIds
();
Map
<
String
,
Object
>
cacheMap
=
redisCache
.
getCacheObject
(
redisKey
);
if
(
ObjectUtil
.
isNotEmpty
(
cacheMap
))
{
return
BeanUtil
.
toBean
(
cacheMap
,
AjaxResult
.
class
);
...
...
@@ -59,10 +67,13 @@ public class EconomicServiceImpl implements EconomicService {
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
(
ObjectUtil
.
isEmpty
(
dto
.
getProvinceIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getCityIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getAreaIds
()))
{
if
(
FIELD
.
equals
(
dto
.
getField
())
&&
ORDER
.
equals
(
dto
.
getOrder
()))
{
if
(
ObjectUtil
.
isEmpty
(
dto
.
getProvinceIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getCityIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getAreaIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getField
()))
{
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