mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
rename "deleteByByMap" to "deleteByMap"
This commit is contained in:
parent
ebfdc86cda
commit
b18b629fec
@ -148,8 +148,8 @@ public class Db {
|
|||||||
* @param tableName 表名
|
* @param tableName 表名
|
||||||
* @param whereColumns where 条件
|
* @param whereColumns where 条件
|
||||||
*/
|
*/
|
||||||
public static int deleteByByMap(String tableName, Map<String, Object> whereColumns) {
|
public static int deleteByMap(String tableName, Map<String, Object> whereColumns) {
|
||||||
return invoker().deleteByByMap(tableName, whereColumns);
|
return invoker().deleteByMap(tableName, whereColumns);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -132,7 +132,7 @@ public interface RowMapper {
|
|||||||
* @param whereConditions 条件,通过 map 的 key:value 来构建,都是 and 的关系
|
* @param whereConditions 条件,通过 map 的 key:value 来构建,都是 and 的关系
|
||||||
* @return 执行影响的行数
|
* @return 执行影响的行数
|
||||||
*/
|
*/
|
||||||
default int deleteByByMap(String tableName, Map<String, Object> whereConditions) {
|
default int deleteByMap(String tableName, Map<String, Object> whereConditions) {
|
||||||
if (whereConditions == null || whereConditions.isEmpty()) {
|
if (whereConditions == null || whereConditions.isEmpty()) {
|
||||||
throw FlexExceptions.wrap("whereConditions can not be null or empty.");
|
throw FlexExceptions.wrap("whereConditions can not be null or empty.");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,8 +119,8 @@ public class RowMapperInvoker {
|
|||||||
return execute(mapper -> mapper.deleteBatchByIds(tableName, primaryKey, ids));
|
return execute(mapper -> mapper.deleteBatchByIds(tableName, primaryKey, ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int deleteByByMap(String tableName, Map<String, Object> whereColumns) {
|
public int deleteByMap(String tableName, Map<String, Object> whereColumns) {
|
||||||
return execute(mapper -> mapper.deleteByByMap(tableName, whereColumns));
|
return execute(mapper -> mapper.deleteByMap(tableName, whereColumns));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int deleteByQuery(String tableName, QueryWrapper queryWrapper) {
|
public int deleteByQuery(String tableName, QueryWrapper queryWrapper) {
|
||||||
|
|||||||
@ -100,7 +100,7 @@ public class RowTestStarter {
|
|||||||
// where.put("id", 2);
|
// where.put("id", 2);
|
||||||
// //根据 map 删除数据
|
// //根据 map 删除数据
|
||||||
// bootstrap.execute(RowMapper.class, rowMapper ->
|
// bootstrap.execute(RowMapper.class, rowMapper ->
|
||||||
// rowMapper.deleteByByMap("tb_account", where));
|
// rowMapper.deleteByMap("tb_account", where));
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// //更新数据
|
// //更新数据
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user