Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7e5fdaff62
|
|
@ -4,6 +4,8 @@ import com.chushang.common.mybatis.page.CommonParam;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author by zhaowenyuan create 2022/8/22 11:13
|
* @author by zhaowenyuan create 2022/8/22 11:13
|
||||||
* 检索 角色
|
* 检索 角色
|
||||||
|
|
@ -14,4 +16,13 @@ public class ListRoleDTO extends CommonParam {
|
||||||
private String roleName;
|
private String roleName;
|
||||||
private String roleKey;
|
private String roleKey;
|
||||||
private Boolean status;
|
private Boolean status;
|
||||||
|
private Params params;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public static class Params {
|
||||||
|
private String beginTime;
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,36 @@ public class RoleController {
|
||||||
@Autowired
|
@Autowired
|
||||||
ISysUserService userService;
|
ISysUserService userService;
|
||||||
|
|
||||||
|
// @RequiresPermissions("system:role:list")
|
||||||
|
// @GetMapping("/list")
|
||||||
|
// public AjaxResult list(ListRoleDTO listRole)
|
||||||
|
// {
|
||||||
|
// return roleService.selectRoleList(listRole);
|
||||||
|
// }
|
||||||
|
|
||||||
@RequiresPermissions("system:role:list")
|
@RequiresPermissions("system:role:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public AjaxResult list(ListRoleDTO listRole)
|
public AjaxResult list(
|
||||||
{
|
@RequestParam(required = false) String roleName,
|
||||||
|
@RequestParam(required = false) String roleKey,
|
||||||
|
@RequestParam(required = false) Boolean status,
|
||||||
|
@RequestParam(required = false) String beginTime,
|
||||||
|
@RequestParam(required = false) String endTime
|
||||||
|
) {
|
||||||
|
ListRoleDTO.Params params = new ListRoleDTO.Params();
|
||||||
|
params.setBeginTime(beginTime);
|
||||||
|
params.setEndTime(endTime);
|
||||||
|
|
||||||
|
ListRoleDTO listRole = new ListRoleDTO();
|
||||||
|
listRole.setRoleName(roleName);
|
||||||
|
listRole.setRoleKey(roleKey);
|
||||||
|
listRole.setStatus(status);
|
||||||
|
listRole.setParams(params);
|
||||||
|
|
||||||
return roleService.selectRoleList(listRole);
|
return roleService.selectRoleList(listRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色编号获取详细信息
|
* 根据角色编号获取详细信息
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -63,12 +63,18 @@
|
||||||
<if test="listRole.roleName != null and listRole.roleName != ''">
|
<if test="listRole.roleName != null and listRole.roleName != ''">
|
||||||
AND r.role_name like concat('%', #{listRole.roleName}, '%')
|
AND r.role_name like concat('%', #{listRole.roleName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="listRole.status != null and listRole.status != ''">
|
<if test="listRole.status != null">
|
||||||
AND r.status = #{listRole.status}
|
AND r.status = #{listRole.status}
|
||||||
</if>
|
</if>
|
||||||
<if test="listRole.roleKey != null and listRole.roleKey != ''">
|
<if test="listRole.roleKey != null and listRole.roleKey != ''">
|
||||||
AND r.role_key like concat('%', #{listRole.roleKey}, '%')
|
AND r.role_key like concat('%', #{listRole.roleKey}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="listRole.params.beginTime != null">
|
||||||
|
AND r.create_time >= #{listRole.params.beginTime}
|
||||||
|
</if>
|
||||||
|
<if test="listRole.params.endTime != null">
|
||||||
|
AND r.create_time <= #{listRole.params.endTime}
|
||||||
|
</if>
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${listRole.sqlParam.get('dataScope')}
|
${listRole.sqlParam.get('dataScope')}
|
||||||
order by r.order_num
|
order by r.order_num
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue