From bc05fe497ce3348019d2537c4f4fea412226674a Mon Sep 17 00:00:00 2001 From: "1351515658@qq.com" <1351515658@qq.com> Date: Wed, 29 Nov 2023 09:51:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=20BaseMapperX=E7=9A=84up?= =?UTF-8?q?date=E3=80=81insert=E6=96=B9=E6=B3=95=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/core/mapper/BaseMapperX.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java index 6a76024d5..44d544e02 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java @@ -121,8 +121,8 @@ public interface BaseMapperX extends MPJBaseMapper { * * @param entities 实体们 */ - default void insertBatch(Collection entities) { - Db.saveBatch(entities); + default Boolean insertBatch(Collection entities) { + return Db.saveBatch(entities); } /** @@ -131,28 +131,28 @@ public interface BaseMapperX extends MPJBaseMapper { * @param entities 实体们 * @param size 插入数量 Db.saveBatch 默认为 1000 */ - default void insertBatch(Collection entities, int size) { - Db.saveBatch(entities, size); + default Boolean insertBatch(Collection entities, int size) { + return Db.saveBatch(entities, size); } - default void updateBatch(T update) { - update(update, new QueryWrapper<>()); + default int updateBatch(T update) { + return update(update, new QueryWrapper<>()); } - default void updateBatch(Collection entities) { - Db.updateBatchById(entities); + default Boolean updateBatch(Collection entities) { + return Db.updateBatchById(entities); } - default void updateBatch(Collection entities, int size) { - Db.updateBatchById(entities, size); + default Boolean updateBatch(Collection entities, int size) { + return Db.updateBatchById(entities, size); } - default void insertOrUpdate(T entity) { - Db.saveOrUpdate(entity); + default Boolean insertOrUpdate(T entity) { + return Db.saveOrUpdate(entity); } - default void insertOrUpdateBatch(Collection collection) { - Db.saveOrUpdateBatch(collection); + default Boolean insertOrUpdateBatch(Collection collection) { + return Db.saveOrUpdateBatch(collection); } default int delete(String field, String value) { From 1535ae03b6828cd82426a734b14edd142b71b509 Mon Sep 17 00:00:00 2001 From: "1351515658@qq.com" <1351515658@qq.com> Date: Wed, 29 Nov 2023 19:45:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=20websocket=E6=96=AD=E5=BC=80=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=9C=AA=E5=88=A0=E9=99=A4=E4=BC=9A=E8=AF=9D=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../websocket/core/session/WebSocketSessionManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-websocket/src/main/java/cn/iocoder/yudao/framework/websocket/core/session/WebSocketSessionManagerImpl.java b/yudao-framework/yudao-spring-boot-starter-websocket/src/main/java/cn/iocoder/yudao/framework/websocket/core/session/WebSocketSessionManagerImpl.java index aca572f90..6dba89851 100644 --- a/yudao-framework/yudao-spring-boot-starter-websocket/src/main/java/cn/iocoder/yudao/framework/websocket/core/session/WebSocketSessionManagerImpl.java +++ b/yudao-framework/yudao-spring-boot-starter-websocket/src/main/java/cn/iocoder/yudao/framework/websocket/core/session/WebSocketSessionManagerImpl.java @@ -66,7 +66,7 @@ public class WebSocketSessionManagerImpl implements WebSocketSessionManager { @Override public void removeSession(WebSocketSession session) { // 移除从 idSessions 中 - idSessions.remove(session.getId(), session); + idSessions.remove(session.getId()); // 移除从 idSessions 中 LoginUser user = WebSocketFrameworkUtils.getLoginUser(session); if (user == null) {