Skip to content

Commit

Permalink
v1.9 发布,详情查看发行版说明
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengjie committed May 18, 2019
1 parent 31e4a08 commit 343ce34
Show file tree
Hide file tree
Showing 28 changed files with 201 additions and 62 deletions.
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,20 @@
#### 系统预览
<table>
<tr>
<td><img src="https://i.loli.net/2018/12/22/5c1e10c781eec.png"/></td>
<td><img src="https://i.loli.net/2018/12/22/5c1e10c7890ab.png"/></td>
<td><img src="https://i.loli.net/2019/05/18/5cdf77fa8144d68788.png"/></td>
<td><img src="https://i.loli.net/2019/05/18/5cdf7763993e361778.png"/></td>
</tr>
<tr>
<td><img src="https://i.loli.net/2019/02/28/5c7795b707347.png"/></td>
<td><img src="https://i.loli.net/2018/12/22/5c1e10c7b089b.png"/></td>
<td><img src="https://i.loli.net/2019/05/18/5cdf7763971d453615.png"/></td>
<td><img src="https://i.loli.net/2019/05/18/5cdf77632e85a60423.png"/></td>
</tr>
<tr>
<td><img src="https://i.loli.net/2018/12/22/5c1e10c7b9c30.png"/></td>
<td><img src="https://i.loli.net/2018/12/22/5c1e10c7b7504.png"/></td>
<td><img src="https://i.loli.net/2019/05/18/5cdf77632b4b090165.png"/></td>
<td><img src="https://i.loli.net/2019/05/18/5cdf77639b1be47210.png"/></td>
</tr>
<tr>
<td><img src="https://i.loli.net/2018/12/22/5c1e10c7a9f7d.png"/></td>
<td><img src="https://i.imgur.com/FzVaAlS.png"/></td>
</tr>
<tr>
<td><img src="https://i.imgur.com/ah3X2HG.png"/></td>
<td><img src="https://i.loli.net/2019/05/18/5cdf77639929277783.png"/></td>
<td><img src="https://i.loli.net/2019/05/18/5cdf78969adc389599.png"/></td>
</tr>
</table>

Expand Down
2 changes: 1 addition & 1 deletion eladmin-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId>
<version>1.8</version>
<version>1.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions eladmin-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId>
<version>1.8</version>
<version>1.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-common</artifactId>
<version>1.8</version>
<version>1.9</version>
</dependency>

<!--模板引擎-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public Object getTables(String name, int[] startEnd) {
sql.append("order by table_name");
Query query = em.createNativeQuery(sql.toString());
query.setFirstResult(startEnd[0]);
query.setMaxResults(startEnd[1]);
query.setMaxResults(startEnd[1]-startEnd[0]);

System.out.println(sql.toString());
List<Object[]> result = query.getResultList();
Expand Down
4 changes: 2 additions & 2 deletions eladmin-logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId>
<version>1.8</version>
<version>1.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -15,7 +15,7 @@
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-common</artifactId>
<version>1.8</version>
<version>1.9</version>
</dependency>
</dependencies>
</project>
6 changes: 3 additions & 3 deletions eladmin-system/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId>
<version>1.8</version>
<version>1.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-generator</artifactId>
<version>1.8</version>
<version>1.9</version>
<exclusions>
<exclusion>
<groupId>me.zhengjie</groupId>
Expand All @@ -32,7 +32,7 @@
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-tools</artifactId>
<version>1.8</version>
<version>1.9</version>
</dependency>

<!--jwt-->
Expand Down
69 changes: 45 additions & 24 deletions eladmin-system/sql/eladmin.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Target Server Type : MYSQL
Target Server Version : 50562
File Encoding : 65001
Date: 2019-04-11 11:11:09
Date: 2019-05-18 11:18:44
*/

SET FOREIGN_KEY_CHECKS=0;
Expand All @@ -34,11 +34,6 @@ CREATE TABLE `alipay_config` (
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of alipay_config
-- ----------------------------
INSERT INTO `alipay_config` VALUES ('1', '2016091700532697', 'utf-8', 'JSON', 'https://openapi.alipaydev.com/gateway.do', 'http://api.auauz.net/api/aliPay/notify', 'MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5js8sInU10AJ0cAQ8UMMyXrQ+oHZEkVt5lBwsStmTJ7YikVYgbskx1YYEXTojRsWCb+SH/kDmDU4pK/u91SJ4KFCRMF2411piYuXU/jF96zKrADznYh/zAraqT6hvAIVtQAlMHN53nx16rLzZ/8jDEkaSwT7+HvHiS+7sxSojnu/3oV7BtgISoUNstmSe8WpWHOaWv19xyS+Mce9MY4BfseFhzTICUymUQdd/8hXA28/H6osUfAgsnxAKv7Wil3aJSgaJczWuflYOve0dJ3InZkhw5Cvr0atwpk8YKBQjy5CdkoHqvkOcIB+cYHXJKzOE5tqU7inSwVbHzOLQ3XbnAgMBAAECggEAVJp5eT0Ixg1eYSqFs9568WdetUNCSUchNxDBu6wxAbhUgfRUGZuJnnAll63OCTGGck+EGkFh48JjRcBpGoeoHLL88QXlZZbC/iLrea6gcDIhuvfzzOffe1RcZtDFEj9hlotg8dQj1tS0gy9pN9g4+EBH7zeu+fyv+qb2e/v1l6FkISXUjpkD7RLQr3ykjiiEw9BpeKb7j5s7Kdx1NNIzhkcQKNqlk8JrTGDNInbDM6inZfwwIO2R1DHinwdfKWkvOTODTYa2MoAvVMFT9Bec9FbLpoWp7ogv1JMV9svgrcF9XLzANZ/OQvkbe9TV9GWYvIbxN6qwQioKCWO4GPnCAQKBgQDgW5MgfhX8yjXqoaUy/d1VjI8dHeIyw8d+OBAYwaxRSlCfyQ+tieWcR2HdTzPca0T0GkWcKZm0ei5xRURgxt4DUDLXNh26HG0qObbtLJdu/AuBUuCqgOiLqJ2f1uIbrz6OZUHns+bT/jGW2Ws8+C13zTCZkZt9CaQsrp3QOGDx5wKBgQDTul39hp3ZPwGNFeZdkGoUoViOSd5Lhowd5wYMGAEXWRLlU8z+smT5v0POz9JnIbCRchIY2FAPKRdVTICzmPk2EPJFxYTcwaNbVqL6lN7J2IlXXMiit5QbiLauo55w7plwV6LQmKm9KV7JsZs5XwqF7CEovI7GevFzyD3w+uizAQKBgC3LY1eRhOlpWOIAhpjG6qOoohmeXOphvdmMlfSHq6WYFqbWwmV4rS5d/6LNpNdL6fItXqIGd8I34jzql49taCmi+A2nlR/E559j0mvM20gjGDIYeZUz5MOE8k+K6/IcrhcgofgqZ2ZED1ksHdB/E8DNWCswZl16V1FrfvjeWSNnAoGAMrBplCrIW5xz+J0Hm9rZKrs+AkK5D4fUv8vxbK/KgxZ2KaUYbNm0xv39c+PZUYuFRCz1HDGdaSPDTE6WeWjkMQd5mS6ikl9hhpqFRkyh0d0fdGToO9yLftQKOGE/q3XUEktI1XvXF0xyPwNgUCnq0QkpHyGVZPtGFxwXiDvpvgECgYA5PoB+nY8iDiRaJNko9w0hL4AeKogwf+4TbCw+KWVEn6jhuJa4LFTdSqp89PktQaoVpwv92el/AhYjWOl/jVCm122f9b7GyoelbjMNolToDwe5pF5RnSpEuDdLy9MfE8LnE3PlbE7E5BipQ3UjSebkgNboLHH/lNZA5qvEtvbfvQ==', 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAut9evKRuHJ/2QNfDlLwvN/S8l9hRAgPbb0u61bm4AtzaTGsLeMtScetxTWJnVvAVpMS9luhEJjt+Sbk5TNLArsgzzwARgaTKOLMT1TvWAK5EbHyI+eSrc3s7Awe1VYGwcubRFWDm16eQLv0k7iqiw+4mweHSz/wWyvBJVgwLoQ02btVtAQErCfSJCOmt0Q/oJQjj08YNRV4EKzB19+f5A+HQVAKy72dSybTzAK+3FPtTtNen/+b5wGeat7c32dhYHnGorPkPeXLtsqqUTp1su5fMfd4lElNdZaoCI7osZxWWUo17vBCZnyeXc9fk0qwD9mK6yRAxNbrY72Xx5VqIqwIDAQAB', 'http://api.auauz.net/api/aliPay/return', 'RSA2', '2088102176044281');

-- ----------------------------
-- Table structure for dept
-- ----------------------------
Expand Down Expand Up @@ -185,7 +180,7 @@ CREATE TABLE `log` (
`time` bigint(20) DEFAULT NULL,
`username` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4954 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=8176 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of log
Expand Down Expand Up @@ -256,7 +251,7 @@ CREATE TABLE `permission` (
`name` varchar(255) DEFAULT NULL COMMENT '名称',
`pid` int(11) NOT NULL COMMENT '上级权限',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of permission
Expand Down Expand Up @@ -327,7 +322,11 @@ CREATE TABLE `picture` (
`username` varchar(255) DEFAULT NULL COMMENT '用户名称',
`width` varchar(255) DEFAULT NULL COMMENT '图片宽度',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of picture
-- ----------------------------

-- ----------------------------
-- Table structure for qiniu_config
Expand Down Expand Up @@ -357,7 +356,11 @@ CREATE TABLE `qiniu_content` (
`update_time` datetime DEFAULT NULL COMMENT '上传或同步的时间',
`url` varchar(255) DEFAULT NULL COMMENT '文件url',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of qiniu_content
-- ----------------------------

-- ----------------------------
-- Table structure for quartz_job
Expand Down Expand Up @@ -399,7 +402,7 @@ CREATE TABLE `quartz_log` (
`params` varchar(255) DEFAULT NULL,
`time` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of quartz_log
Expand All @@ -415,14 +418,16 @@ CREATE TABLE `role` (
`name` varchar(255) NOT NULL COMMENT '名称',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`data_scope` varchar(255) DEFAULT NULL,
`level` int(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO `role` VALUES ('1', '2018-11-23 11:04:37', '管理员', '系统所有权', '全部');
INSERT INTO `role` VALUES ('2', '2018-11-23 13:09:06', '普通用户', '用于测试菜单与权限', '自定义');
INSERT INTO `role` VALUES ('1', '2018-11-23 11:04:37', '超级管理员', '系统所有权', '全部', '1');
INSERT INTO `role` VALUES ('2', '2018-11-23 13:09:06', '普通用户', '用于测试菜单与权限', '本级', '3');
INSERT INTO `role` VALUES ('4', '2019-05-13 14:16:15', '普通管理员', '普通管理员级别为2,使用该角色新增用户时只能赋予比普通管理员级别低的角色', '全部', '2');

-- ----------------------------
-- Table structure for roles_depts
Expand All @@ -440,7 +445,6 @@ CREATE TABLE `roles_depts` (
-- ----------------------------
-- Records of roles_depts
-- ----------------------------
INSERT INTO `roles_depts` VALUES ('2', '7');

-- ----------------------------
-- Table structure for roles_menus
Expand Down Expand Up @@ -497,9 +501,13 @@ INSERT INTO `roles_menus` VALUES ('3', '2');
INSERT INTO `roles_menus` VALUES ('4', '2');
INSERT INTO `roles_menus` VALUES ('5', '2');
INSERT INTO `roles_menus` VALUES ('6', '2');
INSERT INTO `roles_menus` VALUES ('7', '2');
INSERT INTO `roles_menus` VALUES ('8', '2');
INSERT INTO `roles_menus` VALUES ('9', '2');
INSERT INTO `roles_menus` VALUES ('10', '2');
INSERT INTO `roles_menus` VALUES ('11', '2');
INSERT INTO `roles_menus` VALUES ('12', '2');
INSERT INTO `roles_menus` VALUES ('14', '2');
INSERT INTO `roles_menus` VALUES ('15', '2');
INSERT INTO `roles_menus` VALUES ('16', '2');
INSERT INTO `roles_menus` VALUES ('17', '2');
Expand All @@ -510,12 +518,18 @@ INSERT INTO `roles_menus` VALUES ('22', '2');
INSERT INTO `roles_menus` VALUES ('23', '2');
INSERT INTO `roles_menus` VALUES ('24', '2');
INSERT INTO `roles_menus` VALUES ('27', '2');
INSERT INTO `roles_menus` VALUES ('28', '2');
INSERT INTO `roles_menus` VALUES ('30', '2');
INSERT INTO `roles_menus` VALUES ('32', '2');
INSERT INTO `roles_menus` VALUES ('33', '2');
INSERT INTO `roles_menus` VALUES ('34', '2');
INSERT INTO `roles_menus` VALUES ('35', '2');
INSERT INTO `roles_menus` VALUES ('36', '2');
INSERT INTO `roles_menus` VALUES ('37', '2');
INSERT INTO `roles_menus` VALUES ('38', '2');
INSERT INTO `roles_menus` VALUES ('39', '2');
INSERT INTO `roles_menus` VALUES ('1', '4');
INSERT INTO `roles_menus` VALUES ('2', '4');

-- ----------------------------
-- Table structure for roles_permissions
Expand All @@ -534,17 +548,24 @@ CREATE TABLE `roles_permissions` (
-- Records of roles_permissions
-- ----------------------------
INSERT INTO `roles_permissions` VALUES ('1', '1');
INSERT INTO `roles_permissions` VALUES ('4', '2');
INSERT INTO `roles_permissions` VALUES ('2', '3');
INSERT INTO `roles_permissions` VALUES ('2', '4');
INSERT INTO `roles_permissions` VALUES ('4', '3');
INSERT INTO `roles_permissions` VALUES ('4', '4');
INSERT INTO `roles_permissions` VALUES ('4', '5');
INSERT INTO `roles_permissions` VALUES ('4', '6');
INSERT INTO `roles_permissions` VALUES ('2', '8');
INSERT INTO `roles_permissions` VALUES ('2', '14');
INSERT INTO `roles_permissions` VALUES ('2', '20');
INSERT INTO `roles_permissions` VALUES ('2', '23');
INSERT INTO `roles_permissions` VALUES ('2', '24');
INSERT INTO `roles_permissions` VALUES ('2', '25');
INSERT INTO `roles_permissions` VALUES ('2', '26');
INSERT INTO `roles_permissions` VALUES ('2', '30');
INSERT INTO `roles_permissions` VALUES ('2', '36');
INSERT INTO `roles_permissions` VALUES ('2', '41');
INSERT INTO `roles_permissions` VALUES ('2', '46');
INSERT INTO `roles_permissions` VALUES ('2', '51');

-- ----------------------------
-- Table structure for user
Expand Down Expand Up @@ -575,8 +596,8 @@ CREATE TABLE `user` (
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('1', 'https://i.loli.net/2019/04/04/5ca5b971e1548.jpeg', '2018-08-23 09:11:56', '[email protected]', '1', 'e10adc3949ba59abbe56e057f20f883e', 'admin', '2019-04-04 16:00:46', '2', '18888888888', '11');
INSERT INTO `user` VALUES ('3', 'https://aurora-1255840532.cos.ap-chengdu.myqcloud.com/8918a306ea314404835a9196585c4b75.jpeg', '2018-12-27 20:05:26', '[email protected]', '1', 'e10adc3949ba59abbe56e057f20f883e', 'test', '2019-04-01 09:15:24', '2', '17777777777', '12');
INSERT INTO `user` VALUES ('5', 'https://aurora-1255840532.cos.ap-chengdu.myqcloud.com/8918a306ea314404835a9196585c4b75.jpeg', '2019-04-02 10:07:12', '[email protected]', '1', 'e10adc3949ba59abbe56e057f20f883e', 'hr', null, '11', '15555555555', '8');
INSERT INTO `user` VALUES ('3', 'https://i.loli.net/2019/04/04/5ca5b971e1548.jpeg', '2018-12-27 20:05:26', '[email protected]', '1', 'e10adc3949ba59abbe56e057f20f883e', 'test', '2019-04-01 09:15:24', '2', '17777777777', '12');
INSERT INTO `user` VALUES ('5', 'https://i.loli.net/2019/04/04/5ca5b971e1548.jpeg', '2019-04-02 10:07:12', '[email protected]', '1', 'e10adc3949ba59abbe56e057f20f883e', 'hr', null, '11', '15555555555', '8');

-- ----------------------------
-- Table structure for users_roles
Expand All @@ -596,7 +617,7 @@ CREATE TABLE `users_roles` (
-- ----------------------------
INSERT INTO `users_roles` VALUES ('1', '1');
INSERT INTO `users_roles` VALUES ('3', '2');
INSERT INTO `users_roles` VALUES ('5', '2');
INSERT INTO `users_roles` VALUES ('5', '4');

-- ----------------------------
-- Table structure for verification_code
Expand All @@ -613,6 +634,10 @@ CREATE TABLE `verification_code` (
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of verification_code
-- ----------------------------

-- ----------------------------
-- Table structure for visits
-- ----------------------------
Expand All @@ -626,8 +651,4 @@ CREATE TABLE `visits` (
`week_day` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_11aksgq87euk9bcyeesfs4vtp` (`date`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of visits
-- ----------------------------
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public class Role implements Serializable {
@Column(name = "data_scope")
private String dataScope = "本级";

// 数值越小,级别越大
@Column(name = "level")
private Integer level = 3;

@Column
private String remark;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
package me.zhengjie.modules.system.rest;

import cn.hutool.core.lang.Dict;
import me.zhengjie.aop.log.Log;
import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.RoleDTO;
import me.zhengjie.modules.system.service.query.RoleQueryService;
import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.web.PageableDefault;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

/**
* @author jie
* @date 2018-12-03
Expand All @@ -30,6 +40,11 @@ public class RoleController {

private static final String ENTITY_NAME = "role";

/**
* 获取单个role
* @param id
* @return
*/
@GetMapping(value = "/roles/{id}")
@PreAuthorize("hasAnyRole('ADMIN','ROLES_ALL','ROLES_SELECT')")
public ResponseEntity getRoles(@PathVariable Long id){
Expand All @@ -42,8 +57,9 @@ public ResponseEntity getRoles(@PathVariable Long id){
*/
@GetMapping(value = "/roles/all")
@PreAuthorize("hasAnyRole('ADMIN','ROLES_ALL','USER_ALL','USER_CREATE','USER_EDIT')")
public ResponseEntity getAll(){
return new ResponseEntity(roleQueryService.queryAll(),HttpStatus.OK);
public ResponseEntity getAll(@PageableDefault(value = 2000, sort = {"level"}, direction = Sort.Direction.ASC) Pageable pageable){

return new ResponseEntity(roleQueryService.queryAll(pageable),HttpStatus.OK);
}

@Log("查询角色")
Expand All @@ -53,6 +69,12 @@ public ResponseEntity getRoles(@RequestParam(required = false) String name, Pag
return new ResponseEntity(roleQueryService.queryAll(name,pageable),HttpStatus.OK);
}

@GetMapping(value = "/roles/level")
public ResponseEntity getLevel(){
List<Integer> levels = roleService.findByUsers_Id(SecurityUtils.getUserId()).stream().map(Role::getLevel).collect(Collectors.toList());
return new ResponseEntity(Dict.create().set("level", Collections.min(levels)),HttpStatus.OK);
}

@Log("新增角色")
@PostMapping(value = "/roles")
@PreAuthorize("hasAnyRole('ADMIN','ROLES_ALL','ROLES_CREATE')")
Expand Down
Loading

0 comments on commit 343ce34

Please sign in to comment.