Commit ee88a2c6 authored by nie'hong's avatar nie'hong

修改-中移接口学习内容-展板界面展板缩略图可为空

parent 643f5cdb
...@@ -145,7 +145,7 @@ public class AssetController extends BaseController { ...@@ -145,7 +145,7 @@ public class AssetController extends BaseController {
for (Asset asset : assetList) { for (Asset asset : assetList) {
ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(); ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
FastDFSUtils.downloadFile(asset.getFileUrlCrypto(), byteOutputStream); FastDFSUtils.downloadFile(asset.getFileUrlCrypto(), byteOutputStream);
map.put(asset.getFileNameCrypto(), new ByteArrayInputStream(byteOutputStream.toByteArray())); map.put(asset.getId(), new ByteArrayInputStream(byteOutputStream.toByteArray()));
} }
ZipUtil.zip(response.getOutputStream(), map.keySet().toArray(new String[0]), map.values().toArray(new InputStream[0])); ZipUtil.zip(response.getOutputStream(), map.keySet().toArray(new String[0]), map.values().toArray(new InputStream[0]));
} }
......
...@@ -510,7 +510,9 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -510,7 +510,9 @@ public class ChinaMobileRestApiController extends BaseController {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName(); String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setBoardCopyrightOwnerName(name); exhibitionBoard.setBoardCopyrightOwnerName(name);
} }
if (StringUtils.isEmpty(exhibitionBoard.getCover())) {
exhibitionBoard.setCover("");
}
LambdaQueryWrapper<Asset> assetQueryWrapper; LambdaQueryWrapper<Asset> assetQueryWrapper;
if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentId())) { if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentId())) {
final VideoContent videoContent = this.videoContentService.getById(exhibitionBoard.getVideoContentId()); final VideoContent videoContent = this.videoContentService.getById(exhibitionBoard.getVideoContentId());
......
...@@ -23,6 +23,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -23,6 +23,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -324,12 +325,12 @@ public class CopyrightOwnerController extends BaseController { ...@@ -324,12 +325,12 @@ public class CopyrightOwnerController extends BaseController {
@ApiImplicitParam(name = "id", value = "标识ID", paramType = "path", dataType = "String") @ApiImplicitParam(name = "id", value = "标识ID", paramType = "path", dataType = "String")
}) })
@MethodLog(operModule = OperModule.DISPLAYCOPYRIGHT, operType = OperType.DELETE) @MethodLog(operModule = OperModule.DISPLAYCOPYRIGHT, operType = OperType.DELETE)
@Transactional
public Map<String, Object> deleteCopyrightOwner(@PathVariable("id") String id) { public Map<String, Object> deleteCopyrightOwner(@PathVariable("id") String id) {
// 版权方有对应展板信息,则不能被删除 // 版权方有对应展板信息,则不能被删除
LambdaQueryWrapper<ExhibitionBoard> exhibitionBoardLambdaQueryWrapper1 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ExhibitionBoard> exhibitionBoardLambdaQueryWrapper1 = new LambdaQueryWrapper<>();
exhibitionBoardLambdaQueryWrapper1.eq(ExhibitionBoard::getBoardCopyrightOwnerId, id); exhibitionBoardLambdaQueryWrapper1.eq(ExhibitionBoard::getBoardCopyrightOwnerId, id);
exhibitionBoardLambdaQueryWrapper1.eq(ExhibitionBoard::getDeleted, false); List<ExhibitionBoard> list = this.exhibitionBoardService.list(exhibitionBoardLambdaQueryWrapper1);
List<ExhibitionBoard> list = this.exhibitionBoardService.list();
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
return getFailResult("该版权方有关联展板信息,无法删除"); return getFailResult("该版权方有关联展板信息,无法删除");
} }
......
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