Browse Source

代码测试

gao.qiang 10 months ago
parent
commit
7eda0c374a

+ 1 - 0
business-service/src/main/java/com/ozs/service/service/MsgAlarmService.java

@@ -53,5 +53,6 @@ public interface MsgAlarmService extends IService<MsgAlarm> {
     List<MsgAlarm> queryAlarmInfoByAfterTenMinute();
 
     IPage<MsgAlarm> queryPageHome(MsgAlarmVo msgAlarmVo); 
+    
     List<BaseCameraManagement> getBaseCameraManagementsByLockedMsgAlarms(Integer isLock);
 }

+ 13 - 10
business-service/src/main/java/com/ozs/service/service/impl/MsgAlarmServiceImpl.java

@@ -143,6 +143,19 @@ public class MsgAlarmServiceImpl extends ServiceImpl<MsgAlarmMapper, MsgAlarm> i
         return msgAlarmMapper.queryAlarmInfoByAfterTenMinute();
     }
 
+    @Override
+    public IPage<MsgAlarm> queryPageHome(MsgAlarmVo msgAlarmVo) {
+        int pageNum = Integer.parseInt(msgAlarmVo.getPageNum().toString());
+        int pageSize = Integer.parseInt(msgAlarmVo.getPageSize().toString());
+        com.github.pagehelper.Page<MsgAlarm> page = PageHelper.startPage(pageNum, pageSize)
+                .doSelectPage(() -> msgAlarmMapper.selectMsgAlarmListHome(msgAlarmVo));
+        com.baomidou.mybatisplus.extension.plugins.pagination.Page<MsgAlarm> pageR =
+                new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(pageNum, pageSize);
+        pageR.setRecords(page.getResult());
+        pageR.setTotal(page.getTotal());
+        return pageR;
+    }
+
     @Override
     public List<BaseCameraManagement> getBaseCameraManagementsByLockedMsgAlarms(Integer isLock) {
         // 查询MsgAlarm中isLock=的数据
@@ -156,15 +169,5 @@ public class MsgAlarmServiceImpl extends ServiceImpl<MsgAlarmMapper, MsgAlarm> i
         QueryWrapper<BaseCameraManagement> queryWrapper = new QueryWrapper<>();
         queryWrapper.in("camera_code", cameraCodeList);
         return baseCameraManagementMapper.selectList(queryWrapper);
-    public IPage<MsgAlarm> queryPageHome(MsgAlarmVo msgAlarmVo) { 
-        int pageNum = Integer.parseInt(msgAlarmVo.getPageNum().toString());
-        int pageSize = Integer.parseInt(msgAlarmVo.getPageSize().toString());
-        com.github.pagehelper.Page<MsgAlarm> page = PageHelper.startPage(pageNum, pageSize)
-                .doSelectPage(() -> msgAlarmMapper.selectMsgAlarmListHome(msgAlarmVo));
-        com.baomidou.mybatisplus.extension.plugins.pagination.Page<MsgAlarm> pageR =
-                new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(pageNum, pageSize);
-        pageR.setRecords(page.getResult());
-        pageR.setTotal(page.getTotal());
-        return pageR;
     }
 }