|
|
|
@ -48,6 +48,8 @@ import org.springblade.desk.feign.INoticeClient; |
|
|
|
import org.springblade.desk.notice.service.INoticeService; |
|
|
|
import org.springblade.desk.notice.service.INoticeService; |
|
|
|
import org.springblade.desk.pojo.vo.NoticeVO; |
|
|
|
import org.springblade.desk.pojo.vo.NoticeVO; |
|
|
|
import org.springblade.desk.notice.wrapper.NoticeWrapper; |
|
|
|
import org.springblade.desk.notice.wrapper.NoticeWrapper; |
|
|
|
|
|
|
|
import org.springblade.system.cache.DictCache; |
|
|
|
|
|
|
|
import org.springblade.system.pojo.enums.DictEnum; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
@ -91,8 +93,12 @@ public class NoticeController extends BladeController { |
|
|
|
@Operation(summary = "分页", description = "传入notice") |
|
|
|
@Operation(summary = "分页", description = "传入notice") |
|
|
|
public R<IPage<NoticeVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> notice, Query query) { |
|
|
|
public R<IPage<NoticeVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> notice, Query query) { |
|
|
|
NoticeWrapper.build().noticeQuery(notice); |
|
|
|
NoticeWrapper.build().noticeQuery(notice); |
|
|
|
IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class)); |
|
|
|
IPage<NoticeVO> pages = noticeService.selectPageEw(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class)); |
|
|
|
return R.data(NoticeWrapper.build().pageVO(pages)); |
|
|
|
for (NoticeVO noticeVO : pages.getRecords()) { |
|
|
|
|
|
|
|
String dictValue = DictCache.getValue(DictEnum.NOTICE, noticeVO.getCategory()); |
|
|
|
|
|
|
|
noticeVO.setCategoryName(dictValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return R.data(pages); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|