From 77fb65d631842ad6d976b32380efdfb89e511cba Mon Sep 17 00:00:00 2001 From: HuangHuiKang Date: Wed, 11 Feb 2026 14:52:12 +0800 Subject: [PATCH] =?UTF-8?q?perf:=E5=87=8F=E5=B0=91=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mqtt/consumer/impl/MqttserviceImpl.java | 2 ++ .../ViewReportUserDateSummary.java | 5 ++++ .../task/ViewTaskProductSummary.java | 6 ++++ .../workreportplan/ReportPlanSummaryDO.java | 5 ++++ yudao-server/pom.xml | 30 +++++++++---------- .../src/main/resources/application-dev.yaml | 4 +-- 6 files changed, 35 insertions(+), 17 deletions(-) diff --git a/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/framework/mqtt/consumer/impl/MqttserviceImpl.java b/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/framework/mqtt/consumer/impl/MqttserviceImpl.java index 52a7cb0de..a59c600cb 100644 --- a/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/framework/mqtt/consumer/impl/MqttserviceImpl.java +++ b/yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/framework/mqtt/consumer/impl/MqttserviceImpl.java @@ -17,6 +17,7 @@ import org.eclipse.paho.client.mqttv3.MqttException; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.annotation.DependsOn; +import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.stereotype.Service; @@ -27,6 +28,7 @@ import java.util.List; @EnableScheduling @DependsOn("defaultMqttStarter") @Slf4j +@Lazy public class MqttserviceImpl implements IMqttservice, ApplicationListener { @Resource diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/producereport/ViewReportUserDateSummary.java b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/producereport/ViewReportUserDateSummary.java index 8b55616e0..bdafd49bc 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/producereport/ViewReportUserDateSummary.java +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/producereport/ViewReportUserDateSummary.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.mes.dal.dataobject.producereport; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -20,6 +22,9 @@ import java.math.BigDecimal; @AllArgsConstructor public class ViewReportUserDateSummary { + @TableId(type = IdType.NONE) + private String id; + /** * 工人 */ diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/task/ViewTaskProductSummary.java b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/task/ViewTaskProductSummary.java index fc132fc3d..4fbbc1adf 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/task/ViewTaskProductSummary.java +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/task/ViewTaskProductSummary.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.mes.dal.dataobject.task; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -17,6 +19,10 @@ import lombok.*; @NoArgsConstructor @AllArgsConstructor public class ViewTaskProductSummary { + + @TableId(type = IdType.NONE) // 告诉 MyBatis-Plus 这个类没有主键 + private Long id; + /** * 产品ID */ diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/workreportplan/ReportPlanSummaryDO.java b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/workreportplan/ReportPlanSummaryDO.java index 0886e7291..6bc42d5ea 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/workreportplan/ReportPlanSummaryDO.java +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/workreportplan/ReportPlanSummaryDO.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.mes.dal.dataobject.workreportplan; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -20,6 +22,9 @@ import java.math.BigDecimal; @AllArgsConstructor public class ReportPlanSummaryDO { + @TableId(type = IdType.NONE) + private String id; + /** * 计划id */ diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index b6e9cf6d3..09bcd1d96 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -40,17 +40,17 @@ - - cn.iocoder.boot - yudao-module-report-biz - ${revision} - + + + + + - - cn.iocoder.boot - yudao-module-bpm-biz - ${revision} - + + + + + @@ -88,11 +88,11 @@ - - cn.iocoder.boot - yudao-module-crm-biz - ${revision} - + + + + + diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index 2a474db52..a4d9602d6 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -67,7 +67,7 @@ spring: max-wait: 30000 # 缩短等待时间 time-between-eviction-runs-millis: 60000 min-evictable-idle-time-millis: 300000 - validation-query: SELECT SERVER_STATUS() + validation-query: SELECT 1 test-while-idle: true test-on-borrow: false test-on-return: false @@ -272,5 +272,5 @@ emqx: password: admin # 密码 clean-session: true # 是否清空 session reconnect: true # 是否自动断线重连 - timeout: 30 # 连接超时时间(秒) + timeout: 5 # 连接超时时间(秒) keep-alive: 60 # 心跳间隔(秒) \ No newline at end of file