Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
chnmuseum-party
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
liqin
chnmuseum-party
Commits
71a11bf6
Commit
71a11bf6
authored
Apr 15, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
d926e418
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
11 deletions
+39
-11
LanguageEnum.java
.../wisenergy/chnmuseum/party/common/enums/LanguageEnum.java
+16
-0
SwaggerConfig.java
...java/cn/wisenergy/chnmuseum/party/conf/SwaggerConfig.java
+1
-0
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+22
-11
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/LanguageEnum.java
View file @
71a11bf6
...
@@ -19,4 +19,20 @@ public enum LanguageEnum {
...
@@ -19,4 +19,20 @@ public enum LanguageEnum {
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
}
src/main/java/cn/wisenergy/chnmuseum/party/conf/SwaggerConfig.java
View file @
71a11bf6
...
@@ -43,6 +43,7 @@ public class SwaggerConfig {
...
@@ -43,6 +43,7 @@ public class SwaggerConfig {
.
description
(
"Api Documentation"
)
.
description
(
"Api Documentation"
)
.
contact
(
new
Contact
(
"Danny Lee"
,
"http://blog.51cto.com/7308310"
,
"liqinwyyx@163.com"
))
.
contact
(
new
Contact
(
"Danny Lee"
,
"http://blog.51cto.com/7308310"
,
"liqinwyyx@163.com"
))
.
version
(
"1.0"
)
.
version
(
"1.0"
)
.
termsOfServiceUrl
(
"http://111.203.232.175:8088/mall"
)
.
build
();
.
build
();
}
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
71a11bf6
...
@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -323,17 +324,27 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -323,17 +324,27 @@ public class ChinaMobileRestApiController extends BaseController {
return
getFailResult
();
return
getFailResult
();
}
}
/**
@ApiImplicitParams
(
value
=
{
* 查询语言列表
@ApiImplicitParam
(
name
=
"boardId"
,
value
=
"展板内容ID"
,
paramType
=
"path"
,
dataType
=
"String"
,
required
=
true
)
*/
})
@ApiOperation
(
value
=
"查询
语言列表"
,
notes
=
"查询
语言列表"
)
@ApiOperation
(
value
=
"查询
某个展板语言列表"
,
notes
=
"查询某个展板
语言列表"
)
@
PostMapping
(
value
=
"/language/info
"
)
@
GetMapping
(
value
=
"/exhibitionBoard/language/{boardId}
"
)
@RequiresAuthentication
@RequiresAuthentication
public
Map
<
String
,
Object
>
languageInfo
(
)
{
public
Map
<
String
,
Object
>
getLanguageList
(
@PathVariable
(
value
=
"boardId"
)
String
boardId
)
{
JSONObject
resultMap
=
new
JSONObject
();
JSONObject
resultMap
=
new
JSONObject
();
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<>();
try
{
try
{
List
<
Map
<
String
,
String
>>
list
=
areaService
.
languageInfo
();
final
ExhibitionBoard
exhibitionBoard
=
this
.
exhibitionBoardService
.
getById
(
boardId
);
final
String
videoContentId
=
exhibitionBoard
.
getVideoContentId
();
final
LambdaQueryWrapper
<
Asset
>
eq
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
videoContentId
);
final
List
<
Asset
>
assetList
=
this
.
assetService
.
list
(
eq
);
final
List
<
String
>
languageList
=
assetList
.
stream
().
map
(
Asset:
:
getLanguage
).
collect
(
Collectors
.
toList
());
for
(
String
language
:
languageList
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>(
2
);
map
.
put
(
"code"
,
LanguageEnum
.
valueOf
(
language
).
name
());
map
.
put
(
"name"
,
LanguageEnum
.
valueOf
(
language
).
getName
());
list
.
add
(
map
);
}
resultMap
.
put
(
"resultCode"
,
"200"
);
resultMap
.
put
(
"resultCode"
,
"200"
);
resultMap
.
put
(
"message"
,
"成功"
);
resultMap
.
put
(
"message"
,
"成功"
);
resultMap
.
put
(
"data"
,
list
);
resultMap
.
put
(
"data"
,
list
);
...
@@ -459,7 +470,7 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -459,7 +470,7 @@ public class ChinaMobileRestApiController extends BaseController {
}
}
@Scheduled
(
cron
=
"0 0/5 * * * *"
)
@Scheduled
(
cron
=
"0 0/5 * * * *"
)
public
void
boardStatistic
(){
public
void
boardStatistic
()
{
try
{
try
{
System
.
out
.
println
(
"定时汇总播放记录开始..."
);
System
.
out
.
println
(
"定时汇总播放记录开始..."
);
tBoardStatisticService
.
boardStatisticInfo
(
null
,
true
);
tBoardStatisticService
.
boardStatisticInfo
(
null
,
true
);
...
...
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