refactor: 重命名方法名,避免被 JSON 框架解析。

This commit is contained in:
Suomm 2023-07-28 08:52:07 +08:00
parent 5dc95c5567
commit ff71d63186

View File

@ -56,7 +56,7 @@ public interface MapperModel<T> {
* *
* @return 主键数据数组 * @return 主键数据数组
*/ */
default Object[] getPkValues() { default Object[] pkValues() {
TableInfo tableInfo = TableInfoFactory.ofEntityClass(getClass()); TableInfo tableInfo = TableInfoFactory.ofEntityClass(getClass());
return tableInfo.buildPkSqlArgs(this); return tableInfo.buildPkSqlArgs(this);
} }
@ -107,7 +107,7 @@ public interface MapperModel<T> {
* @return {@code true} 删除成功{@code false} 删除失败 * @return {@code true} 删除成功{@code false} 删除失败
*/ */
default boolean removeById() { default boolean removeById() {
return SqlUtil.toBool(baseMapper().deleteById(getPkValues())); return SqlUtil.toBool(baseMapper().deleteById(pkValues()));
} }
/** /**
@ -135,7 +135,7 @@ public interface MapperModel<T> {
* @return 数据 * @return 数据
*/ */
default T oneById() { default T oneById() {
return baseMapper().selectOneById(getPkValues()); return baseMapper().selectOneById(pkValues());
} }
/** /**