|
@@ -1,8 +1,12 @@
|
|
|
package com.ozs.service.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.github.pagehelper.Page;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
import com.ozs.common.utils.StringUtils;
|
|
|
+import com.ozs.service.entity.MsgAlarm;
|
|
|
import com.ozs.service.entity.MsgAppPush;
|
|
|
import com.ozs.service.entity.vo.MsgAppPushVo;
|
|
|
import com.ozs.service.mapper.MsgAppPushMapper;
|
|
@@ -23,9 +27,16 @@ public class MsgAppPushServiceImpl extends ServiceImpl<MsgAppPushMapper, MsgAppP
|
|
|
MsgAppPushMapper msgAppPushMapper;
|
|
|
|
|
|
@Override
|
|
|
- public List<MsgAppPushVo> alarmPushMsg(Integer status) {
|
|
|
- List<MsgAppPushVo> list = msgAppPushMapper.alarmPushMsg(status);
|
|
|
- return list;
|
|
|
+ public IPage<MsgAppPushVo> alarmPushMsg(MsgAppPushVo msgAppPushVo) {
|
|
|
+ // List<MsgAppPushVo> list = msgAppPushMapper.alarmPushMsg(status);
|
|
|
+ Page<MsgAppPushVo> page = PageHelper.startPage(msgAppPushVo.getPageNum().intValue(), msgAppPushVo.getPageSize().intValue())
|
|
|
+ .doSelectPage(() -> msgAppPushMapper.alarmPushMsg(msgAppPushVo));
|
|
|
+ com.baomidou.mybatisplus.extension.plugins.pagination.Page<MsgAppPushVo> pageR =
|
|
|
+ new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(msgAppPushVo.getPageNum().intValue(), msgAppPushVo.getPageSize().intValue());
|
|
|
+ pageR.setSize(page.size());
|
|
|
+ pageR.setTotal(page.getTotal());
|
|
|
+ pageR.setRecords(page.getResult());
|
|
|
+ return pageR;
|
|
|
}
|
|
|
|
|
|
@Override
|