Commit 0a98c7a5 authored by liqin's avatar liqin 💬

bug fixed

parent bae61124
...@@ -32,24 +32,27 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo ...@@ -32,24 +32,27 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
IPage<ExhibitionBoard> selectBoardPageByLearningContentId(Page<?> page, String learningContentId, String nameOrCode); IPage<ExhibitionBoard> selectBoardPageByLearningContentId(Page<?> page, String learningContentId, String nameOrCode);
@Select("<script>" @Select("<script>"
+ "SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb, asset a " + "SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb, video_content vc, asset a "
+ "WHERE lcb.learning_content_id = lc.id " + "WHERE lcb.learning_content_id = lc.id "
+ "and lcb.exhibition_board_id = eb.id " + "and lcb.exhibition_board_id = eb.id "
+ "and eb.asset_id = a.id " + "and eb.video_content_id = vc.id "
+ "and vc.id = a.ref_item_id "
+ "and lc.applicable_scope = 'THIS_ORGAN' " + "and lc.applicable_scope = 'THIS_ORGAN' "
+ "and lc.organ_code = #{organCode} " + "and lc.organ_code = #{organCode} "
+ "UNION " + "UNION "
+ "SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb, asset a " + "SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb, video_content vc, asset a "
+ "WHERE lcb.learning_content_id = lc.id " + "WHERE lcb.learning_content_id = lc.id "
+ "and lcb.exhibition_board_id = eb.id " + "and lcb.exhibition_board_id = eb.id "
+ "and eb.asset_id = a.id " + "and eb.video_content_id = vc.id "
+ "and vc.id = a.ref_item_id "
+ "and lc.applicable_scope = 'THIS_ORGAN_SUB'" + "and lc.applicable_scope = 'THIS_ORGAN_SUB'"
+ "and lc.organ_code like CONCAT(#{organCode},'%') " + "and lc.organ_code like CONCAT(#{organCode},'%') "
+ "UNION " + "UNION "
+ "SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb, asset a " + "SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb, video_content vc, asset a "
+ "WHERE lcb.learning_content_id = lc.id " + "WHERE lcb.learning_content_id = lc.id "
+ "and lcb.exhibition_board_id = eb.id " + "and lcb.exhibition_board_id = eb.id "
+ "and eb.asset_id = a.id " + "and eb.video_content_id = vc.id "
+ "and vc.id = a.ref_item_id "
+ "and lc.applicable_scope = 'ALL_PLAT'" + "and lc.applicable_scope = 'ALL_PLAT'"
+ "</script>" + "</script>"
) )
......
...@@ -78,8 +78,7 @@ public class Asset implements Serializable { ...@@ -78,8 +78,7 @@ public class Asset implements Serializable {
@ApiModelProperty("是否已删除") @ApiModelProperty("是否已删除")
@TableField("is_deleted") @TableField("is_deleted")
private Boolean isDeleted; private Boolean deleted;
@ApiModelProperty("创建日期") @ApiModelProperty("创建日期")
private LocalDateTime createTime; private LocalDateTime createTime;
......
...@@ -3,7 +3,6 @@ package cn.wisenergy.chnmuseum.party.web.controller; ...@@ -3,7 +3,6 @@ package cn.wisenergy.chnmuseum.party.web.controller;
import cn.wisenergy.chnmuseum.party.auth.SHA256PasswordEncryptionService; import cn.wisenergy.chnmuseum.party.auth.SHA256PasswordEncryptionService;
import cn.wisenergy.chnmuseum.party.auth.util.JwtTokenUtil; import cn.wisenergy.chnmuseum.party.auth.util.JwtTokenUtil;
import cn.wisenergy.chnmuseum.party.common.enums.FileCatEnum; import cn.wisenergy.chnmuseum.party.common.enums.FileCatEnum;
import cn.wisenergy.chnmuseum.party.common.enums.FileTypeEnum;
import cn.wisenergy.chnmuseum.party.common.enums.LanguageEnum; import cn.wisenergy.chnmuseum.party.common.enums.LanguageEnum;
import cn.wisenergy.chnmuseum.party.common.util.TimeUtils; import cn.wisenergy.chnmuseum.party.common.util.TimeUtils;
import cn.wisenergy.chnmuseum.party.common.validator.groups.Add; import cn.wisenergy.chnmuseum.party.common.validator.groups.Add;
...@@ -361,7 +360,8 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -361,7 +360,8 @@ public class ChinaMobileRestApiController extends BaseController {
String name = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId()).getName(); String name = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId()).getName();
exhibitionBoard.setExhibitionBoardCatName(name); exhibitionBoard.setExhibitionBoardCatName(name);
} }
LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getVideoContentId()).eq(Asset::getFileType, FileTypeEnum.VIDEO.name()); 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); List<Asset> videoList = this.assetService.list(assetQueryWrapper);
exhibitionBoard.setVideoList(videoList); exhibitionBoard.setVideoList(videoList);
} }
...@@ -518,16 +518,18 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -518,16 +518,18 @@ public class ChinaMobileRestApiController extends BaseController {
} }
@ApiImplicitParams(value = { @ApiImplicitParams(value = {
@ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "boardId", value = "展板内容ID", paramType = "path", dataType = "String", required = true) @ApiImplicitParam(name = "boardId", value = "展板内容ID", paramType = "path", dataType = "String", required = true)
}) })
@GetMapping("/exhibitionBoard/getRefMaterial/{boardId}") @GetMapping("/exhibitionBoard/getRefMaterial/{boardId}")
@RequiresPermissions("learning:project:page") @RequiresPermissions("learning:project:page")
@ApiOperation(value = "展板参考资料查询", notes = "展板参考资料查询") @ApiOperation(value = "展板参考资料分页查询", notes = "展板参考资料分页查询")
public Map<String, Object> getBoardRefMaterial(@PathVariable(value = "boardId") String boardId) { public Map<String, Object> getBoardRefMaterial(@PathVariable(value = "boardId") String boardId) {
final ExhibitionBoard exhibitionBoard = this.exhibitionBoardService.getById(boardId); final ExhibitionBoard exhibitionBoard = this.exhibitionBoardService.getById(boardId);
final LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId()); final LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId());
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_DATUM.name()); assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_DATUM.name());
final List<Asset> datumList = this.assetService.list(assetQueryWrapper); final Page<Asset> datumList = this.assetService.page(this.getPage(), assetQueryWrapper);
return getResult(datumList); return getResult(datumList);
} }
......
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