Commit b3c76596 authored by liqin's avatar liqin 💬

bug fixed

parent 0a98c7a5
......@@ -35,7 +35,7 @@ public class ExhibitionBoard implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("展板内容ID")
@TableId(value = "id", type = IdType.ASSIGN_ID)
@TableId(type = IdType.AUTO)
@NotNull(message = "展板内容ID不能为空", groups = {Update.class})
private String id;
......@@ -44,6 +44,11 @@ public class ExhibitionBoard implements Serializable {
@NotBlank(message = "展板分类名称不能为空", groups = {Add.class, Update.class})
private String name;
@ApiModelProperty("展板编号")
@TableField("serial_no")
@TableId(value = "id", type = IdType.ASSIGN_ID)
private String serialNo;
@ApiModelProperty("展板版权方ID")
@TableField("board_copyright_owner_id")
private String boardCopyrightOwnerId;
......@@ -114,6 +119,10 @@ public class ExhibitionBoard implements Serializable {
@TableField(exist = false)
private List<String> datumIdList;
@ApiModelProperty("展板视频缩略图")
@TableField(exist = false)
private String boardVideoContentThumbnail;
@ApiModelProperty("所属学习内容ID")
@TableField(exist = false)
private String learningContentId;
......
......@@ -343,12 +343,12 @@ public class ChinaMobileRestApiController extends BaseController {
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "learningContentId", value = "学习内容ID", paramType = "query", dataType = "String")
@ApiImplicitParam(name = "learningContentId", value = "学习内容ID", paramType = "query", dataType = "String", required = false)
})
@PostMapping("/exhibitionBoard/getPage")
@RequiresPermissions("exhibition:board:page")
@ApiOperation(value = "展板列表查询", notes = "展板列表查询")
public Map<String, Object> getExhibitionBoardPageList(@RequestParam(value = "learningContentId") String learningContentId) {
public Map<String, Object> getExhibitionBoardPageList(@RequestParam(value = "learningContentId", required = false) String learningContentId) {
final IPage<ExhibitionBoard> page = this.learningContentBoardService.getBoardPageByLearningContentId(getPage(), learningContentId, null);
for (ExhibitionBoard exhibitionBoard : page.getRecords()) {
exhibitionBoard.setLearningContentId(learningContentId);
......@@ -360,6 +360,10 @@ public class ChinaMobileRestApiController extends BaseController {
String name = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId()).getName();
exhibitionBoard.setExhibitionBoardCatName(name);
}
if (exhibitionBoard.getVideoContentId() != null) {
String thumbnail = this.videoContentService.getById(exhibitionBoard.getVideoContentId()).getThumbnail();
exhibitionBoard.setBoardVideoContentThumbnail(thumbnail);
}
LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getVideoContentId());
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_VIDEO);
List<Asset> videoList = this.assetService.list(assetQueryWrapper);
......@@ -388,6 +392,10 @@ public class ChinaMobileRestApiController extends BaseController {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setVideoContentCopyrightOwnerName(name);
}
if (exhibitionBoard.getVideoContentId() != null) {
String thumbnail = this.videoContentService.getById(exhibitionBoard.getVideoContentId()).getThumbnail();
exhibitionBoard.setBoardVideoContentThumbnail(thumbnail);
}
LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId());
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_AUDIO.name());
......
......@@ -106,6 +106,12 @@ public class ExhibitionBoardController extends BaseController {
@RequiresPermissions("exhibition:board:update")
@ApiOperation(value = "修改展板信息", notes = "修改展板信息")
public Map<String, Object> updateExhibitionBoard(@Validated(value = {Update.class}) ExhibitionBoard exhibitionBoard) {
final VideoContent videoContent = this.videoContentService.getById(exhibitionBoard.getVideoContentId());
exhibitionBoard.setVideoContentName(videoContent.getName());
exhibitionBoard.setAuditStatus(AuditStatusEnum.TBC.name());
exhibitionBoard.setPublished(false);
boolean flag = exhibitionBoardService.updateById(exhibitionBoard);
......
......@@ -15,13 +15,14 @@
<result column="thumbnail" property="thumbnail"/>
<result column="language" property="language"/>
<result column="md5" property="md5"/>
<result column="is_deleted" property="deleted"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, ref_item_id, file_name, file_ext_name, file_type, file_size, file_cat, file_url, thumbnail, language, md5,
id, ref_item_id, file_name, file_ext_name, file_type, file_size, file_cat, file_url, thumbnail, language, md5, is_deleted,
create_time, update_time
</sql>
......
......@@ -6,6 +6,7 @@
<resultMap id="BaseResultMap" type="cn.wisenergy.chnmuseum.party.model.ExhibitionBoard">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="serial_no" property="serialNo"/>
<result column="board_copyright_owner_id" property="boardCopyrightOwnerId"/>
<result column="exhibition_board_cat_id" property="exhibitionBoardCatId"/>
<result column="cover" property="cover"/>
......@@ -24,7 +25,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, name, board_copyright_owner_id, exhibition_board_cat_id, cover, qrcode_url, remarks,
id, name, serial_no, board_copyright_owner_id, exhibition_board_cat_id, cover, qrcode_url, remarks,
video_content_copyright_owner_id, video_content_cat_id, video_content_id, ref_material_dir,
audit_status, is_published, is_deleted, create_time, update_time
</sql>
......
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