Commit 71a11bf6 authored by liqin's avatar liqin 💬

bug fixed

parent d926e418
......@@ -19,4 +19,20 @@ public enum LanguageEnum {
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 {
.description("Api Documentation")
.contact(new Contact("Danny Lee", "http://blog.51cto.com/7308310", "liqinwyyx@163.com"))
.version("1.0")
.termsOfServiceUrl("http://111.203.232.175:8088/mall")
.build();
}
......
......@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -160,8 +161,8 @@ public class ChinaMobileRestApiController extends BaseController {
@RequestMapping(value = "/user/webLogin", method = RequestMethod.POST)
public Map<String, Object> login(@RequestParam(value = "username") String username,
@RequestParam(value = "password") String password,
@RequestParam(value = "mac") String mac) {
@RequestParam(value = "password") String password,
@RequestParam(value = "mac") String mac) {
JSONObject resultMap = new JSONObject(true);
TUser user;
if (StringUtils.isNoneBlank(username)) {
......@@ -323,17 +324,27 @@ public class ChinaMobileRestApiController extends BaseController {
return getFailResult();
}
/**
* 查询语言列表
*/
@ApiOperation(value = "查询语言列表", notes = "查询语言列表")
@PostMapping(value = "/language/info")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "boardId", value = "展板内容ID", paramType = "path", dataType = "String", required = true)
})
@ApiOperation(value = "查询某个展板语言列表", notes = "查询某个展板语言列表")
@GetMapping(value = "/exhibitionBoard/language/{boardId}")
@RequiresAuthentication
public Map<String, Object> languageInfo() {
public Map<String, Object> getLanguageList(@PathVariable(value = "boardId") String boardId) {
JSONObject resultMap = new JSONObject();
List<Map<String, String>> list = new ArrayList<>();
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("message", "成功");
resultMap.put("data", list);
......@@ -459,7 +470,7 @@ public class ChinaMobileRestApiController extends BaseController {
}
@Scheduled(cron = "0 0/5 * * * *")
public void boardStatistic(){
public void boardStatistic() {
try {
System.out.println("定时汇总播放记录开始...");
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