Commit 71a11bf6 authored by liqin's avatar liqin 💬

bug fixed

parent d926e418
...@@ -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;
}
} }
...@@ -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();
} }
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment