From 17055fd8d36504b79a5def28f5d4b4740faf012d Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 25 三月 2022 13:47:35 +0800 Subject: [PATCH] TDMQ工具集成 --- src/main/java/org/yeshi/utils/generater/vo/dao/MyBatisDBDaoVO.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/main/java/org/yeshi/utils/generater/vo/dao/MyBatisDBDaoVO.java b/src/main/java/org/yeshi/utils/generater/vo/dao/MyBatisDBDaoVO.java index ee9a630..aba2762 100644 --- a/src/main/java/org/yeshi/utils/generater/vo/dao/MyBatisDBDaoVO.java +++ b/src/main/java/org/yeshi/utils/generater/vo/dao/MyBatisDBDaoVO.java @@ -2,6 +2,7 @@ import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Transient; +import org.yeshi.utils.StringUtil; import org.yeshi.utils.generater.annotation.admin.DaoQueryCondition; import org.yeshi.utils.generater.entity.*; import org.yeshi.utils.generater.mybatis.Column; @@ -119,6 +120,7 @@ //涓婚敭 if (a instanceof Id) { identity = columData; + identity.setType(fd.getType().getName()); valid = false; break; } @@ -134,7 +136,12 @@ //鑾峰彇鏌ヨ鏉′欢 for (Annotation a : as) { if (a instanceof DaoQueryCondition) { - daoQueryColumnList.add(new DaoQueryColumnData(columData.getProperty(), columData, fd.getType().getSimpleName(), ((DaoQueryCondition) a).queryType())); + if (fd.getType().getSimpleName().equalsIgnoreCase("Date")) { + daoQueryColumnList.add(new DaoQueryColumnData("max" + StringUtil.firstCharToUpper(columData.getProperty()), columData, fd.getType().getSimpleName(), DaoQueryCondition.QueryType.lt)); + daoQueryColumnList.add(new DaoQueryColumnData("min" + StringUtil.firstCharToUpper(columData.getProperty()), columData, fd.getType().getSimpleName(), DaoQueryCondition.QueryType.gte)); + } else { + daoQueryColumnList.add(new DaoQueryColumnData(columData.getProperty(), columData, fd.getType().getSimpleName(), ((DaoQueryCondition) a).queryType())); + } break; } } -- Gitblit v1.8.0