Commit e4ca7afc authored by dqjdda's avatar dqjdda
Browse files

阿里巴巴代码规范

parent 6d941c09
......@@ -14,6 +14,9 @@ import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
/**
* @author /
*/
@Component
public class JwtTokenUtil implements Serializable {
......@@ -68,7 +71,7 @@ public class JwtTokenUtil implements Serializable {
}
public String generateToken(UserDetails userDetails) {
Map<String, Object> claims = new HashMap<>();
Map<String, Object> claims = new HashMap<>(16);
return doGenerateToken(claims, userDetails.getUsername());
}
......@@ -107,7 +110,8 @@ public class JwtTokenUtil implements Serializable {
public String getToken(HttpServletRequest request){
final String requestHeader = request.getHeader(tokenHeader);
if (requestHeader != null && requestHeader.startsWith("Bearer ")) {
String startsWith = "Bearer ";
if (requestHeader != null && requestHeader.startsWith(startsWith)) {
return requestHeader.substring(7);
}
return null;
......
......@@ -9,6 +9,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Objects;
import java.util.Set;
/**
......@@ -47,4 +48,22 @@ public class Dept implements Serializable {
private Timestamp createTime;
public @interface Update {}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dept dept = (Dept) o;
return Objects.equals(id, dept.id) &&
Objects.equals(name, dept.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
}
\ No newline at end of file
......@@ -24,19 +24,18 @@ public class DictDetail implements Serializable {
@NotNull(groups = Update.class)
private Long id;
// 字典标签
/** 字典标签 */
@Column(name = "label",nullable = false)
private String label;
// 字典值
/** 字典值 */
@Column(name = "value",nullable = false)
private String value;
// 排序
/** 排序 */
@Column(name = "sort")
private String sort = "999";
// 字典id
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name = "dict_id")
private Dict dict;
......
......@@ -38,11 +38,11 @@ public class Menu implements Serializable {
private String component;
// 类型
/** 类型,目录、菜单、按钮 */
@Column(name = "type")
private Integer type;
// 权限
/** 权限 */
@Column(name = "permission")
private String permission;
......@@ -57,11 +57,11 @@ public class Menu implements Serializable {
@Column(columnDefinition = "bit(1) default 0")
private Boolean hidden;
// 上级菜单ID
/** 上级菜单ID */
@Column(name = "pid",nullable = false)
private Long pid;
// 是否为外链 true/false
/** 是否为外链 true/false */
@Column(name = "i_frame")
private Boolean iFrame;
......@@ -77,8 +77,12 @@ public class Menu implements Serializable {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Menu menu = (Menu) o;
return Objects.equals(id, menu.id);
}
......
......@@ -32,18 +32,18 @@ public class Role implements Serializable {
@NotBlank
private String name;
// 数据权限类型 全部 、 本级 、 自定义
/** 数据权限类型 全部 、 本级 、 自定义 */
@Column(name = "data_scope")
private String dataScope = "本级";
// 数值越小,级别越大
/** 数值越小,级别越大 */
@Column(name = "level")
private Integer level = 3;
@Column
private String remark;
// 权限
/** 权限 */
@Column(name = "permission")
private String permission;
......@@ -67,8 +67,12 @@ public class Role implements Serializable {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Role role = (Role) o;
return Objects.equals(id, role.id);
}
......
......@@ -10,6 +10,7 @@ import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;
import java.util.Set;
/**
......@@ -67,4 +68,22 @@ public class User implements Serializable {
private Dept dept;
public @interface Update {}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
User user = (User) o;
return Objects.equals(id, user.id) &&
Objects.equals(username, user.username);
}
@Override
public int hashCode() {
return Objects.hash(id, username);
}
}
\ No newline at end of file
......@@ -11,12 +11,28 @@ import java.util.Set;
* @author Zheng Jie
* @date 2019-03-25
*/
@SuppressWarnings("all")
public interface DeptRepository extends JpaRepository<Dept, Long>, JpaSpecificationExecutor<Dept> {
/**
* 根据 PID 查询
* @param id pid
* @return 、
*/
List<Dept> findByPid(Long id);
/**
* 根据ID查询名称
* @param id ID
* @return /
*/
@Query(value = "select name from dept where id = ?1",nativeQuery = true)
String findNameById(Long id);
/**
* 根据角色ID 查询
* @param id 角色ID
* @return /
*/
Set<Dept> findByRoles_Id(Long id);
}
\ No newline at end of file
......@@ -10,13 +10,35 @@ import java.util.List;
* @author Zheng Jie
* @date 2018-12-17
*/
@SuppressWarnings("all")
public interface MenuRepository extends JpaRepository<Menu, Long>, JpaSpecificationExecutor<Menu> {
/**
* 根据菜单名称查询
* @param name 菜单名称
* @return /
*/
Menu findByName(String name);
/**
* 根据组件名称查询
* @param name 组件名称
* @return /
*/
Menu findByComponentName(String name);
/**
* 根据菜单的 PID 查询
* @param pid /
* @return /
*/
List<Menu> findByPid(long pid);
/**
* 根据角色ID与菜单类型查询菜单
* @param id roleID
* @param type 类型
* @return /
*/
LinkedHashSet<Menu> findByRoles_IdAndTypeIsNotInOrderBySortAsc(Long id, Integer type);
}
......@@ -11,12 +11,27 @@ import java.util.Set;
* @author Zheng Jie
* @date 2018-12-03
*/
@SuppressWarnings("all")
public interface RoleRepository extends JpaRepository<Role, Long>, JpaSpecificationExecutor<Role> {
/**
* 根据名称查询
* @param name /
* @return /
*/
Role findByName(String name);
/**
* 根据用户ID查询
* @param id 用户ID
* @return
*/
Set<Role> findByUsers_Id(Long id);
/**
* 解绑角色菜单
* @param id 菜单ID
*/
@Modifying
@Query(value = "delete from roles_menus where menu_id = ?1",nativeQuery = true)
void untiedMenu(Long id);
......
......@@ -13,14 +13,35 @@ import java.util.Date;
*/
public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificationExecutor<User> {
/**
* 根据用户名查询
* @param username 用户名
* @return /
*/
User findByUsername(String username);
/**
* 根据邮箱查询
* @param email 邮箱
* @return /
*/
User findByEmail(String email);
/**
* 修改密码
* @param username 用户名
* @param pass 密码
* @param lastPasswordResetTime /
*/
@Modifying
@Query(value = "update user set password = ?2 , last_password_reset_time = ?3 where username = ?1",nativeQuery = true)
void updatePass(String username, String pass, Date lastPasswordResetTime);
/**
* 修改邮箱
* @param username 用户名
* @param email 邮箱
*/
@Modifying
@Query(value = "update user set email = ?2 where username = ?1",nativeQuery = true)
void updateEmail(String username, String email);
......
......@@ -7,7 +7,7 @@ import me.zhengjie.config.DataScope;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.dto.DeptDTO;
import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
import me.zhengjie.utils.ThrowableUtil;
import org.springframework.http.HttpStatus;
......@@ -55,8 +55,8 @@ public class DeptController {
public ResponseEntity getDepts(DeptQueryCriteria criteria){
// 数据权限
criteria.setIds(dataScope.getDeptIds());
List<DeptDTO> deptDTOS = deptService.queryAll(criteria);
return new ResponseEntity<>(deptService.buildTree(deptDTOS),HttpStatus.OK);
List<DeptDto> deptDtos = deptService.queryAll(criteria);
return new ResponseEntity<>(deptService.buildTree(deptDtos),HttpStatus.OK);
}
@Log("新增部门")
......
......@@ -8,9 +8,9 @@ import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.service.MenuService;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.UserService;
import me.zhengjie.modules.system.service.dto.MenuDTO;
import me.zhengjie.modules.system.service.dto.MenuDto;
import me.zhengjie.modules.system.service.dto.MenuQueryCriteria;
import me.zhengjie.modules.system.service.dto.UserDTO;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.utils.SecurityUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......@@ -59,10 +59,10 @@ public class MenuController {
@ApiOperation("获取前端所需菜单")
@GetMapping(value = "/build")
public ResponseEntity buildMenus(){
UserDTO user = userService.findByName(SecurityUtils.getUsername());
List<MenuDTO> menuDTOList = menuService.findByRoles(roleService.findByUsers_Id(user.getId()));
List<MenuDTO> menuDTOS = (List<MenuDTO>) menuService.buildTree(menuDTOList).get("content");
return new ResponseEntity<>(menuService.buildMenus(menuDTOS),HttpStatus.OK);
UserDto user = userService.findByName(SecurityUtils.getUsername());
List<MenuDto> menuDtoList = menuService.findByRoles(roleService.findByUsersId(user.getId()));
List<MenuDto> menuDtos = (List<MenuDto>) menuService.buildTree(menuDtoList).get("content");
return new ResponseEntity<>(menuService.buildMenus(menuDtos),HttpStatus.OK);
}
@ApiOperation("返回全部的菜单")
......@@ -77,8 +77,8 @@ public class MenuController {
@GetMapping
@PreAuthorize("@el.check('menu:list')")
public ResponseEntity getMenus(MenuQueryCriteria criteria){
List<MenuDTO> menuDTOList = menuService.queryAll(criteria);
return new ResponseEntity<>(menuService.buildTree(menuDTOList),HttpStatus.OK);
List<MenuDto> menuDtoList = menuService.queryAll(criteria);
return new ResponseEntity<>(menuService.buildTree(menuDtoList),HttpStatus.OK);
}
@Log("新增菜单")
......
......@@ -8,7 +8,7 @@ import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.RoleQueryCriteria;
import me.zhengjie.modules.system.service.dto.RoleSmallDTO;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.utils.SecurityUtils;
import me.zhengjie.utils.ThrowableUtil;
import org.springframework.data.domain.Pageable;
......@@ -76,7 +76,7 @@ public class RoleController {
@ApiOperation("获取用户级别")
@GetMapping(value = "/level")
public ResponseEntity getLevel(){
List<Integer> levels = roleService.findByUsers_Id(SecurityUtils.getUserId()).stream().map(RoleSmallDTO::getLevel).collect(Collectors.toList());
List<Integer> levels = roleService.findByUsersId(SecurityUtils.getUserId()).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList());
return new ResponseEntity<>(Dict.create().set("level", Collections.min(levels)),HttpStatus.OK);
}
......
......@@ -10,7 +10,7 @@ import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.vo.UserPassVo;
import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.RoleSmallDTO;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.modules.system.service.dto.UserQueryCriteria;
import me.zhengjie.service.VerificationCodeService;
import me.zhengjie.utils.*;
......@@ -87,7 +87,9 @@ public class UserController {
criteria.setDeptIds(result);
if(result.size() == 0){
return new ResponseEntity<>(PageUtil.toPage(null,0),HttpStatus.OK);
} else return new ResponseEntity<>(userService.queryAll(criteria,pageable),HttpStatus.OK);
} else {
return new ResponseEntity<>(userService.queryAll(criteria,pageable),HttpStatus.OK);
}
// 否则取并集
} else {
result.addAll(deptSet);
......@@ -121,8 +123,8 @@ public class UserController {
@DeleteMapping(value = "/{id}")
@PreAuthorize("@el.check('user:del')")
public ResponseEntity delete(@PathVariable Long id){
Integer currentLevel = Collections.min(roleService.findByUsers_Id(SecurityUtils.getUserId()).stream().map(RoleSmallDTO::getLevel).collect(Collectors.toList()));
Integer optLevel = Collections.min(roleService.findByUsers_Id(id).stream().map(RoleSmallDTO::getLevel).collect(Collectors.toList()));
Integer currentLevel = Collections.min(roleService.findByUsersId(SecurityUtils.getUserId()).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList()));
Integer optLevel = Collections.min(roleService.findByUsersId(id).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList()));
if (currentLevel > optLevel) {
throw new BadRequestException("角色权限不足");
......@@ -171,7 +173,7 @@ public class UserController {
* @param resources /
*/
private void checkLevel(User resources) {
Integer currentLevel = Collections.min(roleService.findByUsers_Id(SecurityUtils.getUserId()).stream().map(RoleSmallDTO::getLevel).collect(Collectors.toList()));
Integer currentLevel = Collections.min(roleService.findByUsersId(SecurityUtils.getUserId()).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList()));
Integer optLevel = roleService.findByRoles(resources.getRoles());
if (currentLevel > optLevel) {
throw new BadRequestException("角色权限不足");
......
package me.zhengjie.modules.system.service;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.service.dto.DeptDTO;
import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
import javax.servlet.http.HttpServletResponse;
......@@ -15,21 +15,65 @@ import java.util.Set;
*/
public interface DeptService {
List<DeptDTO> queryAll(DeptQueryCriteria criteria);
/**
* 查询所有数据
* @param criteria 条件
* @return /
*/
List<DeptDto> queryAll(DeptQueryCriteria criteria);
DeptDTO findById(Long id);
/**
* 根据ID查询
* @param id /
* @return /
*/
DeptDto findById(Long id);
DeptDTO create(Dept resources);
/**
* 创建
* @param resources /
* @return /
*/
DeptDto create(Dept resources);
/**
* 编辑
* @param resources /
*/
void update(Dept resources);
/**
* 删除
* @param id /
*/
void delete(Long id);
Object buildTree(List<DeptDTO> deptDTOS);
/**
* 构建树形数据
* @param deptDtos 原始数据
* @return /
*/
Object buildTree(List<DeptDto> deptDtos);
/**
* 根据PID查询
* @param pid /
* @return /
*/
List<Dept> findByPid(long pid);
/**
* 根据角色ID查询
* @param id /
* @return /
*/
Set<Dept> findByRoleIds(Long id);
void download(List<DeptDTO> queryAll, HttpServletResponse response) throws IOException;
/**
* 导出数据
* @param queryAll 待导出的数据
* @param response /
* @throws IOException /
*/
void download(List<DeptDto> queryAll, HttpServletResponse response) throws IOException;
}
\ No newline at end of file
package me.zhengjie.modules.system.service;
import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.service.dto.DictDetailDTO;
import me.zhengjie.modules.system.service.dto.DictDetailDto;
import me.zhengjie.modules.system.service.dto.DictDetailQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.Map;
......@@ -12,13 +12,37 @@ import java.util.Map;
*/
public interface DictDetailService {
DictDetailDTO findById(Long id);
/**
* 根据ID查询
* @param id /
* @return /
*/
DictDetailDto findById(Long id);
DictDetailDTO create(DictDetail resources);
/**
* 创建
* @param resources /
* @return /
*/
DictDetailDto create(DictDetail resources);
/**
* 编辑
* @param resources /
*/
void update(DictDetail resources);
/**
* 删除
* @param id /
*/
void delete(Long id);
Map queryAll(DictDetailQueryCriteria criteria, Pageable pageable);
/**
* 分页查询
* @param criteria 条件
* @param pageable 分页参数
* @return /
*/
Map<String,Object> queryAll(DictDetailQueryCriteria criteria, Pageable pageable);
}
\ No newline at end of file
package me.zhengjie.modules.system.service;
import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.service.dto.DictDTO;
import me.zhengjie.modules.system.service.dto.DictDto;
import me.zhengjie.modules.system.service.dto.DictQueryCriteria;
import org.springframework.data.domain.Pageable;
......@@ -16,17 +16,52 @@ import java.util.Map;
*/
public interface DictService {
Map<String,Object> queryAll(DictQueryCriteria dict, Pageable pageable);
/**
* 分页查询
* @param criteria 条件
* @param pageable 分页参数
* @return /
*/
Map<String,Object> queryAll(DictQueryCriteria criteria, Pageable pageable);
List<DictDTO> queryAll(DictQueryCriteria dict);
/**
* 查询全部数据
* @param dict /
* @return /
*/
List<DictDto> queryAll(DictQueryCriteria dict);
DictDTO findById(Long id);
/**
* 根据ID查询
* @param id /
* @return /
*/
DictDto findById(Long id);
DictDTO create(Dict resources);
/**
* 创建
* @param resources /
* @return /
*/
DictDto create(Dict resources);
/**
* 编辑
* @param resources /
*/
void update(Dict resources);
/**
* 删除
* @param id /
*/
void delete(Long id);
void download(List<DictDTO> queryAll, HttpServletResponse response) throws IOException;
/**
* 导出数据
* @param queryAll 待导出的数据
* @param response /
* @throws IOException /
*/
void download(List<DictDto> queryAll, HttpServletResponse response) throws IOException;
}
\ No newline at end of file
package me.zhengjie.modules.system.service;
import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.service.dto.JobDTO;
import me.zhengjie.modules.system.service.dto.JobDto;
import me.zhengjie.modules.system.service.dto.JobQueryCriteria;
import org.springframework.data.domain.Pageable;
......@@ -16,17 +16,52 @@ import java.util.Map;
*/
public interface JobService {
JobDTO findById(Long id);
/**
* 根据ID查询
* @param id /
* @return /
*/
JobDto findById(Long id);
JobDTO create(Job resources);
/**
* 创建
* @param resources /
* @return /
*/
JobDto create(Job resources);
/**
* 编辑
* @param resources /
*/
void update(Job resources);
/**
* 删除
* @param id /
*/
void delete(Long id);
/**
* 分页查询
* @param criteria 条件
* @param pageable 分页参数
* @return /
*/
Map<String,Object> queryAll(JobQueryCriteria criteria, Pageable pageable);
List<JobDTO> queryAll(JobQueryCriteria criteria);
/**
* 查询全部数据
* @param criteria /
* @return /
*/
List<JobDto> queryAll(JobQueryCriteria criteria);
void download(List<JobDTO> queryAll, HttpServletResponse response) throws IOException;
/**
* 导出数据
* @param queryAll 待导出的数据
* @param response /
* @throws IOException /
*/
void download(List<JobDto> queryAll, HttpServletResponse response) throws IOException;
}
\ No newline at end of file
package me.zhengjie.modules.system.service;
import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.service.dto.MenuDTO;
import me.zhengjie.modules.system.service.dto.MenuDto;
import me.zhengjie.modules.system.service.dto.MenuQueryCriteria;
import me.zhengjie.modules.system.service.dto.RoleSmallDTO;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
......@@ -17,29 +17,94 @@ import java.util.Set;
*/
public interface MenuService {
List<MenuDTO> queryAll(MenuQueryCriteria criteria);
MenuDTO findById(long id);
MenuDTO create(Menu resources);
/**
* 查询全部数据
* @param criteria 条件
* @return /
*/
List<MenuDto> queryAll(MenuQueryCriteria criteria);
/**
* 根据ID查询
* @param id /
* @return /
*/
MenuDto findById(long id);
/**
* 创建
* @param resources /
* @return /
*/
MenuDto create(Menu resources);
/**
* 编辑
* @param resources /
*/
void update(Menu resources);
/**
* 获取待删除的菜单
* @param menuList /
* @param menuSet /
* @return /
*/
Set<Menu> getDeleteMenus(List<Menu> menuList, Set<Menu> menuSet);
/**
* 获取菜单树
* @param menus /
* @return /
*/
Object getMenuTree(List<Menu> menus);
/**
* 根据pid查询
* @param pid /
* @return /
*/
List<Menu> findByPid(long pid);
Map<String,Object> buildTree(List<MenuDTO> menuDTOS);
List<MenuDTO> findByRoles(List<RoleSmallDTO> roles);
Object buildMenus(List<MenuDTO> byRoles);
/**
* 构建菜单树
* @param menuDtos 原始数据
* @return /
*/
Map<String,Object> buildTree(List<MenuDto> menuDtos);
/**
* 根据角色查询
* @param roles /
* @return /
*/
List<MenuDto> findByRoles(List<RoleSmallDto> roles);
/**
* 构建菜单树
* @param menuDtos /
* @return /
*/
Object buildMenus(List<MenuDto> menuDtos);
/**
* 根据ID查询
* @param id /
* @return /
*/
Menu findOne(Long id);
/**
* 删除
* @param menuSet /
*/
void delete(Set<Menu> menuSet);
void download(List<MenuDTO> queryAll, HttpServletResponse response) throws IOException;
/**
* 导出
* @param queryAll 待导出的数据
* @param response /
* @throws IOException /
*/
void download(List<MenuDto> queryAll, HttpServletResponse response) throws IOException;
}
package me.zhengjie.modules.system.service;
import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.service.dto.RoleDTO;
import me.zhengjie.modules.system.service.dto.RoleDto;
import me.zhengjie.modules.system.service.dto.RoleQueryCriteria;
import me.zhengjie.modules.system.service.dto.RoleSmallDTO;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
......@@ -17,27 +17,86 @@ import java.util.Set;
*/
public interface RoleService {
RoleDTO findById(long id);
/**
* 根据ID查询
* @param id /
* @return /
*/
RoleDto findById(long id);
RoleDTO create(Role resources);
/**
* 创建
* @param resources /
* @return /
*/
RoleDto create(Role resources);
/**
* 编辑
* @param resources /
*/
void update(Role resources);
/**
* 删除
* @param id /
*/
void delete(Long id);
List<RoleSmallDTO> findByUsers_Id(Long id);
/**
* 根据用户ID查询
* @param id 用户ID
* @return /
*/
List<RoleSmallDto> findByUsersId(Long id);
/**
* 根据角色查询角色级别
* @param roles /
* @return /
*/
Integer findByRoles(Set<Role> roles);
void updateMenu(Role resources, RoleDTO roleDTO);
/**
* 修改绑定的菜单
* @param resources /
* @param roleDTO /
*/
void updateMenu(Role resources, RoleDto roleDTO);
/**
* 解绑菜单
* @param id /
*/
void untiedMenu(Long id);
/**
* 不带条件分页查询
* @param pageable 分页参数
* @return /
*/
Object queryAll(Pageable pageable);
/**
* 待条件分页查询
* @param criteria 条件
* @param pageable 分页参数
* @return /
*/
Object queryAll(RoleQueryCriteria criteria, Pageable pageable);
List<RoleDTO> queryAll(RoleQueryCriteria criteria);
/**
* 查询全部
* @param criteria 条件
* @return /
*/
List<RoleDto> queryAll(RoleQueryCriteria criteria);
void download(List<RoleDTO> queryAll, HttpServletResponse response) throws IOException;
/**
* 导出数据
* @param queryAll 待导出的数据
* @param response /
* @throws IOException /
*/
void download(List<RoleDto> queryAll, HttpServletResponse response) throws IOException;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment