Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
67efb356
Commit
67efb356
authored
Feb 20, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
9f67b38e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
177 additions
and
1 deletion
+177
-1
CountryService.java
src/main/java/com/egolm/film/api/service/CountryService.java
+2
-0
CountryServiceImpl.java
...a/com/egolm/film/api/service/impl/CountryServiceImpl.java
+13
-1
CommonApiController.java
...main/java/com/egolm/film/api/web/CommonApiController.java
+7
-0
country_asia.json
src/main/resources/doc/country_asia.json
+155
-0
No files found.
src/main/java/com/egolm/film/api/service/CountryService.java
View file @
67efb356
...
@@ -10,5 +10,7 @@ public interface CountryService {
...
@@ -10,5 +10,7 @@ public interface CountryService {
public
Map
<
String
,
String
>
queryCountryMap
();
public
Map
<
String
,
String
>
queryCountryMap
();
public
Map
<
String
,
String
>
queryCountryMapReverse
();
public
Map
<
String
,
String
>
queryCountryMapReverse
();
public
Object
queryAsiaCountryList
();
}
}
src/main/java/com/egolm/film/api/service/impl/CountryServiceImpl.java
View file @
67efb356
...
@@ -54,7 +54,19 @@ public class CountryServiceImpl implements CountryService {
...
@@ -54,7 +54,19 @@ public class CountryServiceImpl implements CountryService {
}
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
JSON
.
toJSONString
(
new
CountryServiceImpl
().
queryCountryList
()));
}
}
@Override
public
Object
queryAsiaCountryList
()
{
String
json
=
Common
.
getStringAsStream
(
"doc/country_asia.json"
);
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<
Map
<
String
,
String
>>();
for
(
Object
obj:
JSON
.
parseArray
(
json
))
{
Map
<?,
?>
objMap
=
(
Map
<?,
?>)
obj
;
list
.
add
(
objMap
.
entrySet
().
stream
().
collect
(
Collectors
.
toMap
((
e
)
->
(
String
)
e
.
getValue
(),
(
e
)
->
(
String
)
e
.
getKey
())));
}
return
list
;
}
}
}
src/main/java/com/egolm/film/api/web/CommonApiController.java
View file @
67efb356
...
@@ -39,6 +39,13 @@ public class CommonApiController {
...
@@ -39,6 +39,13 @@ public class CommonApiController {
return
Rjx
.
jsonOk
().
setData
(
countryService
.
queryCountryList
());
return
Rjx
.
jsonOk
().
setData
(
countryService
.
queryCountryList
());
}
}
@ResponseBody
@PostMapping
(
"getAsiaCountryList"
)
@ApiOperation
(
"获取国家对照表"
)
public
Object
getAsiaCountryList
()
{
return
Rjx
.
jsonOk
().
setData
(
countryService
.
queryAsiaCountryList
());
}
@ResponseBody
@ResponseBody
@PostMapping
(
"getLanguageList"
)
@PostMapping
(
"getLanguageList"
)
...
...
src/main/resources/doc/country_asia.json
0 → 100644
View file @
67efb356
[
{
"China"
:
"中国"
},
{
"HongKong China"
:
"中国香港"
},
{
"Macao China"
:
"中国澳门"
},
{
"Taiwan China"
:
"中国台湾"
},
{
"Mongolia"
:
"蒙古"
},
{
"North Korea"
:
"朝鲜"
},
{
"South Korea"
:
"韩国"
},
{
"Japan"
:
"日本"
},
{
"Philippines"
:
"菲律宾"
},
{
"Vietnam"
:
"越南"
},
{
"Laos"
:
"老挝"
},
{
"Cambodia"
:
"柬埔寨"
},
{
"Myanmar"
:
"缅甸"
},
{
"Thailand"
:
"泰国"
},
{
"Malaysia"
:
"马来西亚"
},
{
"Brunei"
:
"文莱"
},
{
"Singapore"
:
"新加坡"
},
{
"Indonesia"
:
"印度尼西亚"
},
{
"Democratic Republic of Timor-Leste"
:
"东帝汶"
},
{
"Nepal"
:
"尼泊尔"
},
{
"Bhutan"
:
"不丹"
},
{
"Bangladesh"
:
"孟加拉国"
},
{
"India"
:
"印度"
},
{
"Pakistan"
:
"巴基斯坦"
},
{
"Sri Lanka"
:
"斯里兰卡"
},
{
"Maldives"
:
"马尔代夫"
},
{
"Kazakhstan"
:
"哈萨克斯坦"
},
{
"Kyrgyzstan"
:
"吉尔吉斯斯坦"
},
{
"Tajikistan"
:
"塔吉克斯坦"
},
{
"Uzbekistan"
:
"乌兹别克斯坦"
},
{
"Turkmenistan"
:
"土库曼斯坦"
},
{
"Afghanistan"
:
"阿富汗"
},
{
"Iraq"
:
"伊拉克"
},
{
"Iran"
:
"伊朗"
},
{
"Syria"
:
"叙利亚"
},
{
"Jordan"
:
"约旦"
},
{
"Lebanon"
:
"黎巴嫩"
},
{
"Israel"
:
"以色列"
},
{
"Palestinian Territory"
:
"巴勒斯坦"
},
{
"Saudi Arabia"
:
"沙特阿拉伯"
},
{
"Bahrain"
:
"巴林 "
},
{
"Qatar"
:
"卡塔尔"
},
{
"Kuwait"
:
"科威特"
},
{
"United Arab Emirates"
:
"阿拉伯联合酋长国(阿联酋)"
},
{
"Oman"
:
"阿曼"
},
{
"Yemen"
:
"也门"
},
{
"Georgia"
:
"格鲁吉亚"
},
{
"Armenia"
:
"亚美尼亚"
},
{
"Azerbaijan"
:
"阿塞拜疆"
},
{
"Turkey"
:
"土耳其"
},
{
"Cyprus"
:
"塞浦路斯"
}
]
\ No newline at end of file
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