From b18b629fecff0fa6cf6ce418e980d97cda417fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=80=E6=BA=90=E6=B5=B7=E5=93=A5?= Date: Tue, 28 Mar 2023 11:03:24 +0800 Subject: [PATCH] rename "deleteByByMap" to "deleteByMap" --- .../src/main/java/com/mybatisflex/core/row/Db.java | 4 ++-- .../src/main/java/com/mybatisflex/core/row/RowMapper.java | 2 +- .../main/java/com/mybatisflex/core/row/RowMapperInvoker.java | 4 ++-- .../src/main/java/com/mybatisflex/test/RowTestStarter.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/Db.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/Db.java index 3a2516a6..98e82183 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/Db.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/Db.java @@ -148,8 +148,8 @@ public class Db { * @param tableName 表名 * @param whereColumns where 条件 */ - public static int deleteByByMap(String tableName, Map whereColumns) { - return invoker().deleteByByMap(tableName, whereColumns); + public static int deleteByMap(String tableName, Map whereColumns) { + return invoker().deleteByMap(tableName, whereColumns); } /** diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/RowMapper.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/RowMapper.java index c283f5eb..5a50505e 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/RowMapper.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/RowMapper.java @@ -132,7 +132,7 @@ public interface RowMapper { * @param whereConditions 条件,通过 map 的 key:value 来构建,都是 and 的关系 * @return 执行影响的行数 */ - default int deleteByByMap(String tableName, Map whereConditions) { + default int deleteByMap(String tableName, Map whereConditions) { if (whereConditions == null || whereConditions.isEmpty()) { throw FlexExceptions.wrap("whereConditions can not be null or empty."); } diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/RowMapperInvoker.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/RowMapperInvoker.java index 109f37ac..480c1b51 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/RowMapperInvoker.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/row/RowMapperInvoker.java @@ -119,8 +119,8 @@ public class RowMapperInvoker { return execute(mapper -> mapper.deleteBatchByIds(tableName, primaryKey, ids)); } - public int deleteByByMap(String tableName, Map whereColumns) { - return execute(mapper -> mapper.deleteByByMap(tableName, whereColumns)); + public int deleteByMap(String tableName, Map whereColumns) { + return execute(mapper -> mapper.deleteByMap(tableName, whereColumns)); } public int deleteByQuery(String tableName, QueryWrapper queryWrapper) { diff --git a/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/RowTestStarter.java b/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/RowTestStarter.java index 1cd12537..80424fd0 100644 --- a/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/RowTestStarter.java +++ b/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/RowTestStarter.java @@ -100,7 +100,7 @@ public class RowTestStarter { // where.put("id", 2); // //根据 map 删除数据 // bootstrap.execute(RowMapper.class, rowMapper -> -// rowMapper.deleteByByMap("tb_account", where)); +// rowMapper.deleteByMap("tb_account", where)); // // // //更新数据