From 24e42fe9322fe1d9be3df18dc206f5bb80ca0437 Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Tue, 25 Apr 2023 09:54:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E8=B4=A8=E9=87=8F-=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E5=B0=8F=E8=AF=BE=E5=A0=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HighQualityClientController.java | 12 ++++++--- .../impl/HighQualityStyleServiceImpl.java | 26 +++++++------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/controller/HighQualityClientController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/controller/HighQualityClientController.java index 0371f35..8445c15 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/controller/HighQualityClientController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/controller/HighQualityClientController.java @@ -52,7 +52,7 @@ public class HighQualityClientController { @ApiOperation("活动风采轮播列表") @GetMapping("/eventStyle/banner") public BaseResponse> getHighQualityStyleBanner() { - return BaseResponse.success(highQualityStyleService.getHighQualityStyle("banner",null)); + return BaseResponse.success(highQualityStyleService.getHighQualityStyle("1",null)); } @ApiOperation("活动联系人列表-按公司分组") @@ -74,10 +74,16 @@ public class HighQualityClientController { } - @ApiOperation("活动风采列表") + @ApiOperation("工作风采") @PostMapping("/eventStyle/list") public BaseResponse> getHighQualityStyleList(@RequestBody(required = false) HighQualityQueryInVO inVO) { - return BaseResponse.success(highQualityStyleService.getHighQualityStyle("list", inVO)); + return BaseResponse.success(highQualityStyleService.getHighQualityStyle("2", inVO)); + } + + @ApiOperation("运营提升小课堂") + @PostMapping("/eventStyle/classlist") + public BaseResponse> getHighQualityClassList(@RequestBody(required = false) HighQualityQueryInVO inVO) { + return BaseResponse.success(highQualityStyleService.getHighQualityStyle("4", inVO)); } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/service/impl/HighQualityStyleServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/service/impl/HighQualityStyleServiceImpl.java index 7701dc0..ec2f220 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/service/impl/HighQualityStyleServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/highquality/service/impl/HighQualityStyleServiceImpl.java @@ -42,9 +42,6 @@ public class HighQualityStyleServiceImpl extends ServiceImpl getHighQualityStyle(String type, HighQualityQueryInVO inVO) { @@ -54,20 +51,17 @@ public class HighQualityStyleServiceImpl extends ServiceImpl list; - if ("banner".equals(type)) { - query.eq(HighQualityStyle::getCategory, "1").eq(HighQualityStyle::getStatus, "1").orderByAsc(HighQualityStyle::getSort); - } else { - query.eq(HighQualityStyle::getCategory, "2").eq(HighQualityStyle::getStatus, "1").orderByAsc(HighQualityStyle::getSort); - } - query.ne(HighQualityStyle::getDeleteFlag, "1"); + query.eq(HighQualityStyle::getCategory, type); + query.ne(HighQualityStyle::getDeleteFlag, "1").eq(HighQualityStyle::getStatus, "1").orderByAsc(HighQualityStyle::getSort); list = this.list(query); - List imageIdList = list.stream().map(HighQualityStyle::getImage).filter(StrUtil::isNotBlank).distinct().collect(Collectors.toList()); - BaseResponse> queryReturn = documentCenterService.queryReturn(imageIdList); - log.info("文档中心返回:{}", queryReturn.toString()); - HighQualityExceptionEnum.FRAME_EXCEPTION_NO_IMAGE_INFO_FAIL.customValid(!queryReturn.isSuccess()); - Map collect = queryReturn.getData().stream().collect(Collectors.toMap(DocumentDataVO::getObjectId, Function.identity(),(o1,o2) -> o1)); - - list.forEach(l -> l.setFilePath(collect.get(l.getImage()) == null ? "" : collect.get(l.getImage()).getFilePath())); + if(!type.equals("4")){ + List imageIdList = list.stream().map(HighQualityStyle::getImage).filter(StrUtil::isNotBlank).distinct().collect(Collectors.toList()); + BaseResponse> queryReturn = documentCenterService.queryReturn(imageIdList); + log.info("文档中心返回:{}", queryReturn.toString()); + HighQualityExceptionEnum.FRAME_EXCEPTION_NO_IMAGE_INFO_FAIL.customValid(!queryReturn.isSuccess()); + Map collect = queryReturn.getData().stream().collect(Collectors.toMap(DocumentDataVO::getObjectId, Function.identity(),(o1,o2) -> o1)); + list.forEach(l -> l.setFilePath(collect.get(l.getImage()) == null ? "" : collect.get(l.getImage()).getFilePath())); + } return list; }