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