From 9c4f97da16048451d3ffc0a428cfd9f8cb81a50c Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期日, 04 十二月 2022 11:29:43 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/config/InitConfig.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/lf/server/config/InitConfig.java b/src/main/java/com/lf/server/config/InitConfig.java index 8f06e57..a0ae233 100644 --- a/src/main/java/com/lf/server/config/InitConfig.java +++ b/src/main/java/com/lf/server/config/InitConfig.java @@ -75,6 +75,7 @@ //testBlacklist(); //FloatServerController.test(); //testReadExcel(); + //testBatchUpdate(); //boolean f1 = ZipHelper.unzip("D:\\LF\\data\\resources.zip", "D:\\LF\\data\\unzip"); //boolean f2 = ZipHelper.zip("D:\\LF\\data\\res.zip", "D:\\LF\\data\\unzip\\resources"); @@ -92,6 +93,23 @@ } } + private void testBatchUpdate() { + DlgagnpEntity d1 = new DlgagnpEntity(); + d1.setGid(56); + d1.setGb("10"); + d1.setName("a01"); + DlgagnpEntity d2 = new DlgagnpEntity(); + d2.setGid(57); + d2.setGb("20"); + d2.setName("a02"); + + List<DlgagnpEntity> list = new ArrayList<>(); + list.add(d1); + list.add(d2); + + int rows = dlgagnpMapper.updateBatch(list); + } + private void testMybatisPlus() { String s1 = locateService.selectWktById(1); -- Gitblit v1.9.3