Commit 25d077f2 authored by nie'hong's avatar nie'hong

修改-大屏统计数据出错

parent 3787ebc2
...@@ -44,7 +44,7 @@ public class ExhibitionBoard implements Serializable { ...@@ -44,7 +44,7 @@ public class ExhibitionBoard implements Serializable {
@ApiModelProperty("展板内容名称") @ApiModelProperty("展板内容名称")
@TableField("name") @TableField("name")
@NotBlank(message = "展板名称不能为空", groups = {Add.class, Update.class}) @NotBlank(message = "展板名称不能为空", groups = {Add.class, Update.class})
@Length(max = 20, message = "展板名称字数不能超过20") @Length(max = 30, message = "展板名称字数不能超过30")
private String name; private String name;
/** /**
......
...@@ -574,11 +574,11 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -574,11 +574,11 @@ public class ChinaMobileRestApiController extends BaseController {
@RequestParam(value = "audioLanguage", required = false) LanguageEnum audioLanguage) { @RequestParam(value = "audioLanguage", required = false) LanguageEnum audioLanguage) {
ExhibitionBoard exhibitionBoard = exhibitionBoardService.getById(id); ExhibitionBoard exhibitionBoard = exhibitionBoardService.getById(id);
String boardCopyrightOwnerId = exhibitionBoard.getBoardCopyrightOwnerId(); String boardCopyrightOwnerId = exhibitionBoard.getBoardCopyrightOwnerId();
if (boardCopyrightOwnerId != null) { if (StringUtils.isNotEmpty(boardCopyrightOwnerId)) {
exhibitionBoard.setBoardCopyrightOwnerName(this.copyrightOwnerService.getById(boardCopyrightOwnerId).getName()); exhibitionBoard.setBoardCopyrightOwnerName(this.copyrightOwnerService.getById(boardCopyrightOwnerId).getName());
} }
String exhibitionBoardCatId = exhibitionBoard.getExhibitionBoardCatId(); String exhibitionBoardCatId = exhibitionBoard.getExhibitionBoardCatId();
if (exhibitionBoardCatId != null) { if (StringUtils.isNotEmpty(exhibitionBoardCatId)) {
exhibitionBoard.setExhibitionBoardCatName(this.exhibitionBoardCatService.getById(exhibitionBoardCatId).getName()); exhibitionBoard.setExhibitionBoardCatName(this.exhibitionBoardCatService.getById(exhibitionBoardCatId).getName());
} }
...@@ -586,7 +586,7 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -586,7 +586,7 @@ public class ChinaMobileRestApiController extends BaseController {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName(); String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setVideoContentCopyrightOwnerName(name); exhibitionBoard.setVideoContentCopyrightOwnerName(name);
} }
if (exhibitionBoard.getVideoContentId() != null) { if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentId())) {
String thumbnail = this.videoContentService.getById(exhibitionBoard.getVideoContentId()).getThumbnail(); String thumbnail = this.videoContentService.getById(exhibitionBoard.getVideoContentId()).getThumbnail();
exhibitionBoard.setBoardVideoContentThumbnail(thumbnail); exhibitionBoard.setBoardVideoContentThumbnail(thumbnail);
} }
...@@ -619,7 +619,7 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -619,7 +619,7 @@ public class ChinaMobileRestApiController extends BaseController {
exhibitionBoard.setDatumList(datumList); exhibitionBoard.setDatumList(datumList);
final String videoContentId = exhibitionBoard.getVideoContentId(); final String videoContentId = exhibitionBoard.getVideoContentId();
if (videoContentId != null) { if (StringUtils.isNotEmpty(videoContentId)) {
final VideoContent videoContent = this.videoContentService.getById(videoContentId); final VideoContent videoContent = this.videoContentService.getById(videoContentId);
exhibitionBoard.setVideoContentName(videoContent.getName()); exhibitionBoard.setVideoContentName(videoContent.getName());
......
...@@ -213,10 +213,10 @@ ...@@ -213,10 +213,10 @@
<select id="getBoardTotal" resultType="java.lang.Integer"> <select id="getBoardTotal" resultType="java.lang.Integer">
SELECT count( a.board_id ) SELECT count( a.board_id )
FROM FROM
( SELECT s.board_id ( SELECT e.id
FROM t_board_statistic s FROM exhibition_board e
left join t_board_statistic s on e.id = s.board_id
left join t_organ o on o.id = s.organ_id left join t_organ o on o.id = s.organ_id
left join exhibition_board e on e.id = s.board_id and e.is_deleted = 0
<where> <where>
<if test="statisticDate != null and statisticDate.length() == 4"> <if test="statisticDate != null and statisticDate.length() == 4">
left(s.play_date,4) = ${statisticDate} left(s.play_date,4) = ${statisticDate}
......
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