移动端首页通知
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ public class SysMessageNoticeAppController extends JeecgController<SysMessageNot
|
||||
*/
|
||||
@Operation(summary = "消息通知-分页列表查询", description = "消息通知-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SysMessageNoticeVO>> queryPageList(SysMessageNoticeQuery query,
|
||||
public Result<List<SysMessageNotice>> queryPageList(SysMessageNoticeQuery query,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<SysMessageNotice> page = new Page<>(pageNo, pageSize);
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public interface ISysMessageNoticeService extends IService<SysMessageNotice> {
|
||||
* @param page 分页参数
|
||||
* @return 列表结果
|
||||
*/
|
||||
List<SysMessageNoticeVO> queryPageAppList(SysMessageNoticeQuery query, Page<SysMessageNotice> page);
|
||||
List<SysMessageNotice> queryPageAppList(SysMessageNoticeQuery query, Page<SysMessageNotice> page);
|
||||
|
||||
/**
|
||||
* 添加消息通知
|
||||
|
||||
+6
-8
@@ -64,14 +64,10 @@ public class SysMessageNoticeServiceImpl extends ServiceImpl<SysMessageNoticeMap
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysMessageNoticeVO> queryPageAppList(SysMessageNoticeQuery query, Page<SysMessageNotice> page) {
|
||||
public List<SysMessageNotice> queryPageAppList(SysMessageNoticeQuery query, Page<SysMessageNotice> page) {
|
||||
LambdaQueryWrapper<SysMessageNotice> wrapper = new LambdaQueryWrapper<>();
|
||||
setQueryData(query, wrapper, NoticeConstants.QUERY_SOURCE_APP);
|
||||
Page<SysMessageNotice> resultPage = this.page(page, wrapper);
|
||||
if (CollUtil.isEmpty(resultPage.getRecords())) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return setResultData(resultPage.getRecords());
|
||||
return this.page(page, wrapper).getRecords();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,8 +156,10 @@ public class SysMessageNoticeServiceImpl extends ServiceImpl<SysMessageNoticeMap
|
||||
private void setQueryData(SysMessageNoticeQuery query, LambdaQueryWrapper<SysMessageNotice> wrapper, Integer source) {
|
||||
// 设置权限过滤
|
||||
applyPermissionFilter(wrapper, source);
|
||||
// 设置查询条件
|
||||
applyQueryConditions(query, wrapper);
|
||||
if (NoticeConstants.QUERY_SOURCE_ADMIN.equals(source)) {
|
||||
// 设置查询条件
|
||||
applyQueryConditions(query, wrapper);
|
||||
}
|
||||
// 设置排序
|
||||
wrapper.orderByDesc(SysMessageNotice::getCreateTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user