diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableMapper.xml b/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableMapper.xml
index 99cf7ae9..a1e6c7e4 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableMapper.xml
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableMapper.xml
@@ -66,11 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND lower(table_comment) like lower(concat('%', #{genTable.tableComment}, '%'))
-
- AND date_format(create_time,'%y%m%d') >= date_format(#{genTable.params.beginTime},'%y%m%d')
-
-
- AND date_format(create_time,'%y%m%d') <= date_format(#{genTable.params.endTime},'%y%m%d')
+
+ AND create_time between #{genTable.params.beginTime} and #{genTable.params.endTime}
@@ -86,11 +83,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND lower(table_comment) like lower(concat('%', #{genTable.tableComment}, '%'))
-
- AND date_format(create_time,'%y%m%d') >= date_format(#{genTable.params.beginTime},'%y%m%d')
-
-
- AND date_format(create_time,'%y%m%d') <= date_format(#{genTable.params.endTime},'%y%m%d')
+
+ AND create_time between #{genTable.params.beginTime} and #{genTable.params.endTime}
order by create_time desc
@@ -104,12 +98,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
-
- AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
-
-
- AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
-
+
+ AND create_time between #{params.beginTime} and #{params.endTime}
+
@@ -124,12 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
-
- AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
-
-
- AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
-
+
+ AND create_time between #{params.beginTime} and #{params.endTime}
+
order by create_time desc
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
index 50b2ce2e..0dc16b3c 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -54,11 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND r.role_key like concat('%', #{role.roleKey}, '%')
-
- and date_format(r.create_time,'%y%m%d') >= date_format(#{role.params.beginTime},'%y%m%d')
-
-
- and date_format(r.create_time,'%y%m%d') <= date_format(#{role.params.endTime},'%y%m%d')
+
+ AND r.create_time between #{role.params.beginTime} and #{role.params.endTime}
order by r.role_sort
@@ -78,12 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND r.role_key like concat('%', #{roleKey}, '%')
-
- and date_format(r.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
-
-
- and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
-
+
+ AND r.create_time between #{params.beginTime} and #{params.endTime}
+
order by r.role_sort
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index bd1825c1..172e92a7 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -100,11 +100,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND u.phonenumber like concat('%', #{user.phonenumber}, '%')
-
- AND date_format(u.create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d')
-
-
- AND date_format(u.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
+
+ AND u.create_time between #{user.params.beginTime} and #{user.params.endTime}
AND (u.dept_id = #{user.deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{user.deptId},
@@ -128,12 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND u.phonenumber like concat('%', #{phonenumber}, '%')
-
- AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
-
-
- AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
-
+
+ AND u.create_time between #{params.beginTime} and #{params.endTime}
+
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))