修复部分bug
This commit is contained in:
parent
8f136095c5
commit
1a8223a358
|
|
@ -110,6 +110,15 @@ public class SysUser extends BaseEntity
|
|||
/** 角色名称(多个角色用逗号分隔) */
|
||||
private String roleNames;
|
||||
|
||||
/** 关键字(用于模糊查询用户名、昵称、手机号等) */
|
||||
private String keyword;
|
||||
|
||||
/** 开始时间 */
|
||||
private String beginTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
|
||||
public SysUser()
|
||||
{
|
||||
|
||||
|
|
@ -373,6 +382,36 @@ public class SysUser extends BaseEntity
|
|||
this.roleNames = roleNames;
|
||||
}
|
||||
|
||||
public String getKeyword()
|
||||
{
|
||||
return keyword;
|
||||
}
|
||||
|
||||
public void setKeyword(String keyword)
|
||||
{
|
||||
this.keyword = keyword;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
@ -401,6 +440,8 @@ public class SysUser extends BaseEntity
|
|||
.append("remark", getRemark())
|
||||
.append("dept", getDept())
|
||||
.append("roleNames", getRoleNames())
|
||||
.append("beginTime", getBeginTime())
|
||||
.append("endTime", getEndTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,20 +76,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="unitId != null and unitId != 0">
|
||||
AND u.unit_id = #{unitId}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND u.status = #{status}
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (u.user_name like concat('%', #{keyword}, '%')
|
||||
OR u.nick_name like concat('%', #{keyword}, '%')
|
||||
OR u.phonenumber like concat('%', #{keyword}, '%'))
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(u.create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
|
||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(u.create_time,'%Y%m%d') >= date_format(#{beginTime},'%Y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(u.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d')
|
||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(u.create_time,'%Y%m%d') <= date_format(#{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) ))
|
||||
|
|
|
|||
Loading…
Reference in New Issue