支持get请求映射params参数
This commit is contained in:
parent
e3a5412216
commit
1e28b0c924
@ -5,7 +5,6 @@ import java.util.Date;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
@ -36,14 +35,6 @@ public class BaseEntity implements Serializable
|
|||||||
/** 备注 */
|
/** 备注 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/** 开始时间 */
|
|
||||||
@JsonIgnore
|
|
||||||
private String beginTime;
|
|
||||||
|
|
||||||
/** 结束时间 */
|
|
||||||
@JsonIgnore
|
|
||||||
private String endTime;
|
|
||||||
|
|
||||||
/** 请求参数 */
|
/** 请求参数 */
|
||||||
private Map<String, Object> params;
|
private Map<String, Object> params;
|
||||||
|
|
||||||
@ -107,26 +98,6 @@ public class BaseEntity implements Serializable
|
|||||||
this.remark = 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()
|
public Map<String, Object> getParams()
|
||||||
{
|
{
|
||||||
if (params == null)
|
if (params == null)
|
||||||
|
@ -36,11 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="userName != null and userName != ''">
|
<if test="userName != null and userName != ''">
|
||||||
AND user_name like concat(concat('%',#{userName}),'%')
|
AND user_name like concat(concat('%',#{userName}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and login_time >= to_date(#{beginTime},'yyyy-MM-dd HH24:mi:ss')
|
and login_time >= to_date(#{params.beginTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and login_time <= to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
|
and login_time <= to_date(#{params.endTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by info_id desc
|
order by info_id desc
|
||||||
|
@ -90,11 +90,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="operName != null and operName != ''">
|
<if test="operName != null and operName != ''">
|
||||||
AND oper_name like concat(concat('%',#{operName}),'%')
|
AND oper_name like concat(concat('%',#{operName}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and oper_time >= to_date(#{beginTime},'yyyy-MM-dd HH24:mi:ss')
|
and oper_time >= to_date(#{params.beginTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and oper_time <= to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
|
and oper_time <= to_date(#{params.endTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by oper_id desc
|
order by oper_id desc
|
||||||
|
@ -50,11 +50,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="configKey != null and configKey != ''">
|
<if test="configKey != null and configKey != ''">
|
||||||
AND config_key like concat(concat('%',#{configKey}),'%')
|
AND config_key like concat(concat('%',#{configKey}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and create_time >= to_date(#{beginTime},'yyyy-MM-dd HH24:mi:ss')
|
and create_time >= to_date(#{params.beginTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and create_time <= to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
|
and create_time <= to_date(#{params.endTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
@ -32,11 +32,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="dictType != null and dictType != ''">
|
<if test="dictType != null and dictType != ''">
|
||||||
AND dict_type like concat(concat('%',#{dictType}),'%')
|
AND dict_type like concat(concat('%',#{dictType}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and create_time >= to_date(#{beginTime},'yyyy-MM-dd HH24:mi:ss')
|
and create_time >= to_date(#{params.beginTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and create_time <= to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
|
and create_time <= to_date(#{params.endTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
@ -35,11 +35,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="invokeTarget != null and invokeTarget != ''">
|
<if test="invokeTarget != null and invokeTarget != ''">
|
||||||
AND invoke_target like concat(concat('%', #{invokeTarget}), '%')
|
AND invoke_target like concat(concat('%', #{invokeTarget}), '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.params.beginTime != null and params.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and create_time >= to_date(#{params.beginTime},'yyyy-MM-dd HH24:mi:ss')
|
and create_time >= to_date(#{params.params.beginTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.params.endTime != null and params.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and create_time <= to_date(#{params.endTime},'yyyy-MM-dd HH24:mi:ss')
|
and create_time <= to_date(#{params.params.endTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
@ -42,11 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="roleKey != null and roleKey != ''">
|
<if test="roleKey != null and roleKey != ''">
|
||||||
AND r.role_key like concat(concat('%',#{roleKey}),'%')
|
AND r.role_key like concat(concat('%',#{roleKey}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and r.create_time >= to_date(#{beginTime},'yyyy-MM-dd HH24:mi:ss')
|
and r.create_time >= to_date(#{params.beginTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and r.create_time <= to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
|
and r.create_time <= to_date(#{params.endTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
|
@ -68,11 +68,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="phonenumber != null and phonenumber != ''">
|
<if test="phonenumber != null and phonenumber != ''">
|
||||||
AND u.phonenumber like concat(concat('%',#{phonenumber}),'%')
|
AND u.phonenumber like concat(concat('%',#{phonenumber}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
AND u.create_time >= to_date(#{beginTime},'yyyy-MM-dd HH24:mi:ss')
|
AND u.create_time >= to_date(#{params.beginTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
AND u.create_time <= to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
|
AND u.create_time <= to_date(#{params.endTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<if test="deptId != null and deptId != 0">
|
<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) <![CDATA[ <> ]]> 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) <![CDATA[ <> ]]> 0 ))
|
||||||
|
@ -64,11 +64,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="tableComment != null and tableComment != ''">
|
<if test="tableComment != null and tableComment != ''">
|
||||||
AND lower(table_comment) like lower(concat(concat('%', #{tableComment}), '%'))
|
AND lower(table_comment) like lower(concat(concat('%', #{tableComment}), '%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
AND create_time >= to_date(#{beginTime},'yyyy-MM-dd HH24:mi:ss')
|
AND create_time >= to_date(#{params.beginTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
AND create_time <= to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
|
AND create_time <= to_date(#{params.endTime},'yyyy-MM-dd HH24:mi:ss')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
Loading…
Reference in New Issue
Block a user