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
1c263404
Commit
1c263404
authored
Aug 09, 2023
by
huangjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev20230707' of
http://192.168.60.201/root/dsk-operate-sys
into dev20230707
parents
9ad64129
d2ad14c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
EconomicServiceImpl.java
...java/com/dsk/system/service/impl/EconomicServiceImpl.java
+8
-12
No files found.
dsk-system/src/main/java/com/dsk/system/service/impl/EconomicServiceImpl.java
View file @
1c263404
...
@@ -40,29 +40,25 @@ public class EconomicServiceImpl implements EconomicService {
...
@@ -40,29 +40,25 @@ public class EconomicServiceImpl implements EconomicService {
*/
*/
private
static
final
Integer
TYPE
=
1
;
private
static
final
Integer
TYPE
=
1
;
/**
* 默认排序
*/
private
static
final
String
FIELD
=
"gdp"
;
private
static
final
String
ORDER
=
"desc"
;
@Override
@Override
public
AjaxResult
nationalPage
(
OpRegionalEconomicDataV1PageDto
dto
)
{
public
AjaxResult
nationalPage
(
OpRegionalEconomicDataV1PageDto
dto
)
{
if
(
ObjectUtil
.
isEmpty
(
dto
.
getYear
()))
{
if
(
ObjectUtil
.
isEmpty
(
dto
.
getYear
()))
{
dto
.
setYear
(
DateUtils
.
getYear
()
-
1
);
dto
.
setYear
(
DateUtils
.
getYear
()
-
1
);
}
}
String
redisKey
=
CacheConstants
.
DATA_ECONOMIC
+
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
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/economic/national/nationalPage"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
Integer
code
=
MapUtils
.
getInteger
(
map
,
"code"
,
300
);
Integer
code
=
MapUtils
.
getInteger
(
map
,
"code"
,
300
);
if
(!
code
.
equals
(
HttpStatus
.
OK
.
value
()))
{
if
(!
code
.
equals
(
HttpStatus
.
OK
.
value
()))
{
throw
new
RuntimeException
();
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
(
ObjectUtil
.
isEmpty
(
dto
.
getProvinceIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getCityIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getAreaIds
()))
{
redisCache
.
setCacheObject
(
redisKey
,
map
);
}
}
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
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