Commit c5d03e45 authored by liqin's avatar liqin 💬

bug fixed

parent 3e3a1156
......@@ -158,7 +158,7 @@ public class CopyrightOwnerController extends BaseController {
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "ownerType", value = "版权方类型", paramType = "query", dataType = "String", required = true),
@ApiImplicitParam(name = "ownerType", value = "版权方类型", paramType = "query", dataType = "String", required = true, allowableValues = "ASSET, EXHIBITION_BOARD"),
@ApiImplicitParam(name = "nameOrCode", value = "名称或编码", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startDate", value = "创建时间-开始", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", value = "创建时间-结束", paramType = "query", dataType = "String")
......@@ -193,19 +193,23 @@ public class CopyrightOwnerController extends BaseController {
for (CopyrightOwner copyrightOwner : page.getRecords()) {
if (CopyrightOwnerTypeEnum.ASSET.name().equals(genericPageParam.getOwnerType())) {
List<CopyrightOwnerAssetType> CopyrightOwnerAssetTypeList = this.copyrightOwnerAssetTypeService.list(Wrappers.<CopyrightOwnerAssetType>lambdaQuery().eq(CopyrightOwnerAssetType::getCopyrightOwnerId, copyrightOwner.getId()));
if (!CopyrightOwnerAssetTypeList.isEmpty()) {
Set<String> idList = CopyrightOwnerAssetTypeList.stream().map(CopyrightOwnerAssetType::getAssetTypeId).collect(Collectors.toSet());
List<AssetType> assetTypeList = this.assetTypeService.listByIds(idList);
String assetTypeNameList = assetTypeList.stream().map(AssetType::getName).collect(Collectors.joining("、"));
copyrightOwner.setAssetTypeNames(assetTypeNameList);
}
} else if (CopyrightOwnerTypeEnum.EXHIBITION_BOARD.name().equals(genericPageParam.getOwnerType())) {
LambdaQueryWrapper<ExhibitionBoard> lambdaQueryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().eq(ExhibitionBoard::getBoardCopyrightOwnerId, copyrightOwner.getId());
List<ExhibitionBoard> exhibitionBoardList = this.exhibitionBoardService.list(lambdaQueryWrapper);
if (!exhibitionBoardList.isEmpty()) {
Set<String> assetTypeIdList = exhibitionBoardList.stream().map(ExhibitionBoard::getAssetTypeId).collect(Collectors.toSet());
List<AssetType> assetTypeList = this.assetTypeService.listByIds(assetTypeIdList);
String assetTypeNames = assetTypeList.stream().map(AssetType::getName).collect(Collectors.joining("、"));
copyrightOwner.setAssetTypeNames(assetTypeNames);
}
}
}
return getResult(page);
}
......
......@@ -20,7 +20,7 @@ mybatis-plus.configuration.map-underscore-to-camel-case=true
mybatis-plus.configuration.cache-enabled=false
mybatis-plus.configuration.call-setters-on-nulls=true
mybatis-plus.configuration.jdbc-type-for-null=null
mybatis-plus.configuration.log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
########################################################
###FastDFS
......
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