Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
master-5.0
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
master-5.0
Commits
4df9a8e1
提交
4df9a8e1
authored
11月 21, 2019
作者:
malei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(DataLog): DistrictAnalysis
1.省份接口 References: N/A
上级
f74856e5
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
89 行增加
和
0 行删除
+89
-0
DataLogController.java
.../com/zrqx/statistics/bg/controller/DataLogController.java
+8
-0
ProvinceEnums.java
...in/java/com/zrqx/core/enums/statistics/ProvinceEnums.java
+81
-0
没有找到文件。
app/statistics/src/main/java/com/zrqx/statistics/bg/controller/DataLogController.java
浏览文件 @
4df9a8e1
...
...
@@ -2,12 +2,14 @@ package com.zrqx.statistics.bg.controller;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zrqx.core.enums.statistics.ProvinceEnums
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.statistics.bg.service.DataLogService
;
import
com.zrqx.statistics.commons.form.*
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -89,4 +91,10 @@ public class DataLogController {
public
CallBack
<
JSONObject
>
getLoyalty
(
QueryVisitorLoyaltyForm
form
)
{
return
CallBack
.
success
(
service
.
loadLoyaltyPolymerization
(
form
));
}
@ApiOperation
(
"省份列表"
)
@GetMapping
(
"/province"
)
public
CallBack
<
JSONObject
>
getProvince
()
{
return
CallBack
.
success
(
new
JSONObject
(
ProvinceEnums
.
getAllElementAsMap
()));
}
}
core/src/main/java/com/zrqx/core/enums/statistics/ProvinceEnums.java
0 → 100644
浏览文件 @
4df9a8e1
package
com
.
zrqx
.
core
.
enums
.
statistics
;
import
java.util.*
;
import
java.util.stream.Collectors
;
public
enum
ProvinceEnums
{
ALL
(
"all"
,
"全部"
,
0
),
CHINA
(
"china"
,
"全国"
,
0
),
OTHER
(
"other"
,
"其他"
,
999
),
PROVINCE_1
(
"province,1"
,
"北京"
,
1
),
PROVINCE_2
(
"province,2"
,
"上海"
,
2
),
PROVINCE_3
(
"province,3"
,
"天津"
,
3
),
PROVINCE_4
(
"province,4"
,
"广东"
,
4
),
PROVINCE_5
(
"province,5"
,
"福建"
,
5
),
PROVINCE_8
(
"province,8"
,
"海南"
,
8
),
PROVINCE_9
(
"province,9"
,
"安徽"
,
9
),
PROVINCE_10
(
"province,10"
,
"贵州"
,
10
),
PROVINCE_11
(
"province,11"
,
"甘肃"
,
11
),
PROVINCE_12
(
"province,12"
,
"广西"
,
12
),
PROVINCE_13
(
"province,13"
,
"河北"
,
13
),
PROVINCE_14
(
"province,14"
,
"河南"
,
14
),
PROVINCE_15
(
"province,15"
,
"黑龙江"
,
15
),
PROVINCE_16
(
"province,16"
,
"湖北"
,
16
),
PROVINCE_17
(
"province,17"
,
"湖南"
,
17
),
PROVINCE_18
(
"province,18"
,
"吉林"
,
18
),
PROVINCE_19
(
"province,19"
,
"江苏"
,
19
),
PROVINCE_20
(
"province,20"
,
"江西"
,
20
),
PROVINCE_21
(
"province,21"
,
"辽宁"
,
21
),
PROVINCE_22
(
"province,22"
,
"内蒙古"
,
22
),
PROVINCE_23
(
"province,23"
,
"宁夏"
,
23
),
PROVINCE_24
(
"province,24"
,
"青海"
,
24
),
PROVINCE_25
(
"province,25"
,
"山东"
,
25
),
PROVINCE_26
(
"province,26"
,
"山西"
,
26
),
PROVINCE_27
(
"province,27"
,
"陕西"
,
27
),
PROVINCE_28
(
"province,28"
,
"四川"
,
28
),
PROVINCE_29
(
"province,29"
,
"西藏"
,
29
),
PROVINCE_30
(
"province,30"
,
"新疆"
,
30
),
PROVINCE_31
(
"province,31"
,
"云南"
,
31
),
PROVINCE_32
(
"province,32"
,
"浙江"
,
32
),
PROVINCE_33
(
"province,33"
,
"重庆"
,
33
),
PROVINCE_34
(
"province,34"
,
"香港"
,
34
),
PROVINCE_35
(
"province,35"
,
"台湾"
,
35
),
PROVINCE_36
(
"province,36"
,
"澳门"
,
36
);
private
String
code
;
private
String
name
;
private
Integer
order
;
ProvinceEnums
(
String
code
,
String
name
,
Integer
order
)
{
this
.
code
=
code
;
this
.
name
=
name
;
this
.
order
=
order
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
public
Integer
getOrder
()
{
return
order
;
}
public
static
Map
<
String
,
Object
>
getAllElementAsMap
()
{
Map
<
String
,
Object
>
resultMap
=
new
LinkedHashMap
<>();
List
<
ProvinceEnums
>
enums
=
Arrays
.
asList
(
values
()).
stream
()
.
sorted
(
Comparator
.
comparing
(
ProvinceEnums:
:
getOrder
))
.
collect
(
Collectors
.
toList
());
enums
.
forEach
(
e
->
{
resultMap
.
put
(
e
.
getCode
(),
e
.
getName
());
});
return
resultMap
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论