| | |
| | | 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);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|