From d23645e976981bc9b670eea1d469fe8a36be309c Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Wed, 17 Apr 2024 17:19:53 +0800 Subject: [PATCH] 55测试环境 --- src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java b/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java index 9f25ea0..fa64979 100644 --- a/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java @@ -260,6 +260,44 @@ return Result.ok(noticeInfoVo); } + @Override + public Result getFristNewNoticeList(@Valid NewNoticePageDto newNoticePageDto) { + List<NewNoticeInfoVo> arrayList = new ArrayList<>(); + Page<HelpCenterNoticeEntity> page = new Page<>(1, 5); + //获取【帮助中心公告】 + HelpCenterNoticeEntity helpCenterNoticeEntity = new HelpCenterNoticeEntity(); + IPage<HelpCenterNoticeEntity> HelpCenterNoticeEntitys = helpCenterNoticeDao.getNewNoticeList(page, helpCenterNoticeEntity); + List<HelpCenterNoticeEntity> records = HelpCenterNoticeEntitys.getRecords(); + if(CollUtil.isNotEmpty(records)) { + for(HelpCenterNoticeEntity helpCenterNotice : records) { + NewNoticeInfoVo newNoticeInfoVo = new NewNoticeInfoVo(); + Long id = helpCenterNotice.getId(); + newNoticeInfoVo.setId(id); + String createBy = helpCenterNotice.getCreateBy(); + newNoticeInfoVo.setCreateBy(createBy); + Date createTime = helpCenterNotice.getCreateTime(); + newNoticeInfoVo.setCreateTime(createTime); + int articleNotice = helpCenterNotice.getArticleNotice(); + newNoticeInfoVo.setArticleNotice(articleNotice); + + int type = newNoticePageDto.getType(); + if(type == 2) { + Long articleIdUs = helpCenterNotice.getArticleIdUs(); + newNoticeInfoVo.setArticleId(articleIdUs); + String articleTitleUs = helpCenterNotice.getArticleTitleUs(); + newNoticeInfoVo.setArticleTitle(articleTitleUs); + }else { + Long articleId = helpCenterNotice.getArticleId(); + newNoticeInfoVo.setArticleId(articleId); + String articleTitle = helpCenterNotice.getArticleTitle(); + newNoticeInfoVo.setArticleTitle(articleTitle); + } + arrayList.add(newNoticeInfoVo); + } + } + return Result.ok(arrayList); + } + -- Gitblit v1.9.1