From e170bc02ff908d0ae829c657e49dc6ebd1626d90 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期五, 04 十二月 2020 10:52:31 +0800
Subject: [PATCH] 支持get请求映射params参数

---
 src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java |   29 --------------
 src/main/resources/mybatis/monitor/SysOperLogMapper.xml      |    8 ++--
 src/main/resources/mybatis/system/SysDictTypeMapper.xml      |    8 ++--
 src/main/resources/mybatis/system/SysConfigMapper.xml        |    8 ++--
 src/main/resources/mybatis/system/SysJobLogMapper.xml        |    8 ++--
 src/main/resources/mybatis/monitor/SysLogininforMapper.xml   |    8 ++--
 src/main/resources/mybatis/system/SysUserMapper.xml          |    8 ++--
 src/main/resources/mybatis/system/SysRoleMapper.xml          |    8 ++--
 src/main/resources/mybatis/tool/GenTableMapper.xml           |   16 ++++----
 9 files changed, 36 insertions(+), 65 deletions(-)

diff --git a/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java b/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java
index 08f4f90..91a3736 100644
--- a/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java
+++ b/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java
@@ -5,7 +5,6 @@
 import java.util.HashMap;
 import java.util.Map;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonIgnore;
 
 /**
  * Entity鍩虹被
@@ -35,14 +34,6 @@
 
     /** 澶囨敞 */
     private String remark;
-
-    /** 寮�濮嬫椂闂� */
-    @JsonIgnore
-    private String beginTime;
-
-    /** 缁撴潫鏃堕棿 */
-    @JsonIgnore
-    private String endTime;
 
     /** 璇锋眰鍙傛暟 */
     private Map<String, Object> params;
@@ -105,26 +96,6 @@
     public void setRemark(String remark)
     {
         this.remark = remark;
-    }
-
-    public String getBeginTime()
-    {
-        return beginTime;
-    }
-
-    public void setBeginTime(String beginTime)
-    {
-        this.beginTime = beginTime;
-    }
-
-    public String getEndTime()
-    {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime)
-    {
-        this.endTime = endTime;
     }
 
     public Map<String, Object> getParams()
diff --git a/src/main/resources/mybatis/monitor/SysLogininforMapper.xml b/src/main/resources/mybatis/monitor/SysLogininforMapper.xml
index ba3194d..73a287f 100644
--- a/src/main/resources/mybatis/monitor/SysLogininforMapper.xml
+++ b/src/main/resources/mybatis/monitor/SysLogininforMapper.xml
@@ -33,11 +33,11 @@
 			<if test="userName != null and userName != ''">
 				AND user_name like concat('%', #{userName}, '%')
 			</if>
-			<if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-				and date_format(login_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+				and date_format(login_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 			</if>
-			<if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-				and date_format(login_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+			<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+				and date_format(login_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 			</if>
 		</where>
 		order by info_id desc
diff --git a/src/main/resources/mybatis/monitor/SysOperLogMapper.xml b/src/main/resources/mybatis/monitor/SysOperLogMapper.xml
index 3466914..cc536fe 100644
--- a/src/main/resources/mybatis/monitor/SysOperLogMapper.xml
+++ b/src/main/resources/mybatis/monitor/SysOperLogMapper.xml
@@ -54,11 +54,11 @@
 			<if test="operName != null and operName != ''">
 				AND oper_name like concat('%', #{operName}, '%')
 			</if>
-			<if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-				and date_format(oper_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+				and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 			</if>
-			<if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-				and date_format(oper_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+			<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+				and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 			</if>
 		</where>
 		order by oper_id desc
diff --git a/src/main/resources/mybatis/system/SysConfigMapper.xml b/src/main/resources/mybatis/system/SysConfigMapper.xml
index b5036e7..98bbbb8 100644
--- a/src/main/resources/mybatis/system/SysConfigMapper.xml
+++ b/src/main/resources/mybatis/system/SysConfigMapper.xml
@@ -50,11 +50,11 @@
 			<if test="configKey != null and configKey != ''">
 				AND config_key like concat('%', #{configKey}, '%')
 			</if>
-			<if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-				and date_format(create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+				and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 			</if>
-			<if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-				and date_format(create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+			<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+				and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 			</if>
 		</where>
     </select>
diff --git a/src/main/resources/mybatis/system/SysDictTypeMapper.xml b/src/main/resources/mybatis/system/SysDictTypeMapper.xml
index 4639cae..8d657d9 100644
--- a/src/main/resources/mybatis/system/SysDictTypeMapper.xml
+++ b/src/main/resources/mybatis/system/SysDictTypeMapper.xml
@@ -32,11 +32,11 @@
 			<if test="dictType != null and dictType != ''">
 				AND dict_type like concat('%', #{dictType}, '%')
 			</if>
-			<if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-				and date_format(create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+				and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 			</if>
-			<if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-				and date_format(create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+			<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+				and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 			</if>
 	    </where>
 	</select>
diff --git a/src/main/resources/mybatis/system/SysJobLogMapper.xml b/src/main/resources/mybatis/system/SysJobLogMapper.xml
index 8d190a4..dc844ba 100644
--- a/src/main/resources/mybatis/system/SysJobLogMapper.xml
+++ b/src/main/resources/mybatis/system/SysJobLogMapper.xml
@@ -35,11 +35,11 @@
 			<if test="invokeTarget != null and invokeTarget != ''">
 				AND invoke_target like concat('%', #{invokeTarget}, '%')
 			</if>
-			<if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-				and date_format(create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+				and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 			</if>
-			<if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-				and date_format(create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+			<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+				and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 			</if>
 		</where>
 	</select>
diff --git a/src/main/resources/mybatis/system/SysRoleMapper.xml b/src/main/resources/mybatis/system/SysRoleMapper.xml
index 2ae9181..a5c95fe 100644
--- a/src/main/resources/mybatis/system/SysRoleMapper.xml
+++ b/src/main/resources/mybatis/system/SysRoleMapper.xml
@@ -42,11 +42,11 @@
 		<if test="roleKey != null and roleKey != ''">
 			AND r.role_key like concat('%', #{roleKey}, '%')
 		</if>
-		<if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-			and date_format(r.create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+		<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+			and date_format(r.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 		</if>
-		<if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-			and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+		<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+			and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 		</if>
 		<!-- 鏁版嵁鑼冨洿杩囨护 -->
 		${params.dataScope}
diff --git a/src/main/resources/mybatis/system/SysUserMapper.xml b/src/main/resources/mybatis/system/SysUserMapper.xml
index 4c76c5b..f961e45 100644
--- a/src/main/resources/mybatis/system/SysUserMapper.xml
+++ b/src/main/resources/mybatis/system/SysUserMapper.xml
@@ -68,11 +68,11 @@
 		<if test="phonenumber != null and phonenumber != ''">
 			AND u.phonenumber like concat('%', #{phonenumber}, '%')
 		</if>
-		<if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-			AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+		<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+			AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 		</if>
-		<if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-			AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+		<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+			AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 		</if>
 		<if test="deptId != null and deptId != 0">
 			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
diff --git a/src/main/resources/mybatis/tool/GenTableMapper.xml b/src/main/resources/mybatis/tool/GenTableMapper.xml
index 4230a3f..4acb016 100644
--- a/src/main/resources/mybatis/tool/GenTableMapper.xml
+++ b/src/main/resources/mybatis/tool/GenTableMapper.xml
@@ -64,11 +64,11 @@
 			<if test="tableComment != null and tableComment != ''">
 				AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
 			</if>
-			<if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-				AND date_format(create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+				AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 			</if>
-			<if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-				AND date_format(create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+			<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+				AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 			</if>
 		</where>
 	</select>
@@ -84,11 +84,11 @@
 		<if test="tableComment != null and tableComment != ''">
 			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
 		</if>
-		<if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-			AND date_format(create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
+		<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+			AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 		</if>
-		<if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-			AND date_format(create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
+		<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+			AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 		</if>
 	</select>
 	

--
Gitblit v1.9.3