From 3c480d92f0a6b6737a85e97bd8c5209c2a3d3f7b Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Wed, 27 Aug 2025 17:58:28 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=B0=B4?= =?UTF-8?q?=E7=94=B5=E6=8A=84=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../consumer/MeterRecordConsumer.java | 2 +- .../impl/CustomerFeedbacksServiceImpl.java | 8 +- .../sis/controller/SisVisitorController.java | 85 +++++++++++++++++++ .../src/main/resources/application.properties | 4 +- 4 files changed, 92 insertions(+), 7 deletions(-) create mode 100644 ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/rocketmq/consumer/MeterRecordConsumer.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/rocketmq/consumer/MeterRecordConsumer.java index 75aa5189..ed0b801b 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/rocketmq/consumer/MeterRecordConsumer.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/rocketmq/consumer/MeterRecordConsumer.java @@ -21,7 +21,7 @@ import java.util.Arrays; @RequiredArgsConstructor @RocketMQMessageListener( topic = RocketMqConstants.TOPIC, - consumerGroup = RocketMqConstants.GROUP, + consumerGroup = RocketMqConstants.METER_GROUP, selectorExpression = RocketMqConstants.METER_RECORD ) public class MeterRecordConsumer implements RocketMQListener { diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java index 56b18650..82bc8d29 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java @@ -67,8 +67,8 @@ public class CustomerFeedbacksServiceImpl implements ICustomerFeedbacksService { public CustomerFeedbacksVo queryById(Long id) { CustomerFeedbacksVo customerFeedbacksVo = baseMapper.selectVoById(id); ServiceWorkOrdersType serviceWorkOrdersType = serviceWorkOrdersTypeMapper.selectById(customerFeedbacksVo.getFeedbackType()); - customerFeedbacksVo.setFeedbackTypeName(StringUtils.isNotBlank(serviceWorkOrdersType.getOrderTypeName()) ? serviceWorkOrdersType.getOrderTypeName() : null); - String nikName = remoteUserService.selectNicknameById(customerFeedbacksVo.getFeedbackPersion()); + customerFeedbacksVo.setFeedbackTypeName(ObjectUtil.isNotEmpty(serviceWorkOrdersType) ? serviceWorkOrdersType.getOrderTypeName() : null); + String nikName = remoteUserService.selectNicknameById(ObjectUtil.isNotEmpty(customerFeedbacksVo) ?customerFeedbacksVo.getFeedbackPersion():null); customerFeedbacksVo.setFeedbackPersionName(nikName); return customerFeedbacksVo; } @@ -115,11 +115,11 @@ public class CustomerFeedbacksServiceImpl implements ICustomerFeedbacksService { if (CollUtil.isNotEmpty(remoteUserVos)) { RemoteUserVo remoteUserVo = remoteUserVos.stream() .filter(vo -> vo.getUserId() != null && vo.getUserId().equals(customerFeedbacksVo.getFeedbackPersion())).findFirst().orElse(null); - customerFeedbacksVo.setFeedbackPersionName(ObjectUtil.isNotNull(remoteUserVo) ? remoteUserVo.getNickName() : null); + customerFeedbacksVo.setFeedbackPersionName(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getNickName() : null); } if (CollUtil.isNotEmpty(serviceWorkOrdersTypes)) { ServiceWorkOrdersType serviceWorkOrdersType = serviceWorkOrdersTypes.stream().filter(vo -> vo.getId() != null && vo.getId().equals(customerFeedbacksVo.getFeedbackType())).findFirst().orElse(null); - customerFeedbacksVo.setFeedbackTypeName(ObjectUtil.isNotNull(serviceWorkOrdersType) ? serviceWorkOrdersType.getOrderTypeName() : null); + customerFeedbacksVo.setFeedbackTypeName(ObjectUtil.isNotEmpty(serviceWorkOrdersType) ? serviceWorkOrdersType.getOrderTypeName() : null); } } diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java new file mode 100644 index 00000000..6b7168a7 --- /dev/null +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java @@ -0,0 +1,85 @@ +package org.dromara.sis.controller; + + +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.date.DateField; +import cn.hutool.core.date.DateUtil; +import lombok.RequiredArgsConstructor; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.sis.domain.bo.SisPersonLibImgBo; +import org.dromara.sis.domain.vo.SisPersonLibImgVo; +import org.dromara.sis.sdk.e8.E8PlatformApi; +import org.dromara.sis.sdk.e8.domain.QueryDto; +import org.dromara.sis.sdk.e8.domain.accessControl.req.AccessRecordFindReq; +import org.dromara.sis.sdk.e8.domain.accessControl.res.AccessRecordFindRes; +import org.dromara.sis.service.ISisPersonLibImgService; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @author yuyongle + * @version 1.0 + * @description: + * @date 2025/8/27 15:57 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/visitor") +public class SisVisitorController { + private final E8PlatformApi e8PlatformApi; + + /** + * 查询人员通行记录 + */ + @GetMapping("/list") + public TableDataInfo list(QueryDto dto) { + + TableDataInfo tableDataInfo = new TableDataInfo(); + List accessRecordFindResList = new ArrayList<>(); + AccessRecordFindRes accessRecordFindRes = new AccessRecordFindRes(); + accessRecordFindRes.setDeviceName("4#岗亭09"); + accessRecordFindRes.setDoorName("4#岗亭09"); + accessRecordFindRes.setDeviceType(1102); + accessRecordFindRes.setReaderName(""); + accessRecordFindRes.setGatewayType(1); + accessRecordFindRes.setCustomerName("德隆吴鹏"); + accessRecordFindRes.setOrganFullPath("主楼11楼"); + accessRecordFindRes.setPictureUrl("https://bpic.588ku.com/back_list_pic/23/04/21/ef5e2a3dd5cfc336fdcf2fd000474f0f.jpg"); + accessRecordFindRes.setCardType(34); + accessRecordFindRes.setRecordType(2); + accessRecordFindRes.setActionTime(new Date()); + accessRecordFindResList.add(accessRecordFindRes); + tableDataInfo.setRows(accessRecordFindResList); + tableDataInfo.setTotal(1); + tableDataInfo.setCode(200); + return tableDataInfo; + +// dto.setPageIndex(1); +// dto.setMaxResultCount(20); +// +// // 10秒内 +// String starTime = DateUtil.format(DateUtil.offset(new Date(), DateField.SECOND, -10), "yyyy-MM-dd HH:mm:ss"); +// String endTime = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); +// +// AccessRecordFindReq lift = new AccessRecordFindReq(); +// lift.setStartTime(starTime); +// lift.setEndTime(endTime); +// lift.setRecordType(2); +// // 9号电梯 +// lift.setDeviceId(550757939925061L); +// dto.setQueryDto(lift); +//// TableDataInfo nineLiftList = e8PlatformApi.getPageAccessRecordList(dto); +// TableDataInfo pageAccessRecordList = new TableDataInfo(); +// +// return e8PlatformApi.getPageAccessRecordList(dto); + //如果pageAccessRecordList报错就捕获并封装 + } +} diff --git a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties index 40aba4ad..4385908f 100644 --- a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties +++ b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties @@ -40,9 +40,9 @@ spring.sql.init.platform=mysql db.num=1 ### Connect URL of DB: -db.url.0=jdbc:mysql://192.168.159.129:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true +db.url.0=jdbc:mysql://113.249.101.254:18000/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true db.user.0=root -db.password.0=123456 +db.password.0=by@2025?? ### the maximum retry times for push nacos.config.push.maxRetryTime=50 From 3c8eb59165f770a7cd1b36ada535a23ab8ab3d75 Mon Sep 17 00:00:00 2001 From: lxj <15683799673@163.com> Date: Wed, 27 Aug 2025 17:59:56 +0800 Subject: [PATCH 2/5] =?UTF-8?q?rocketmq=E6=B6=88=E8=B4=B9=E8=80=85?= =?UTF-8?q?=E7=BB=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/dromara/sis/rocketmq/RocketMqConstants.java | 6 ++++-- .../dromara/sis/rocketmq/consumer/FaceCaptureConsumer.java | 2 +- .../dromara/sis/rocketmq/consumer/FaceCompareConsumer.java | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/RocketMqConstants.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/RocketMqConstants.java index d40423a5..1cfafe7a 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/RocketMqConstants.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/RocketMqConstants.java @@ -9,8 +9,10 @@ public interface RocketMqConstants { // mq topic String TOPIC = "SmartParks"; - // mq GROUP - String GROUP = "SmartParksEqp"; + // 人比比对消费者组 + String COMPAREGROUP = "SmartParks-compare"; + // 人脸抓拍消费者组 + String CAPTUREGROUP = "SmartParks-capture"; /*-----------------------------------消息tag------------------------------------*/ String HIKADD = "ADD_HIK_DEVICE_TAG"; diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCaptureConsumer.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCaptureConsumer.java index 13f68f6c..6e25325c 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCaptureConsumer.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCaptureConsumer.java @@ -22,7 +22,7 @@ import org.springframework.stereotype.Component; @RequiredArgsConstructor @RocketMQMessageListener( topic = RocketMqConstants.TOPIC, - consumerGroup = RocketMqConstants.GROUP, + consumerGroup = RocketMqConstants.CAPTUREGROUP, selectorExpression = RocketMqConstants.FACECAPTURE ) public class FaceCaptureConsumer implements RocketMQListener { diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCompareConsumer.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCompareConsumer.java index c67ce6ac..95b348dd 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCompareConsumer.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCompareConsumer.java @@ -21,7 +21,7 @@ import org.springframework.stereotype.Component; @RequiredArgsConstructor @RocketMQMessageListener( topic = RocketMqConstants.TOPIC, - consumerGroup = RocketMqConstants.GROUP, + consumerGroup = RocketMqConstants.COMPAREGROUP, selectorExpression = RocketMqConstants.FACECOMPARE ) public class FaceCompareConsumer implements RocketMQListener { @@ -32,7 +32,7 @@ public class FaceCompareConsumer implements RocketMQListener { log.info("消费人脸比对数据,数据长度={}", ext.getBody().length); try { FaceCompare compare = JSONObject.parseObject(ext.getBody(), FaceCompare.class); - + } catch (Exception e) { log.error("消费比对抓拍数据处理失败,", e); } From 6133d7761da7087472757616418fe98df3eeb436 Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Wed, 27 Aug 2025 18:03:49 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=B0=B4?= =?UTF-8?q?=E7=94=B5=E6=8A=84=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sis/controller/SisVisitorController.java | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java index 6b7168a7..607120f0 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java @@ -42,44 +42,44 @@ public class SisVisitorController { @GetMapping("/list") public TableDataInfo list(QueryDto dto) { - TableDataInfo tableDataInfo = new TableDataInfo(); - List accessRecordFindResList = new ArrayList<>(); - AccessRecordFindRes accessRecordFindRes = new AccessRecordFindRes(); - accessRecordFindRes.setDeviceName("4#岗亭09"); - accessRecordFindRes.setDoorName("4#岗亭09"); - accessRecordFindRes.setDeviceType(1102); - accessRecordFindRes.setReaderName(""); - accessRecordFindRes.setGatewayType(1); - accessRecordFindRes.setCustomerName("德隆吴鹏"); - accessRecordFindRes.setOrganFullPath("主楼11楼"); - accessRecordFindRes.setPictureUrl("https://bpic.588ku.com/back_list_pic/23/04/21/ef5e2a3dd5cfc336fdcf2fd000474f0f.jpg"); - accessRecordFindRes.setCardType(34); - accessRecordFindRes.setRecordType(2); - accessRecordFindRes.setActionTime(new Date()); - accessRecordFindResList.add(accessRecordFindRes); - tableDataInfo.setRows(accessRecordFindResList); - tableDataInfo.setTotal(1); - tableDataInfo.setCode(200); - return tableDataInfo; +// TableDataInfo tableDataInfo = new TableDataInfo(); +// List accessRecordFindResList = new ArrayList<>(); +// AccessRecordFindRes accessRecordFindRes = new AccessRecordFindRes(); +// accessRecordFindRes.setDeviceName("4#岗亭09"); +// accessRecordFindRes.setDoorName("4#岗亭09"); +// accessRecordFindRes.setDeviceType(1102); +// accessRecordFindRes.setReaderName(""); +// accessRecordFindRes.setGatewayType(1); +// accessRecordFindRes.setCustomerName("德隆吴鹏"); +// accessRecordFindRes.setOrganFullPath("主楼11楼"); +// accessRecordFindRes.setPictureUrl("https://bpic.588ku.com/back_list_pic/23/04/21/ef5e2a3dd5cfc336fdcf2fd000474f0f.jpg"); +// accessRecordFindRes.setCardType(34); +// accessRecordFindRes.setRecordType(2); +// accessRecordFindRes.setActionTime(new Date()); +// accessRecordFindResList.add(accessRecordFindRes); +// tableDataInfo.setRows(accessRecordFindResList); +// tableDataInfo.setTotal(1); +// tableDataInfo.setCode(200); +// return tableDataInfo; -// dto.setPageIndex(1); -// dto.setMaxResultCount(20); -// -// // 10秒内 -// String starTime = DateUtil.format(DateUtil.offset(new Date(), DateField.SECOND, -10), "yyyy-MM-dd HH:mm:ss"); -// String endTime = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); -// -// AccessRecordFindReq lift = new AccessRecordFindReq(); -// lift.setStartTime(starTime); -// lift.setEndTime(endTime); -// lift.setRecordType(2); -// // 9号电梯 -// lift.setDeviceId(550757939925061L); -// dto.setQueryDto(lift); -//// TableDataInfo nineLiftList = e8PlatformApi.getPageAccessRecordList(dto); -// TableDataInfo pageAccessRecordList = new TableDataInfo(); -// -// return e8PlatformApi.getPageAccessRecordList(dto); + dto.setPageIndex(1); + dto.setMaxResultCount(20); + + // 10秒内 + String starTime = DateUtil.format(DateUtil.offset(new Date(), DateField.SECOND, -10), "yyyy-MM-dd HH:mm:ss"); + String endTime = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); + + AccessRecordFindReq lift = new AccessRecordFindReq(); + lift.setStartTime(starTime); + lift.setEndTime(endTime); + lift.setRecordType(2); + // 9号电梯 + lift.setDeviceId(550757939925061L); + dto.setQueryDto(lift); +// TableDataInfo nineLiftList = e8PlatformApi.getPageAccessRecordList(dto); + TableDataInfo pageAccessRecordList = new TableDataInfo(); + + return e8PlatformApi.getPageAccessRecordList(dto); //如果pageAccessRecordList报错就捕获并封装 } } From 816b90e9e145f176e53ded5f0b9e7362a6dde029 Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Wed, 27 Aug 2025 18:07:27 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=B0=B4?= =?UTF-8?q?=E7=94=B5=E6=8A=84=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sis/controller/SisVisitorController.java | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java index 607120f0..c0ce0a21 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java @@ -42,44 +42,44 @@ public class SisVisitorController { @GetMapping("/list") public TableDataInfo list(QueryDto dto) { -// TableDataInfo tableDataInfo = new TableDataInfo(); -// List accessRecordFindResList = new ArrayList<>(); -// AccessRecordFindRes accessRecordFindRes = new AccessRecordFindRes(); -// accessRecordFindRes.setDeviceName("4#岗亭09"); -// accessRecordFindRes.setDoorName("4#岗亭09"); -// accessRecordFindRes.setDeviceType(1102); -// accessRecordFindRes.setReaderName(""); -// accessRecordFindRes.setGatewayType(1); -// accessRecordFindRes.setCustomerName("德隆吴鹏"); -// accessRecordFindRes.setOrganFullPath("主楼11楼"); -// accessRecordFindRes.setPictureUrl("https://bpic.588ku.com/back_list_pic/23/04/21/ef5e2a3dd5cfc336fdcf2fd000474f0f.jpg"); -// accessRecordFindRes.setCardType(34); -// accessRecordFindRes.setRecordType(2); -// accessRecordFindRes.setActionTime(new Date()); -// accessRecordFindResList.add(accessRecordFindRes); -// tableDataInfo.setRows(accessRecordFindResList); -// tableDataInfo.setTotal(1); -// tableDataInfo.setCode(200); -// return tableDataInfo; - - dto.setPageIndex(1); - dto.setMaxResultCount(20); - - // 10秒内 - String starTime = DateUtil.format(DateUtil.offset(new Date(), DateField.SECOND, -10), "yyyy-MM-dd HH:mm:ss"); - String endTime = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); - - AccessRecordFindReq lift = new AccessRecordFindReq(); - lift.setStartTime(starTime); - lift.setEndTime(endTime); - lift.setRecordType(2); - // 9号电梯 - lift.setDeviceId(550757939925061L); - dto.setQueryDto(lift); -// TableDataInfo nineLiftList = e8PlatformApi.getPageAccessRecordList(dto); - TableDataInfo pageAccessRecordList = new TableDataInfo(); - - return e8PlatformApi.getPageAccessRecordList(dto); + TableDataInfo tableDataInfo = new TableDataInfo(); + List accessRecordFindResList = new ArrayList<>(); + AccessRecordFindRes accessRecordFindRes = new AccessRecordFindRes(); + accessRecordFindRes.setDeviceName("4#岗亭09"); + accessRecordFindRes.setDoorName("4#岗亭09"); + accessRecordFindRes.setDeviceType(1102); + accessRecordFindRes.setReaderName(""); + accessRecordFindRes.setGatewayType(1); + accessRecordFindRes.setCustomerName("德隆吴鹏"); + accessRecordFindRes.setOrganFullPath("主楼11楼"); + accessRecordFindRes.setPictureUrl("https://bpic.588ku.com/back_list_pic/23/04/21/ef5e2a3dd5cfc336fdcf2fd000474f0f.jpg"); + accessRecordFindRes.setCardType(34); + accessRecordFindRes.setRecordType(2); + accessRecordFindRes.setActionTime(new Date()); + accessRecordFindResList.add(accessRecordFindRes); + tableDataInfo.setRows(accessRecordFindResList); + tableDataInfo.setTotal(1); + tableDataInfo.setCode(200); + return tableDataInfo; +// +// dto.setPageIndex(1); +// dto.setMaxResultCount(20); +// +// // 10秒内 +// String starTime = DateUtil.format(DateUtil.offset(new Date(), DateField.SECOND, -10), "yyyy-MM-dd HH:mm:ss"); +// String endTime = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); +// +// AccessRecordFindReq lift = new AccessRecordFindReq(); +// lift.setStartTime(starTime); +// lift.setEndTime(endTime); +// lift.setRecordType(2); +// // 9号电梯 +// lift.setDeviceId(550757939925061L); +// dto.setQueryDto(lift); +//// TableDataInfo nineLiftList = e8PlatformApi.getPageAccessRecordList(dto); +// TableDataInfo pageAccessRecordList = new TableDataInfo(); +// +// return e8PlatformApi.getPageAccessRecordList(dto); //如果pageAccessRecordList报错就捕获并封装 } } From 368eea91e89ef68b98861bd2c1a3677abb5df264 Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Wed, 27 Aug 2025 18:14:14 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=B0=B4?= =?UTF-8?q?=E7=94=B5=E6=8A=84=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../consumer/MeterRecordConsumer.java | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java index 8360613a..3a0a80d0 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java @@ -1,44 +1,44 @@ -package org.dromara.sis.rocketmq.consumer; - -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.rocketmq.common.message.MessageExt; -import org.apache.rocketmq.spring.annotation.RocketMQMessageListener; -import org.apache.rocketmq.spring.core.RocketMQListener; -import org.dromara.sis.rocketmq.RocketMqConstants; -import org.dromara.sis.rocketmq.producer.ProducerService; -import org.springframework.stereotype.Component; - -/** - * @author lsm - * @apiNote MeterRecordConsumer - * @since 2025/8/25 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@RocketMQMessageListener( - topic = RocketMqConstants.TOPIC, - consumerGroup = RocketMqConstants.METER_GROUP, - selectorExpression = RocketMqConstants.METER_RECORD, - nameServer = "${rocketmq.cluster1.name-server}" -) -public class MeterRecordConsumer implements RocketMQListener { - - private final ProducerService producerService; - - @Override - public void onMessage(MessageExt ext) { - try { - if (ext.getBody() == null) { - log.info("仪表上报消息数据,不转发!"); - } else { - producerService.defaultSend(RocketMqConstants.TOPIC, RocketMqConstants.METER_RECORD, new String(ext.getBody())); - log.info("转发仪表上报数据处理成功"); - } - } catch (Exception e) { - log.error("转发仪表上报数据处理失败,", e); - } - - } -} +//package org.dromara.sis.rocketmq.consumer; +// +//import lombok.RequiredArgsConstructor; +//import lombok.extern.slf4j.Slf4j; +//import org.apache.rocketmq.common.message.MessageExt; +//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener; +//import org.apache.rocketmq.spring.core.RocketMQListener; +//import org.dromara.sis.rocketmq.RocketMqConstants; +//import org.dromara.sis.rocketmq.producer.ProducerService; +//import org.springframework.stereotype.Component; +// +///** +// * @author lsm +// * @apiNote MeterRecordConsumer +// * @since 2025/8/25 +// */ +//@Slf4j +//@Component +//@RequiredArgsConstructor +//@RocketMQMessageListener( +// topic = RocketMqConstants.TOPIC, +// consumerGroup = RocketMqConstants.METER_GROUP, +// selectorExpression = RocketMqConstants.METER_RECORD, +// nameServer = "${rocketmq.cluster1.name-server}" +//) +//public class MeterRecordConsumer implements RocketMQListener { +// +// private final ProducerService producerService; +// +// @Override +// public void onMessage(MessageExt ext) { +// try { +// if (ext.getBody() == null) { +// log.info("仪表上报消息数据,不转发!"); +// } else { +// producerService.defaultSend(RocketMqConstants.TOPIC, RocketMqConstants.METER_RECORD, new String(ext.getBody())); +// log.info("转发仪表上报数据处理成功"); +// } +// } catch (Exception e) { +// log.error("转发仪表上报数据处理失败,", e); +// } +// +// } +//}