diff --git a/kenaito-common/src/main/java/cn/odboy/base/MyEntity.java b/kenaito-common/src/main/java/cn/odboy/base/MyNormalEntity.java similarity index 97% rename from kenaito-common/src/main/java/cn/odboy/base/MyEntity.java rename to kenaito-common/src/main/java/cn/odboy/base/MyNormalEntity.java index ded437e..04d5b52 100644 --- a/kenaito-common/src/main/java/cn/odboy/base/MyEntity.java +++ b/kenaito-common/src/main/java/cn/odboy/base/MyNormalEntity.java @@ -18,7 +18,7 @@ import java.util.Date; */ @Getter @Setter -public class MyEntity extends MyObject { +public class MyNormalEntity extends MyObject { /** * 创建人 diff --git a/kenaito-common/src/main/java/cn/odboy/infra/mybatis/util/QUtil.java b/kenaito-common/src/main/java/cn/odboy/infra/mybatis/util/QUtil.java index 4ee8d5e..3a37379 100644 --- a/kenaito-common/src/main/java/cn/odboy/infra/mybatis/util/QUtil.java +++ b/kenaito-common/src/main/java/cn/odboy/infra/mybatis/util/QUtil.java @@ -5,7 +5,7 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.exceptions.ExceptionUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import cn.odboy.base.MyEntity; +import cn.odboy.base.MyNormalEntity; import cn.odboy.constant.SystemConst; import cn.odboy.infra.context.SecurityUtil; import cn.odboy.infra.exception.BadRequestException; @@ -240,7 +240,7 @@ public class QUtil { @TableName("test_domain") private static class TestDomain { - @NotNull(groups = MyEntity.Update.class) + @NotNull(groups = MyNormalEntity.Update.class) @TableId(value = "user_id", type = IdType.AUTO) private Long id; @TableField(value = "dept_id") diff --git a/kenaito-common/src/main/java/cn/odboy/util/ListUtil.java b/kenaito-common/src/main/java/cn/odboy/util/ListUtil.java index a76ec56..5106c20 100644 --- a/kenaito-common/src/main/java/cn/odboy/util/ListUtil.java +++ b/kenaito-common/src/main/java/cn/odboy/util/ListUtil.java @@ -1,6 +1,6 @@ package cn.odboy.util; -import cn.odboy.base.MyEntity; +import cn.odboy.base.MyNormalEntity; import java.util.ArrayList; import java.util.Date; @@ -27,9 +27,9 @@ public class ListUtil { // list转map,保留旧值 -> Map userMap = users.stream().collect(Collectors.toMap(User::getName, user -> user, (existing, replacement) -> existing)); public static void main(String[] args) { - List entities = new ArrayList<>(); + List entities = new ArrayList<>(); for (int i = 0; i < 50; i++) { - MyEntity entity = new MyEntity(); + MyNormalEntity entity = new MyNormalEntity(); if (i % 2 == 0) { entity.setCreateBy("odboy"); } else { @@ -40,7 +40,7 @@ public class ListUtil { entity.setUpdateTime(new Date()); entities.add(entity); } - List entities1 = ListUtil.distinctByTArgs(entities, MyEntity::getCreateBy); + List entities1 = ListUtil.distinctByTArgs(entities, MyNormalEntity::getCreateBy); System.err.println(entities1); } }