refactor: 统一命名
This commit is contained in:
+7
-7
@@ -30,25 +30,25 @@ public class SystemDeptController {
|
|||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check('dept:list')")
|
@PreAuthorize("@el.check('dept:list')")
|
||||||
public void exportDept(HttpServletResponse response, QuerySystemDeptArgs criteria) throws Exception {
|
public void exportDept(HttpServletResponse response, QuerySystemDeptArgs criteria) throws Exception {
|
||||||
systemDeptService.downloadDeptExcel(systemDeptService.describeDeptList(criteria, false), response);
|
systemDeptService.downloadDeptExcel(systemDeptService.queryDeptList(criteria, false), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询部门")
|
@ApiOperation("查询部门")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('user:list','dept:list')")
|
@PreAuthorize("@el.check('user:list','dept:list')")
|
||||||
public ResponseEntity<CsResultVo<List<SystemDeptTb>>> describeDeptPage(QuerySystemDeptArgs criteria) throws Exception {
|
public ResponseEntity<CsResultVo<List<SystemDeptTb>>> queryDeptPage(QuerySystemDeptArgs criteria) throws Exception {
|
||||||
List<SystemDeptTb> depts = systemDeptService.describeDeptList(criteria, true);
|
List<SystemDeptTb> depts = systemDeptService.queryDeptList(criteria, true);
|
||||||
return new ResponseEntity<>(PageUtil.toPage(depts), HttpStatus.OK);
|
return new ResponseEntity<>(PageUtil.toPage(depts), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询部门:根据ID获取同级与上级数据")
|
@ApiOperation("查询部门:根据ID获取同级与上级数据")
|
||||||
@PostMapping("/describeDeptSuperiorTree")
|
@PostMapping("/queryDeptSuperiorTree")
|
||||||
@PreAuthorize("@el.check('user:list','dept:list')")
|
@PreAuthorize("@el.check('user:list','dept:list')")
|
||||||
public ResponseEntity<Object> describeDeptSuperiorTree(@RequestBody List<Long> ids, @RequestParam(defaultValue = "false") Boolean exclude) {
|
public ResponseEntity<Object> queryDeptSuperiorTree(@RequestBody List<Long> ids, @RequestParam(defaultValue = "false") Boolean exclude) {
|
||||||
Set<SystemDeptTb> deptSet = new LinkedHashSet<>();
|
Set<SystemDeptTb> deptSet = new LinkedHashSet<>();
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
SystemDeptTb dept = systemDeptService.describeDeptById(id);
|
SystemDeptTb dept = systemDeptService.queryDeptById(id);
|
||||||
List<SystemDeptTb> depts = systemDeptService.describeSuperiorDeptListByPid(dept, new ArrayList<>());
|
List<SystemDeptTb> depts = systemDeptService.querySuperiorDeptListByPid(dept, new ArrayList<>());
|
||||||
if (exclude) {
|
if (exclude) {
|
||||||
for (SystemDeptTb data : depts) {
|
for (SystemDeptTb data : depts) {
|
||||||
if (data.getId().equals(dept.getPid())) {
|
if (data.getId().equals(dept.getPid())) {
|
||||||
|
|||||||
+3
-3
@@ -31,14 +31,14 @@ public class SystemDictController {
|
|||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check('dict:list')")
|
@PreAuthorize("@el.check('dict:list')")
|
||||||
public void exportDict(HttpServletResponse response, QuerySystemDictArgs criteria) throws IOException {
|
public void exportDict(HttpServletResponse response, QuerySystemDictArgs criteria) throws IOException {
|
||||||
systemDictService.downloadDictExcel(systemDictService.describeDictList(criteria), response);
|
systemDictService.downloadDictExcel(systemDictService.queryDictList(criteria), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询字典")
|
@ApiOperation("查询字典")
|
||||||
@PostMapping(value = "/queryAllDict")
|
@PostMapping(value = "/queryAllDict")
|
||||||
@PreAuthorize("@el.check('dict:list')")
|
@PreAuthorize("@el.check('dict:list')")
|
||||||
public ResponseEntity<List<SystemDictTb>> queryAllDict() {
|
public ResponseEntity<List<SystemDictTb>> queryAllDict() {
|
||||||
return new ResponseEntity<>(systemDictService.describeDictList(new QuerySystemDictArgs()), HttpStatus.OK);
|
return new ResponseEntity<>(systemDictService.queryDictList(new QuerySystemDictArgs()), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询字典")
|
@ApiOperation("查询字典")
|
||||||
@@ -46,7 +46,7 @@ public class SystemDictController {
|
|||||||
@PreAuthorize("@el.check('dict:list')")
|
@PreAuthorize("@el.check('dict:list')")
|
||||||
public ResponseEntity<CsResultVo<List<SystemDictTb>>> queryDict(QuerySystemDictArgs criteria) {
|
public ResponseEntity<CsResultVo<List<SystemDictTb>>> queryDict(QuerySystemDictArgs criteria) {
|
||||||
Page<SystemDictTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
Page<SystemDictTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
||||||
return new ResponseEntity<>(systemDictService.describeDictPage(criteria, page), HttpStatus.OK);
|
return new ResponseEntity<>(systemDictService.queryDictPage(criteria, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("新增字典")
|
@ApiOperation("新增字典")
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class SystemDictDetailController {
|
|||||||
String[] names = dictName.split("[,,]");
|
String[] names = dictName.split("[,,]");
|
||||||
Map<String, List<SystemDictDetailTb>> dictMap = new HashMap<>(16);
|
Map<String, List<SystemDictDetailTb>> dictMap = new HashMap<>(16);
|
||||||
for (String name : names) {
|
for (String name : names) {
|
||||||
dictMap.put(name, systemDictDetailService.describeDictDetailListByName(name));
|
dictMap.put(name, systemDictDetailService.queryDictDetailListByName(name));
|
||||||
}
|
}
|
||||||
return new ResponseEntity<>(dictMap, HttpStatus.OK);
|
return new ResponseEntity<>(dictMap, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -25,9 +25,9 @@ public class SystemEmailController {
|
|||||||
private final SystemEmailService systemEmailService;
|
private final SystemEmailService systemEmailService;
|
||||||
|
|
||||||
@ApiOperation("查询配置")
|
@ApiOperation("查询配置")
|
||||||
@PostMapping(value = "/describeEmailConfig")
|
@PostMapping(value = "/queryEmailConfig")
|
||||||
public ResponseEntity<SystemEmailConfigTb> describeEmailConfig() {
|
public ResponseEntity<SystemEmailConfigTb> queryEmailConfig() {
|
||||||
return new ResponseEntity<>(systemEmailService.describeEmailConfig(), HttpStatus.OK);
|
return new ResponseEntity<>(systemEmailService.queryEmailConfig(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("配置邮件")
|
@ApiOperation("配置邮件")
|
||||||
|
|||||||
+2
-2
@@ -32,7 +32,7 @@ public class SystemJobController {
|
|||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check('job:list')")
|
@PreAuthorize("@el.check('job:list')")
|
||||||
public void exportJob(HttpServletResponse response, QuerySystemJobArgs criteria) throws IOException {
|
public void exportJob(HttpServletResponse response, QuerySystemJobArgs criteria) throws IOException {
|
||||||
systemJobService.downloadJobExcel(systemJobService.describeJobList(criteria), response);
|
systemJobService.downloadJobExcel(systemJobService.queryJobList(criteria), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询岗位")
|
@ApiOperation("查询岗位")
|
||||||
@@ -40,7 +40,7 @@ public class SystemJobController {
|
|||||||
@PreAuthorize("@el.check('job:list','user:list')")
|
@PreAuthorize("@el.check('job:list','user:list')")
|
||||||
public ResponseEntity<CsResultVo<List<SystemJobTb>>> queryJob(QuerySystemJobArgs criteria) {
|
public ResponseEntity<CsResultVo<List<SystemJobTb>>> queryJob(QuerySystemJobArgs criteria) {
|
||||||
Page<SystemJobTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
Page<SystemJobTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
||||||
return new ResponseEntity<>(systemJobService.describeJobPage(criteria, page), HttpStatus.OK);
|
return new ResponseEntity<>(systemJobService.queryJobPage(criteria, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("新增岗位")
|
@ApiOperation("新增岗位")
|
||||||
|
|||||||
+2
-2
@@ -34,14 +34,14 @@ public class SystemLocalStorageController {
|
|||||||
@PreAuthorize("@el.check('storage:list')")
|
@PreAuthorize("@el.check('storage:list')")
|
||||||
public ResponseEntity<CsResultVo<List<SystemLocalStorageTb>>> queryFile(QuerySystemLocalStorageArgs criteria) {
|
public ResponseEntity<CsResultVo<List<SystemLocalStorageTb>>> queryFile(QuerySystemLocalStorageArgs criteria) {
|
||||||
Page<SystemLocalStorageTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
Page<SystemLocalStorageTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
||||||
return new ResponseEntity<>(localStorageService.describeLocalStoragePage(criteria, page), HttpStatus.OK);
|
return new ResponseEntity<>(localStorageService.queryLocalStoragePage(criteria, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("导出数据")
|
@ApiOperation("导出数据")
|
||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check('storage:list')")
|
@PreAuthorize("@el.check('storage:list')")
|
||||||
public void exportFile(HttpServletResponse response, QuerySystemLocalStorageArgs criteria) throws IOException {
|
public void exportFile(HttpServletResponse response, QuerySystemLocalStorageArgs criteria) throws IOException {
|
||||||
localStorageService.downloadExcel(localStorageService.describeLocalStorageList(criteria), response);
|
localStorageService.downloadExcel(localStorageService.queryLocalStorageList(criteria), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("上传文件")
|
@ApiOperation("上传文件")
|
||||||
|
|||||||
+19
-19
@@ -35,32 +35,32 @@ public class SystemMenuController {
|
|||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check('menu:list')")
|
@PreAuthorize("@el.check('menu:list')")
|
||||||
public void exportMenu(HttpServletResponse response, QuerySystemMenuArgs criteria) throws Exception {
|
public void exportMenu(HttpServletResponse response, QuerySystemMenuArgs criteria) throws Exception {
|
||||||
systemMenuService.downloadMenuExcel(systemMenuService.describeMenuList(criteria, false), response);
|
systemMenuService.downloadMenuExcel(systemMenuService.queryMenuList(criteria, false), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/buildMenus")
|
@PostMapping(value = "/buildMenus")
|
||||||
@ApiOperation("获取前端所需菜单")
|
@ApiOperation("获取前端所需菜单")
|
||||||
public ResponseEntity<List<SystemMenuVo>> buildMenus() {
|
public ResponseEntity<List<SystemMenuVo>> buildMenus() {
|
||||||
List<SystemMenuTb> menuList = systemMenuService.describeMenuListByUserId(SecurityHelper.getCurrentUserId());
|
List<SystemMenuTb> menuList = systemMenuService.queryMenuListByUserId(SecurityHelper.getCurrentUserId());
|
||||||
List<SystemMenuTb> menus = systemMenuService.buildMenuTree(menuList);
|
List<SystemMenuTb> menus = systemMenuService.buildMenuTree(menuList);
|
||||||
return new ResponseEntity<>(systemMenuService.buildMenuVo(menus), HttpStatus.OK);
|
return new ResponseEntity<>(systemMenuService.buildMenuVo(menus), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("返回全部的菜单")
|
@ApiOperation("返回全部的菜单")
|
||||||
@PostMapping(value = "/describeMenuListByPid")
|
@PostMapping(value = "/queryMenuListByPid")
|
||||||
@PreAuthorize("@el.check('menu:list','roles:list')")
|
@PreAuthorize("@el.check('menu:list','roles:list')")
|
||||||
public ResponseEntity<List<SystemMenuTb>> describeMenuListByPid(@RequestParam Long pid) {
|
public ResponseEntity<List<SystemMenuTb>> queryMenuListByPid(@RequestParam Long pid) {
|
||||||
return new ResponseEntity<>(systemMenuService.describeMenuListByPid(pid), HttpStatus.OK);
|
return new ResponseEntity<>(systemMenuService.queryMenuListByPid(pid), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("根据菜单ID返回所有子节点ID,包含自身ID")
|
@ApiOperation("根据菜单ID返回所有子节点ID,包含自身ID")
|
||||||
@PostMapping(value = "/describeChildMenuSet")
|
@PostMapping(value = "/queryChildMenuSet")
|
||||||
@PreAuthorize("@el.check('menu:list','roles:list')")
|
@PreAuthorize("@el.check('menu:list','roles:list')")
|
||||||
public ResponseEntity<Object> describeChildMenuSet(@RequestParam Long id) {
|
public ResponseEntity<Object> queryChildMenuSet(@RequestParam Long id) {
|
||||||
Set<SystemMenuTb> menuSet = new HashSet<>();
|
Set<SystemMenuTb> menuSet = new HashSet<>();
|
||||||
List<SystemMenuTb> menuList = systemMenuService.describeMenuListByPid(id);
|
List<SystemMenuTb> menuList = systemMenuService.queryMenuListByPid(id);
|
||||||
menuSet.add(systemMenuService.describeMenuById(id));
|
menuSet.add(systemMenuService.queryMenuById(id));
|
||||||
menuSet = systemMenuService.describeChildMenuSet(menuList, menuSet);
|
menuSet = systemMenuService.queryChildMenuSet(menuList, menuSet);
|
||||||
Set<Long> ids = menuSet.stream().map(SystemMenuTb::getId).collect(Collectors.toSet());
|
Set<Long> ids = menuSet.stream().map(SystemMenuTb::getId).collect(Collectors.toSet());
|
||||||
return new ResponseEntity<>(ids, HttpStatus.OK);
|
return new ResponseEntity<>(ids, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -69,19 +69,19 @@ public class SystemMenuController {
|
|||||||
@ApiOperation("查询菜单")
|
@ApiOperation("查询菜单")
|
||||||
@PreAuthorize("@el.check('menu:list')")
|
@PreAuthorize("@el.check('menu:list')")
|
||||||
public ResponseEntity<CsResultVo<List<SystemMenuTb>>> queryMenu(QuerySystemMenuArgs criteria) throws Exception {
|
public ResponseEntity<CsResultVo<List<SystemMenuTb>>> queryMenu(QuerySystemMenuArgs criteria) throws Exception {
|
||||||
List<SystemMenuTb> menuList = systemMenuService.describeMenuList(criteria, true);
|
List<SystemMenuTb> menuList = systemMenuService.queryMenuList(criteria, true);
|
||||||
return new ResponseEntity<>(PageUtil.toPage(menuList), HttpStatus.OK);
|
return new ResponseEntity<>(PageUtil.toPage(menuList), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询菜单:根据ID获取同级与上级数据")
|
@ApiOperation("查询菜单:根据ID获取同级与上级数据")
|
||||||
@PostMapping("/describeMenuSuperior")
|
@PostMapping("/queryMenuSuperior")
|
||||||
@PreAuthorize("@el.check('menu:list')")
|
@PreAuthorize("@el.check('menu:list')")
|
||||||
public ResponseEntity<List<SystemMenuTb>> describeMenuSuperior(@RequestBody List<Long> ids) {
|
public ResponseEntity<List<SystemMenuTb>> queryMenuSuperior(@RequestBody List<Long> ids) {
|
||||||
Set<SystemMenuTb> menus = new LinkedHashSet<>();
|
Set<SystemMenuTb> menus = new LinkedHashSet<>();
|
||||||
if (CollectionUtil.isNotEmpty(ids)) {
|
if (CollectionUtil.isNotEmpty(ids)) {
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
SystemMenuTb menu = systemMenuService.describeMenuById(id);
|
SystemMenuTb menu = systemMenuService.queryMenuById(id);
|
||||||
List<SystemMenuTb> menuList = systemMenuService.describeSuperiorMenuList(menu, new ArrayList<>());
|
List<SystemMenuTb> menuList = systemMenuService.querySuperiorMenuList(menu, new ArrayList<>());
|
||||||
for (SystemMenuTb data : menuList) {
|
for (SystemMenuTb data : menuList) {
|
||||||
if (data.getId().equals(menu.getPid())) {
|
if (data.getId().equals(menu.getPid())) {
|
||||||
data.setSubCount(data.getSubCount() - 1);
|
data.setSubCount(data.getSubCount() - 1);
|
||||||
@@ -93,7 +93,7 @@ public class SystemMenuController {
|
|||||||
menus = menus.stream().filter(i -> !ids.contains(i.getId())).collect(Collectors.toSet());
|
menus = menus.stream().filter(i -> !ids.contains(i.getId())).collect(Collectors.toSet());
|
||||||
return new ResponseEntity<>(systemMenuService.buildMenuTree(new ArrayList<>(menus)), HttpStatus.OK);
|
return new ResponseEntity<>(systemMenuService.buildMenuTree(new ArrayList<>(menus)), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
return new ResponseEntity<>(systemMenuService.describeMenuListByPid(null), HttpStatus.OK);
|
return new ResponseEntity<>(systemMenuService.queryMenuListByPid(null), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("新增菜单")
|
@ApiOperation("新增菜单")
|
||||||
@@ -121,9 +121,9 @@ public class SystemMenuController {
|
|||||||
public ResponseEntity<Object> removeMenuByIds(@RequestBody Set<Long> ids) {
|
public ResponseEntity<Object> removeMenuByIds(@RequestBody Set<Long> ids) {
|
||||||
Set<SystemMenuTb> menuSet = new HashSet<>();
|
Set<SystemMenuTb> menuSet = new HashSet<>();
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
List<SystemMenuTb> menuList = systemMenuService.describeMenuListByPid(id);
|
List<SystemMenuTb> menuList = systemMenuService.queryMenuListByPid(id);
|
||||||
menuSet.add(systemMenuService.describeMenuById(id));
|
menuSet.add(systemMenuService.queryMenuById(id));
|
||||||
menuSet = systemMenuService.describeChildMenuSet(menuList, menuSet);
|
menuSet = systemMenuService.queryChildMenuSet(menuList, menuSet);
|
||||||
}
|
}
|
||||||
systemMenuService.removeMenuByIds(menuSet);
|
systemMenuService.removeMenuByIds(menuSet);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
|||||||
+3
-3
@@ -19,10 +19,10 @@ public class SystemMonitorController {
|
|||||||
|
|
||||||
private final SystemMonitorService serverService;
|
private final SystemMonitorService serverService;
|
||||||
|
|
||||||
@PostMapping(value = "/describeServerMonitorInfo")
|
@PostMapping(value = "/queryServerMonitorInfo")
|
||||||
@ApiOperation("查询服务监控")
|
@ApiOperation("查询服务监控")
|
||||||
@PreAuthorize("@el.check('monitor:list')")
|
@PreAuthorize("@el.check('monitor:list')")
|
||||||
public ResponseEntity<Object> describeServerMonitorInfo() {
|
public ResponseEntity<Object> queryServerMonitorInfo() {
|
||||||
return new ResponseEntity<>(serverService.describeServerMonitorInfo(), HttpStatus.OK);
|
return new ResponseEntity<>(serverService.queryServerMonitorInfo(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -32,14 +32,14 @@ public class SystemOnlineController {
|
|||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check()")
|
@PreAuthorize("@el.check()")
|
||||||
public ResponseEntity<CsResultVo<List<SystemUserOnlineVo>>> queryOnlineUser(String username, Pageable pageable) {
|
public ResponseEntity<CsResultVo<List<SystemUserOnlineVo>>> queryOnlineUser(String username, Pageable pageable) {
|
||||||
return new ResponseEntity<>(systemUserOnlineApi.describeUserOnlineModelPage(username, pageable), HttpStatus.OK);
|
return new ResponseEntity<>(systemUserOnlineApi.queryUserOnlineModelPage(username, pageable), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("导出数据")
|
@ApiOperation("导出数据")
|
||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check()")
|
@PreAuthorize("@el.check()")
|
||||||
public void exportOnlineUser(HttpServletResponse response, String username) throws IOException {
|
public void exportOnlineUser(HttpServletResponse response, String username) throws IOException {
|
||||||
systemUserOnlineService.downloadUserOnlineModelExcel(systemUserOnlineApi.describeUserOnlineModelListByUsername(username), response);
|
systemUserOnlineService.downloadUserOnlineModelExcel(systemUserOnlineApi.queryUserOnlineModelListByUsername(username), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("踢出用户")
|
@ApiOperation("踢出用户")
|
||||||
|
|||||||
+5
-5
@@ -36,9 +36,9 @@ public class SystemQiniuController {
|
|||||||
private final SystemQiniuConfigService qiNiuConfigService;
|
private final SystemQiniuConfigService qiNiuConfigService;
|
||||||
|
|
||||||
@ApiOperation("查询七牛云存储配置")
|
@ApiOperation("查询七牛云存储配置")
|
||||||
@PostMapping(value = "/describeQiniuConfig")
|
@PostMapping(value = "/queryQiniuConfig")
|
||||||
public ResponseEntity<SystemQiniuConfigTb> describeQiniuConfig() {
|
public ResponseEntity<SystemQiniuConfigTb> queryQiniuConfig() {
|
||||||
return new ResponseEntity<>(qiNiuConfigService.describeQiniuConfig(), HttpStatus.OK);
|
return new ResponseEntity<>(qiNiuConfigService.queryQiniuConfig(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("配置七牛云存储")
|
@ApiOperation("配置七牛云存储")
|
||||||
@@ -52,14 +52,14 @@ public class SystemQiniuController {
|
|||||||
@ApiOperation("导出数据")
|
@ApiOperation("导出数据")
|
||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
public void exportQiNiu(HttpServletResponse response, QuerySystemQiniuArgs criteria) throws IOException {
|
public void exportQiNiu(HttpServletResponse response, QuerySystemQiniuArgs criteria) throws IOException {
|
||||||
qiniuContentService.downloadExcel(qiniuContentService.describeQiniuContentList(criteria), response);
|
qiniuContentService.downloadExcel(qiniuContentService.queryQiniuContentList(criteria), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询文件")
|
@ApiOperation("查询文件")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResponseEntity<CsResultVo<List<SystemQiniuContentTb>>> queryQiNiu(QuerySystemQiniuArgs criteria) {
|
public ResponseEntity<CsResultVo<List<SystemQiniuContentTb>>> queryQiNiu(QuerySystemQiniuArgs criteria) {
|
||||||
Page<SystemQiniuContentTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
Page<SystemQiniuContentTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
||||||
return new ResponseEntity<>(qiniuContentService.describeQiniuContentPage(criteria, page), HttpStatus.OK);
|
return new ResponseEntity<>(qiniuContentService.queryQiniuContentPage(criteria, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("上传文件")
|
@ApiOperation("上传文件")
|
||||||
|
|||||||
+4
-4
@@ -39,21 +39,21 @@ public class SystemQuartzJobController {
|
|||||||
@PreAuthorize("@el.check('timing:list')")
|
@PreAuthorize("@el.check('timing:list')")
|
||||||
public ResponseEntity<CsResultVo<List<SystemQuartzJobTb>>> queryQuartzJob(QuerySystemQuartzJobArgs criteria) {
|
public ResponseEntity<CsResultVo<List<SystemQuartzJobTb>>> queryQuartzJob(QuerySystemQuartzJobArgs criteria) {
|
||||||
Page<SystemQuartzJobTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
Page<SystemQuartzJobTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
||||||
return new ResponseEntity<>(systemQuartzJobService.describeQuartzJobPage(criteria, page), HttpStatus.OK);
|
return new ResponseEntity<>(systemQuartzJobService.queryQuartzJobPage(criteria, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("导出任务数据")
|
@ApiOperation("导出任务数据")
|
||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check('timing:list')")
|
@PreAuthorize("@el.check('timing:list')")
|
||||||
public void exportQuartzJob(HttpServletResponse response, QuerySystemQuartzJobArgs criteria) throws IOException {
|
public void exportQuartzJob(HttpServletResponse response, QuerySystemQuartzJobArgs criteria) throws IOException {
|
||||||
systemQuartzJobService.downloadQuartzJobExcel(systemQuartzJobService.describeQuartzJobList(criteria), response);
|
systemQuartzJobService.downloadQuartzJobExcel(systemQuartzJobService.queryQuartzJobList(criteria), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("导出日志数据")
|
@ApiOperation("导出日志数据")
|
||||||
@GetMapping(value = "/logs/download")
|
@GetMapping(value = "/logs/download")
|
||||||
@PreAuthorize("@el.check('timing:list')")
|
@PreAuthorize("@el.check('timing:list')")
|
||||||
public void exportQuartzJobLog(HttpServletResponse response, QuerySystemQuartzJobArgs criteria) throws IOException {
|
public void exportQuartzJobLog(HttpServletResponse response, QuerySystemQuartzJobArgs criteria) throws IOException {
|
||||||
systemQuartzJobService.downloadQuartzLogExcel(systemQuartzJobService.describeQuartzLogList(criteria), response);
|
systemQuartzJobService.downloadQuartzLogExcel(systemQuartzJobService.queryQuartzLogList(criteria), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询任务执行日志")
|
@ApiOperation("查询任务执行日志")
|
||||||
@@ -61,7 +61,7 @@ public class SystemQuartzJobController {
|
|||||||
@PreAuthorize("@el.check('timing:list')")
|
@PreAuthorize("@el.check('timing:list')")
|
||||||
public ResponseEntity<CsResultVo<List<SystemQuartzLogTb>>> queryQuartzJobLog(QuerySystemQuartzJobArgs criteria) {
|
public ResponseEntity<CsResultVo<List<SystemQuartzLogTb>>> queryQuartzJobLog(QuerySystemQuartzJobArgs criteria) {
|
||||||
Page<SystemQuartzLogTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
Page<SystemQuartzLogTb> page = new Page<>(criteria.getPage(), criteria.getSize());
|
||||||
return new ResponseEntity<>(systemQuartzJobService.describeQuartzLogPage(criteria, page), HttpStatus.OK);
|
return new ResponseEntity<>(systemQuartzJobService.queryQuartzLogPage(criteria, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("新增定时任务")
|
@ApiOperation("新增定时任务")
|
||||||
|
|||||||
+12
-12
@@ -34,37 +34,37 @@ public class SystemRoleController {
|
|||||||
private final SystemRoleService systemRoleService;
|
private final SystemRoleService systemRoleService;
|
||||||
|
|
||||||
@ApiOperation("获取单个role")
|
@ApiOperation("获取单个role")
|
||||||
@PostMapping(value = "/describeRoleById")
|
@PostMapping(value = "/queryRoleById")
|
||||||
@PreAuthorize("@el.check('roles:list')")
|
@PreAuthorize("@el.check('roles:list')")
|
||||||
public ResponseEntity<SystemRoleTb> describeRoleById(@RequestBody SystemRoleTb args) {
|
public ResponseEntity<SystemRoleTb> queryRoleById(@RequestBody SystemRoleTb args) {
|
||||||
return new ResponseEntity<>(systemRoleService.describeRoleById(args.getId()), HttpStatus.OK);
|
return new ResponseEntity<>(systemRoleService.queryRoleById(args.getId()), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("导出角色数据")
|
@ApiOperation("导出角色数据")
|
||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check('role:list')")
|
@PreAuthorize("@el.check('role:list')")
|
||||||
public void exportRole(HttpServletResponse response, QuerySystemRoleArgs criteria) throws IOException {
|
public void exportRole(HttpServletResponse response, QuerySystemRoleArgs criteria) throws IOException {
|
||||||
systemRoleService.downloadRoleExcel(systemRoleService.describeRoleList(criteria), response);
|
systemRoleService.downloadRoleExcel(systemRoleService.queryRoleList(criteria), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("返回全部的角色")
|
@ApiOperation("返回全部的角色")
|
||||||
@PostMapping(value = "/describeRoleList")
|
@PostMapping(value = "/queryRoleList")
|
||||||
@PreAuthorize("@el.check('roles:list','user:add','user:edit')")
|
@PreAuthorize("@el.check('roles:list','user:add','user:edit')")
|
||||||
public ResponseEntity<List<SystemRoleTb>> describeRoleList() {
|
public ResponseEntity<List<SystemRoleTb>> queryRoleList() {
|
||||||
return new ResponseEntity<>(systemRoleService.describeRoleList(), HttpStatus.OK);
|
return new ResponseEntity<>(systemRoleService.queryRoleList(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询角色")
|
@ApiOperation("查询角色")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@PreAuthorize("@el.check('roles:list')")
|
@PreAuthorize("@el.check('roles:list')")
|
||||||
public ResponseEntity<CsResultVo<List<SystemRoleTb>>> describeRolePage(QuerySystemRoleArgs criteria) {
|
public ResponseEntity<CsResultVo<List<SystemRoleTb>>> queryRolePage(QuerySystemRoleArgs criteria) {
|
||||||
Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
|
Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
|
||||||
return new ResponseEntity<>(systemRoleService.describeRolePage(criteria, page), HttpStatus.OK);
|
return new ResponseEntity<>(systemRoleService.queryRolePage(criteria, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取用户级别")
|
@ApiOperation("获取用户级别")
|
||||||
@PostMapping(value = "/describeRoleLevel")
|
@PostMapping(value = "/queryRoleLevel")
|
||||||
public ResponseEntity<Object> describeRoleLevel() {
|
public ResponseEntity<Object> queryRoleLevel() {
|
||||||
return new ResponseEntity<>(Dict.create().set("level", checkRoleLevels(null)), HttpStatus.OK);
|
return new ResponseEntity<>(Dict.create().set("level", checkRoleLevels(null)), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ public class SystemRoleController {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
private int checkRoleLevels(Integer level) {
|
private int checkRoleLevels(Integer level) {
|
||||||
List<Integer> levels = systemRoleService.describeRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList());
|
List<Integer> levels = systemRoleService.queryRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList());
|
||||||
int min = Collections.min(levels);
|
int min = Collections.min(levels);
|
||||||
if (level != null) {
|
if (level != null) {
|
||||||
if (level < min) {
|
if (level < min) {
|
||||||
|
|||||||
+14
-14
@@ -54,7 +54,7 @@ public class SystemUserController {
|
|||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check('user:list')")
|
@PreAuthorize("@el.check('user:list')")
|
||||||
public void downloadUserExcel(HttpServletResponse response, QuerySystemUserArgs criteria) throws IOException {
|
public void downloadUserExcel(HttpServletResponse response, QuerySystemUserArgs criteria) throws IOException {
|
||||||
systemUserService.downloadUserExcel(systemUserService.describeUserList(criteria), response);
|
systemUserService.downloadUserExcel(systemUserService.queryUserList(criteria), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询用户")
|
@ApiOperation("查询用户")
|
||||||
@@ -65,23 +65,23 @@ public class SystemUserController {
|
|||||||
if (!ObjectUtils.isEmpty(criteria.getDeptId())) {
|
if (!ObjectUtils.isEmpty(criteria.getDeptId())) {
|
||||||
criteria.getDeptIds().add(criteria.getDeptId());
|
criteria.getDeptIds().add(criteria.getDeptId());
|
||||||
// 先查找是否存在子节点
|
// 先查找是否存在子节点
|
||||||
List<SystemDeptTb> data = systemDeptService.describeDeptListByPid(criteria.getDeptId());
|
List<SystemDeptTb> data = systemDeptService.queryDeptListByPid(criteria.getDeptId());
|
||||||
// 然后把子节点的ID都加入到集合中
|
// 然后把子节点的ID都加入到集合中
|
||||||
criteria.getDeptIds().addAll(systemDeptService.describeChildDeptIdListByDeptIds(data));
|
criteria.getDeptIds().addAll(systemDeptService.queryChildDeptIdListByDeptIds(data));
|
||||||
}
|
}
|
||||||
// 数据权限
|
// 数据权限
|
||||||
List<Long> dataScopes = systemDataService.describeDeptIdListByUserIdWithDeptId(systemUserService.describeUserByUsername(SecurityHelper.getCurrentUsername()));
|
List<Long> dataScopes = systemDataService.queryDeptIdListByUserIdWithDeptId(systemUserService.queryUserByUsername(SecurityHelper.getCurrentUsername()));
|
||||||
// criteria.getDeptIds() 不为空并且数据权限不为空则取交集
|
// criteria.getDeptIds() 不为空并且数据权限不为空则取交集
|
||||||
if (!CollectionUtils.isEmpty(criteria.getDeptIds()) && !CollectionUtils.isEmpty(dataScopes)) {
|
if (!CollectionUtils.isEmpty(criteria.getDeptIds()) && !CollectionUtils.isEmpty(dataScopes)) {
|
||||||
// 取交集
|
// 取交集
|
||||||
criteria.getDeptIds().retainAll(dataScopes);
|
criteria.getDeptIds().retainAll(dataScopes);
|
||||||
if (!CollectionUtil.isEmpty(criteria.getDeptIds())) {
|
if (!CollectionUtil.isEmpty(criteria.getDeptIds())) {
|
||||||
return new ResponseEntity<>(systemUserService.describeUserPage(criteria, page), HttpStatus.OK);
|
return new ResponseEntity<>(systemUserService.queryUserPage(criteria, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 否则取并集
|
// 否则取并集
|
||||||
criteria.getDeptIds().addAll(dataScopes);
|
criteria.getDeptIds().addAll(dataScopes);
|
||||||
return new ResponseEntity<>(systemUserService.describeUserPage(criteria, page), HttpStatus.OK);
|
return new ResponseEntity<>(systemUserService.queryUserPage(criteria, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
return new ResponseEntity<>(PageUtil.emptyData(), HttpStatus.OK);
|
return new ResponseEntity<>(PageUtil.emptyData(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -121,10 +121,10 @@ public class SystemUserController {
|
|||||||
@PreAuthorize("@el.check('user:del')")
|
@PreAuthorize("@el.check('user:del')")
|
||||||
public ResponseEntity<Object> removeUserByIds(@RequestBody Set<Long> ids) {
|
public ResponseEntity<Object> removeUserByIds(@RequestBody Set<Long> ids) {
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
Integer currentLevel = Collections.min(systemRoleService.describeRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
Integer currentLevel = Collections.min(systemRoleService.queryRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
||||||
Integer optLevel = Collections.min(systemRoleService.describeRoleListByUsersId(id).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
Integer optLevel = Collections.min(systemRoleService.queryRoleListByUsersId(id).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
||||||
if (currentLevel > optLevel) {
|
if (currentLevel > optLevel) {
|
||||||
throw new BadRequestException("角色权限不足,不能删除:" + systemUserService.describeUserById(id).getUsername());
|
throw new BadRequestException("角色权限不足,不能删除:" + systemUserService.queryUserById(id).getUsername());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
systemUserService.removeUserByIds(ids);
|
systemUserService.removeUserByIds(ids);
|
||||||
@@ -136,7 +136,7 @@ public class SystemUserController {
|
|||||||
public ResponseEntity<Object> modifyUserPasswordByUsername(@RequestBody UpdateSystemUserPasswordArgs passVo) throws Exception {
|
public ResponseEntity<Object> modifyUserPasswordByUsername(@RequestBody UpdateSystemUserPasswordArgs passVo) throws Exception {
|
||||||
String oldPass = RsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), passVo.getOldPass());
|
String oldPass = RsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), passVo.getOldPass());
|
||||||
String newPass = RsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), passVo.getNewPass());
|
String newPass = RsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), passVo.getNewPass());
|
||||||
SystemUserTb user = systemUserService.describeUserByUsername(SecurityHelper.getCurrentUsername());
|
SystemUserTb user = systemUserService.queryUserByUsername(SecurityHelper.getCurrentUsername());
|
||||||
if (!passwordEncoder.matches(oldPass, user.getPassword())) {
|
if (!passwordEncoder.matches(oldPass, user.getPassword())) {
|
||||||
throw new BadRequestException("修改失败,旧密码错误");
|
throw new BadRequestException("修改失败,旧密码错误");
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@ public class SystemUserController {
|
|||||||
@PostMapping(value = "/modifyUserEmailByUsername/{code}")
|
@PostMapping(value = "/modifyUserEmailByUsername/{code}")
|
||||||
public ResponseEntity<Object> modifyUserEmailByUsername(@PathVariable String code, @RequestBody SystemUserTb resources) throws Exception {
|
public ResponseEntity<Object> modifyUserEmailByUsername(@PathVariable String code, @RequestBody SystemUserTb resources) throws Exception {
|
||||||
String password = RsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), resources.getPassword());
|
String password = RsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), resources.getPassword());
|
||||||
SystemUserTb user = systemUserService.describeUserByUsername(SecurityHelper.getCurrentUsername());
|
SystemUserTb user = systemUserService.queryUserByUsername(SecurityHelper.getCurrentUsername());
|
||||||
if (!passwordEncoder.matches(password, user.getPassword())) {
|
if (!passwordEncoder.matches(password, user.getPassword())) {
|
||||||
throw new BadRequestException("密码错误");
|
throw new BadRequestException("密码错误");
|
||||||
}
|
}
|
||||||
@@ -180,15 +180,15 @@ public class SystemUserController {
|
|||||||
* @param resources /
|
* @param resources /
|
||||||
*/
|
*/
|
||||||
private void checkLevel(SystemUserTb resources) {
|
private void checkLevel(SystemUserTb resources) {
|
||||||
Integer currentLevel = Collections.min(systemRoleService.describeRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
Integer currentLevel = Collections.min(systemRoleService.queryRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
||||||
Integer optLevel = systemRoleService.describeDeptLevelByRoles(resources.getRoles());
|
Integer optLevel = systemRoleService.queryDeptLevelByRoles(resources.getRoles());
|
||||||
if (currentLevel > optLevel) {
|
if (currentLevel > optLevel) {
|
||||||
throw new BadRequestException("角色权限不足");
|
throw new BadRequestException("角色权限不足");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询用户基础数据")
|
@ApiOperation("查询用户基础数据")
|
||||||
@PostMapping(value = "/describeUserMetadataOptions")
|
@PostMapping(value = "/queryUserMetadataOptions")
|
||||||
@PreAuthorize("@el.check('user:list')")
|
@PreAuthorize("@el.check('user:list')")
|
||||||
public ResponseEntity<List<CsSelectOptionItemVo>> queryUserMetadataOptions(@Validated @RequestBody QuerySystemUserArgs criteria) {
|
public ResponseEntity<List<CsSelectOptionItemVo>> queryUserMetadataOptions(@Validated @RequestBody QuerySystemUserArgs criteria) {
|
||||||
int maxPageSize = 50;
|
int maxPageSize = 50;
|
||||||
|
|||||||
+1
-1
@@ -10,5 +10,5 @@ public interface SystemUserJwtApi {
|
|||||||
* @param username 用户名
|
* @param username 用户名
|
||||||
* @return UserJwtVo
|
* @return UserJwtVo
|
||||||
*/
|
*/
|
||||||
SystemUserJwtVo describeUserJwtModelByUsername(String username);
|
SystemUserJwtVo queryUserJwtModelByUsername(String username);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ public class SystemUserJwtApiImpl implements SystemUserJwtApi {
|
|||||||
private RedisHelper redisHelper;
|
private RedisHelper redisHelper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemUserJwtVo describeUserJwtModelByUsername(String username) {
|
public SystemUserJwtVo queryUserJwtModelByUsername(String username) {
|
||||||
// 转小写
|
// 转小写
|
||||||
username = StringUtil.lowerCase(username);
|
username = StringUtil.lowerCase(username);
|
||||||
if (StringUtil.isNotEmpty(username)) {
|
if (StringUtil.isNotEmpty(username)) {
|
||||||
|
|||||||
+3
-3
@@ -15,7 +15,7 @@ public interface SystemUserOnlineApi {
|
|||||||
* @param pageable /
|
* @param pageable /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
CsResultVo<List<SystemUserOnlineVo>> describeUserOnlineModelPage(String username, Pageable pageable);
|
CsResultVo<List<SystemUserOnlineVo>> queryUserOnlineModelPage(String username, Pageable pageable);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部数据,不分页
|
* 查询全部数据,不分页
|
||||||
@@ -23,7 +23,7 @@ public interface SystemUserOnlineApi {
|
|||||||
* @param username /
|
* @param username /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemUserOnlineVo> describeUserOnlineModelListByUsername(String username);
|
List<SystemUserOnlineVo> queryUserOnlineModelListByUsername(String username);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户
|
* 查询用户
|
||||||
@@ -31,5 +31,5 @@ public interface SystemUserOnlineApi {
|
|||||||
* @param key /
|
* @param key /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
SystemUserOnlineVo describeUserOnlineModelByKey(String key);
|
SystemUserOnlineVo queryUserOnlineModelByKey(String key);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -21,14 +21,14 @@ public class SystemUserOnlineApiImpl implements SystemUserOnlineApi {
|
|||||||
private final RedisHelper redisHelper;
|
private final RedisHelper redisHelper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsResultVo<List<SystemUserOnlineVo>> describeUserOnlineModelPage(String username, Pageable pageable) {
|
public CsResultVo<List<SystemUserOnlineVo>> queryUserOnlineModelPage(String username, Pageable pageable) {
|
||||||
List<SystemUserOnlineVo> onlineUserList = describeUserOnlineModelListByUsername(username);
|
List<SystemUserOnlineVo> onlineUserList = queryUserOnlineModelListByUsername(username);
|
||||||
List<SystemUserOnlineVo> paging = PageUtil.softPaging(pageable.getPageNumber(), pageable.getPageSize(), onlineUserList);
|
List<SystemUserOnlineVo> paging = PageUtil.softPaging(pageable.getPageNumber(), pageable.getPageSize(), onlineUserList);
|
||||||
return PageUtil.toPage(paging, onlineUserList.size());
|
return PageUtil.toPage(paging, onlineUserList.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemUserOnlineVo> describeUserOnlineModelListByUsername(String username) {
|
public List<SystemUserOnlineVo> queryUserOnlineModelListByUsername(String username) {
|
||||||
String loginKey = SystemRedisKey.ONLINE_USER + (StringUtil.isBlank(username) ? "" : "*" + username);
|
String loginKey = SystemRedisKey.ONLINE_USER + (StringUtil.isBlank(username) ? "" : "*" + username);
|
||||||
List<String> keys = redisHelper.scan(loginKey + "*");
|
List<String> keys = redisHelper.scan(loginKey + "*");
|
||||||
Collections.reverse(keys);
|
Collections.reverse(keys);
|
||||||
@@ -41,7 +41,7 @@ public class SystemUserOnlineApiImpl implements SystemUserOnlineApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemUserOnlineVo describeUserOnlineModelByKey(String key) {
|
public SystemUserOnlineVo queryUserOnlineModelByKey(String key) {
|
||||||
return redisHelper.get(key, SystemUserOnlineVo.class);
|
return redisHelper.get(key, SystemUserOnlineVo.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-12
@@ -40,29 +40,29 @@ public interface CsMpEasyService<T> extends IService<T> {
|
|||||||
|
|
||||||
<G> boolean modifyFeatureClazzListById(Collection<G> resources, int batchSize);
|
<G> boolean modifyFeatureClazzListById(Collection<G> resources, int batchSize);
|
||||||
|
|
||||||
<G> G describeFeatureClazzById(Serializable id, Class<G> targetClazz);
|
<G> G queryFeatureClazzById(Serializable id, Class<G> targetClazz);
|
||||||
|
|
||||||
T describeClazzByArgs(LambdaQueryWrapper<T> wrapper, SFunction<T, ?> orderColumn);
|
T queryClazzByArgs(LambdaQueryWrapper<T> wrapper, SFunction<T, ?> orderColumn);
|
||||||
|
|
||||||
<G> G describeFeatureClazzByArgs(LambdaQueryWrapper<T> wrapper, SFunction<T, ?> orderColumn, Class<G> clazz);
|
<G> G queryFeatureClazzByArgs(LambdaQueryWrapper<T> wrapper, SFunction<T, ?> orderColumn, Class<G> clazz);
|
||||||
|
|
||||||
<G> List<G> describeFeatureClazzListByIds(List<Serializable> ids, Class<G> targetClazz);
|
<G> List<G> queryFeatureClazzListByIds(List<Serializable> ids, Class<G> targetClazz);
|
||||||
|
|
||||||
<Q> List<T> describeClazzListByArgs(Q criteria);
|
<Q> List<T> queryClazzListByArgs(Q criteria);
|
||||||
|
|
||||||
List<T> describeClazzListByArgs(LambdaQueryWrapper<T> wrapper);
|
List<T> queryClazzListByArgs(LambdaQueryWrapper<T> wrapper);
|
||||||
|
|
||||||
<G, Q> List<G> describeFeatureClazzListByArgs(Q criteria, Class<G> targetClazz);
|
<G, Q> List<G> queryFeatureClazzListByArgs(Q criteria, Class<G> targetClazz);
|
||||||
|
|
||||||
<G> List<G> describeFeatureClazzListByArgs(LambdaQueryWrapper<T> wrapper, Class<G> targetClazz);
|
<G> List<G> queryFeatureClazzListByArgs(LambdaQueryWrapper<T> wrapper, Class<G> targetClazz);
|
||||||
|
|
||||||
CsResultVo<List<T>> describeClazzPageByArgs(LambdaQueryWrapper<T> wrapper, IPage<T> pageable);
|
CsResultVo<List<T>> queryClazzPageByArgs(LambdaQueryWrapper<T> wrapper, IPage<T> pageable);
|
||||||
|
|
||||||
<G> CsResultVo<List<G>> describeFeatureClazzPageByArgs(LambdaQueryWrapper<T> wrapper, IPage<T> pageable, Class<G> targetClazz);
|
<G> CsResultVo<List<G>> queryFeatureClazzPageByArgs(LambdaQueryWrapper<T> wrapper, IPage<T> pageable, Class<G> targetClazz);
|
||||||
|
|
||||||
<G, Q> CsResultVo<List<G>> describeFeatureClazzPageByArgs(Q criteria, IPage<T> pageable, Class<G> targetClazz);
|
<G, Q> CsResultVo<List<G>> queryFeatureClazzPageByArgs(Q criteria, IPage<T> pageable, Class<G> targetClazz);
|
||||||
|
|
||||||
<Q> CsResultVo<List<T>> describeClazzPageByArgs(Q criteria, IPage<T> pageable);
|
<Q> CsResultVo<List<T>> queryClazzPageByArgs(Q criteria, IPage<T> pageable);
|
||||||
|
|
||||||
int modifyClazzByArgs(LambdaQueryWrapper<T> wrapper, T entity);
|
int modifyClazzByArgs(LambdaQueryWrapper<T> wrapper, T entity);
|
||||||
|
|
||||||
|
|||||||
+12
-12
@@ -87,7 +87,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
* @param id /
|
* @param id /
|
||||||
* @param targetClazz 目标类型
|
* @param targetClazz 目标类型
|
||||||
*/
|
*/
|
||||||
public <G> G describeFeatureClazzById(Serializable id, Class<G> targetClazz) {
|
public <G> G queryFeatureClazzById(Serializable id, Class<G> targetClazz) {
|
||||||
T entity = this.getById(id);
|
T entity = this.getById(id);
|
||||||
return entity == null ? null : BeanUtil.copyProperties(entity, targetClazz);
|
return entity == null ? null : BeanUtil.copyProperties(entity, targetClazz);
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
*
|
*
|
||||||
* @param wrapper 制造条件
|
* @param wrapper 制造条件
|
||||||
*/
|
*/
|
||||||
public T describeClazzByArgs(LambdaQueryWrapper<T> wrapper, SFunction<T, ?> orderColumn) {
|
public T queryClazzByArgs(LambdaQueryWrapper<T> wrapper, SFunction<T, ?> orderColumn) {
|
||||||
if (orderColumn == null) {
|
if (orderColumn == null) {
|
||||||
throw new BadRequestException("参数orderColumn(排序的列)必填");
|
throw new BadRequestException("参数orderColumn(排序的列)必填");
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
return ts.stream().findFirst().get();
|
return ts.stream().findFirst().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public <G> G describeFeatureClazzByArgs(LambdaQueryWrapper<T> wrapper, SFunction<T, ?> orderColumn, Class<G> clazz) {
|
public <G> G queryFeatureClazzByArgs(LambdaQueryWrapper<T> wrapper, SFunction<T, ?> orderColumn, Class<G> clazz) {
|
||||||
if (orderColumn == null) {
|
if (orderColumn == null) {
|
||||||
throw new BadRequestException("参数orderColumn(排序的列)必填");
|
throw new BadRequestException("参数orderColumn(排序的列)必填");
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
* @param ids /
|
* @param ids /
|
||||||
* @param targetClazz 目标类型
|
* @param targetClazz 目标类型
|
||||||
*/
|
*/
|
||||||
public <G> List<G> describeFeatureClazzListByIds(List<Serializable> ids, Class<G> targetClazz) {
|
public <G> List<G> queryFeatureClazzListByIds(List<Serializable> ids, Class<G> targetClazz) {
|
||||||
List<T> entitys = this.listByIds(ids);
|
List<T> entitys = this.listByIds(ids);
|
||||||
return entitys == null || entitys.isEmpty() ? CollUtil.newArrayList() : BeanUtil.copyToList(entitys, targetClazz);
|
return entitys == null || entitys.isEmpty() ? CollUtil.newArrayList() : BeanUtil.copyToList(entitys, targetClazz);
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
*
|
*
|
||||||
* @param criteria 动态条件
|
* @param criteria 动态条件
|
||||||
*/
|
*/
|
||||||
public <Q> List<T> describeClazzListByArgs(Q criteria) {
|
public <Q> List<T> queryClazzListByArgs(Q criteria) {
|
||||||
QueryWrapper<T> predicate = CsMpSimpleQUtil.build(criteria);
|
QueryWrapper<T> predicate = CsMpSimpleQUtil.build(criteria);
|
||||||
return baseMapper.selectList(predicate);
|
return baseMapper.selectList(predicate);
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
*
|
*
|
||||||
* @param wrapper 制造条件
|
* @param wrapper 制造条件
|
||||||
*/
|
*/
|
||||||
public List<T> describeClazzListByArgs(LambdaQueryWrapper<T> wrapper) {
|
public List<T> queryClazzListByArgs(LambdaQueryWrapper<T> wrapper) {
|
||||||
if (wrapper == null) {
|
if (wrapper == null) {
|
||||||
wrapper = new LambdaQueryWrapper<>();
|
wrapper = new LambdaQueryWrapper<>();
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
* @param criteria 动态条件
|
* @param criteria 动态条件
|
||||||
* @param targetClazz 目标类型
|
* @param targetClazz 目标类型
|
||||||
*/
|
*/
|
||||||
public <G, Q> List<G> describeFeatureClazzListByArgs(Q criteria, Class<G> targetClazz) {
|
public <G, Q> List<G> queryFeatureClazzListByArgs(Q criteria, Class<G> targetClazz) {
|
||||||
QueryWrapper<T> predicate = CsMpSimpleQUtil.build(criteria);
|
QueryWrapper<T> predicate = CsMpSimpleQUtil.build(criteria);
|
||||||
List<T> data = baseMapper.selectList(predicate);
|
List<T> data = baseMapper.selectList(predicate);
|
||||||
return BeanUtil.copyToList(data, targetClazz);
|
return BeanUtil.copyToList(data, targetClazz);
|
||||||
@@ -180,7 +180,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
* @param wrapper 制造条件
|
* @param wrapper 制造条件
|
||||||
* @param targetClazz 目标类型
|
* @param targetClazz 目标类型
|
||||||
*/
|
*/
|
||||||
public <G> List<G> describeFeatureClazzListByArgs(LambdaQueryWrapper<T> wrapper, Class<G> targetClazz) {
|
public <G> List<G> queryFeatureClazzListByArgs(LambdaQueryWrapper<T> wrapper, Class<G> targetClazz) {
|
||||||
if (wrapper == null) {
|
if (wrapper == null) {
|
||||||
wrapper = new LambdaQueryWrapper<>();
|
wrapper = new LambdaQueryWrapper<>();
|
||||||
}
|
}
|
||||||
@@ -193,7 +193,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
* @param wrapper 制造条件
|
* @param wrapper 制造条件
|
||||||
* @param pageable 分页参数
|
* @param pageable 分页参数
|
||||||
*/
|
*/
|
||||||
public CsResultVo<List<T>> describeClazzPageByArgs(LambdaQueryWrapper<T> wrapper, IPage<T> pageable) {
|
public CsResultVo<List<T>> queryClazzPageByArgs(LambdaQueryWrapper<T> wrapper, IPage<T> pageable) {
|
||||||
if (wrapper == null) {
|
if (wrapper == null) {
|
||||||
wrapper = new LambdaQueryWrapper<>();
|
wrapper = new LambdaQueryWrapper<>();
|
||||||
}
|
}
|
||||||
@@ -208,7 +208,7 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
* @param pageable 分页参数
|
* @param pageable 分页参数
|
||||||
* @param targetClazz 目标类型
|
* @param targetClazz 目标类型
|
||||||
*/
|
*/
|
||||||
public <G> CsResultVo<List<G>> describeFeatureClazzPageByArgs(LambdaQueryWrapper<T> wrapper, IPage<T> pageable, Class<G> targetClazz) {
|
public <G> CsResultVo<List<G>> queryFeatureClazzPageByArgs(LambdaQueryWrapper<T> wrapper, IPage<T> pageable, Class<G> targetClazz) {
|
||||||
if (wrapper == null) {
|
if (wrapper == null) {
|
||||||
wrapper = new LambdaQueryWrapper<>();
|
wrapper = new LambdaQueryWrapper<>();
|
||||||
}
|
}
|
||||||
@@ -216,13 +216,13 @@ public class CsMpServiceImpl<M extends CsMpMapper<T>, T> extends ServiceImpl<M,
|
|||||||
return new CsResultVo<>(BeanUtil.copyToList(originPageData.getRecords(), targetClazz), originPageData.getTotal());
|
return new CsResultVo<>(BeanUtil.copyToList(originPageData.getRecords(), targetClazz), originPageData.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public <G, Q> CsResultVo<List<G>> describeFeatureClazzPageByArgs(Q criteria, IPage<T> pageable, Class<G> targetClazz) {
|
public <G, Q> CsResultVo<List<G>> queryFeatureClazzPageByArgs(Q criteria, IPage<T> pageable, Class<G> targetClazz) {
|
||||||
QueryWrapper<T> wrapper = CsMpSimpleQUtil.build(criteria);
|
QueryWrapper<T> wrapper = CsMpSimpleQUtil.build(criteria);
|
||||||
IPage<T> originPageData = baseMapper.selectPage(pageable, wrapper);
|
IPage<T> originPageData = baseMapper.selectPage(pageable, wrapper);
|
||||||
return new CsResultVo<>(BeanUtil.copyToList(originPageData.getRecords(), targetClazz), originPageData.getTotal());
|
return new CsResultVo<>(BeanUtil.copyToList(originPageData.getRecords(), targetClazz), originPageData.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public <Q> CsResultVo<List<T>> describeClazzPageByArgs(Q criteria, IPage<T> pageable) {
|
public <Q> CsResultVo<List<T>> queryClazzPageByArgs(Q criteria, IPage<T> pageable) {
|
||||||
QueryWrapper<T> wrapper = CsMpSimpleQUtil.build(criteria);
|
QueryWrapper<T> wrapper = CsMpSimpleQUtil.build(criteria);
|
||||||
IPage<T> originPageData = baseMapper.selectPage(pageable, wrapper);
|
IPage<T> originPageData = baseMapper.selectPage(pageable, wrapper);
|
||||||
return new CsResultVo<>(originPageData.getRecords(), originPageData.getTotal());
|
return new CsResultVo<>(originPageData.getRecords(), originPageData.getTotal());
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class TokenFilter extends GenericFilterBean {
|
|||||||
if (StrUtil.isNotBlank(token)) {
|
if (StrUtil.isNotBlank(token)) {
|
||||||
// 获取用户Token的Key
|
// 获取用户Token的Key
|
||||||
String loginKey = tokenProvider.loginKey(token);
|
String loginKey = tokenProvider.loginKey(token);
|
||||||
SystemUserOnlineVo userOnlineVo = systemUserOnlineApi.describeUserOnlineModelByKey(loginKey);
|
SystemUserOnlineVo userOnlineVo = systemUserOnlineApi.queryUserOnlineModelByKey(loginKey);
|
||||||
// 判断用户在线信息是否为空
|
// 判断用户在线信息是否为空
|
||||||
if (userOnlineVo != null) {
|
if (userOnlineVo != null) {
|
||||||
// Token 续期判断
|
// Token 续期判断
|
||||||
|
|||||||
+3
-3
@@ -28,9 +28,9 @@ public class UserDetailsHandler implements UserDetailsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemUserJwtVo loadUserByUsername(String username) {
|
public SystemUserJwtVo loadUserByUsername(String username) {
|
||||||
SystemUserJwtVo userJwtVo = systemUserJwtApi.describeUserJwtModelByUsername(username);
|
SystemUserJwtVo userJwtVo = systemUserJwtApi.queryUserJwtModelByUsername(username);
|
||||||
if (userJwtVo == null) {
|
if (userJwtVo == null) {
|
||||||
SystemUserTb user = systemUserService.describeUserByUsername(username);
|
SystemUserTb user = systemUserService.queryUserByUsername(username);
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new BadRequestException("用户不存在");
|
throw new BadRequestException("用户不存在");
|
||||||
} else {
|
} else {
|
||||||
@@ -40,7 +40,7 @@ public class UserDetailsHandler implements UserDetailsService {
|
|||||||
// 获取用户的权限
|
// 获取用户的权限
|
||||||
List<SystemRoleCodeVo> authorities = systemRoleService.buildUserRolePermissions(user);
|
List<SystemRoleCodeVo> authorities = systemRoleService.buildUserRolePermissions(user);
|
||||||
// 初始化JwtUserDto
|
// 初始化JwtUserDto
|
||||||
userJwtVo = new SystemUserJwtVo(user, systemDataService.describeDeptIdListByUserIdWithDeptId(user), authorities);
|
userJwtVo = new SystemUserJwtVo(user, systemDataService.queryDeptIdListByUserIdWithDeptId(user), authorities);
|
||||||
// 添加缓存数据
|
// 添加缓存数据
|
||||||
systemUserJwtService.saveUserJwtModelByUserName(username, userJwtVo);
|
systemUserJwtService.saveUserJwtModelByUserName(username, userJwtVo);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -16,5 +16,5 @@ public interface SystemDataService {
|
|||||||
* @param user /
|
* @param user /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<Long> describeDeptIdListByUserIdWithDeptId(SystemUserTb user);
|
List<Long> queryDeptIdListByUserIdWithDeptId(SystemUserTb user);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -30,11 +30,11 @@ public class SystemDataServiceImpl implements SystemDataService {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Long> describeDeptIdListByUserIdWithDeptId(SystemUserTb user) {
|
public List<Long> queryDeptIdListByUserIdWithDeptId(SystemUserTb user) {
|
||||||
String key = SystemRedisKey.DATA_USER + user.getId();
|
String key = SystemRedisKey.DATA_USER + user.getId();
|
||||||
Set<Long> deptIds = new HashSet<>();
|
Set<Long> deptIds = new HashSet<>();
|
||||||
// 查询用户角色
|
// 查询用户角色
|
||||||
List<SystemRoleTb> roleList = systemRoleService.describeRoleListByUsersId(user.getId());
|
List<SystemRoleTb> roleList = systemRoleService.queryRoleListByUsersId(user.getId());
|
||||||
// 获取对应的部门ID
|
// 获取对应的部门ID
|
||||||
for (SystemRoleTb role : roleList) {
|
for (SystemRoleTb role : roleList) {
|
||||||
SystemDataScopeEnum dataScopeEnum = SystemDataScopeEnum.find(role.getDataScope());
|
SystemDataScopeEnum dataScopeEnum = SystemDataScopeEnum.find(role.getDataScope());
|
||||||
@@ -60,12 +60,12 @@ public class SystemDataServiceImpl implements SystemDataService {
|
|||||||
* @return 数据权限ID
|
* @return 数据权限ID
|
||||||
*/
|
*/
|
||||||
public Set<Long> getCustomize(Set<Long> deptIds, SystemRoleTb role) {
|
public Set<Long> getCustomize(Set<Long> deptIds, SystemRoleTb role) {
|
||||||
Set<SystemDeptTb> deptList = systemDeptService.describeDeptByRoleId(role.getId());
|
Set<SystemDeptTb> deptList = systemDeptService.queryDeptByRoleId(role.getId());
|
||||||
for (SystemDeptTb dept : deptList) {
|
for (SystemDeptTb dept : deptList) {
|
||||||
deptIds.add(dept.getId());
|
deptIds.add(dept.getId());
|
||||||
List<SystemDeptTb> deptChildren = systemDeptService.describeDeptListByPid(dept.getId());
|
List<SystemDeptTb> deptChildren = systemDeptService.queryDeptListByPid(dept.getId());
|
||||||
if (CollUtil.isNotEmpty(deptChildren)) {
|
if (CollUtil.isNotEmpty(deptChildren)) {
|
||||||
deptIds.addAll(systemDeptService.describeChildDeptIdListByDeptIds(deptChildren));
|
deptIds.addAll(systemDeptService.queryChildDeptIdListByDeptIds(deptChildren));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return deptIds;
|
return deptIds;
|
||||||
|
|||||||
+7
-7
@@ -50,7 +50,7 @@ public interface SystemDeptService extends IService<SystemDeptTb> {
|
|||||||
* @return /
|
* @return /
|
||||||
* @throws Exception /
|
* @throws Exception /
|
||||||
*/
|
*/
|
||||||
List<SystemDeptTb> describeDeptList(QuerySystemDeptArgs criteria, Boolean isQuery) throws Exception;
|
List<SystemDeptTb> queryDeptList(QuerySystemDeptArgs criteria, Boolean isQuery) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询
|
* 根据ID查询
|
||||||
@@ -58,7 +58,7 @@ public interface SystemDeptService extends IService<SystemDeptTb> {
|
|||||||
* @param id /
|
* @param id /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
SystemDeptTb describeDeptById(Long id);
|
SystemDeptTb queryDeptById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据PID查询
|
* 根据PID查询
|
||||||
@@ -66,7 +66,7 @@ public interface SystemDeptService extends IService<SystemDeptTb> {
|
|||||||
* @param pid /
|
* @param pid /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemDeptTb> describeDeptListByPid(long pid);
|
List<SystemDeptTb> queryDeptListByPid(long pid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色ID查询
|
* 根据角色ID查询
|
||||||
@@ -74,7 +74,7 @@ public interface SystemDeptService extends IService<SystemDeptTb> {
|
|||||||
* @param id /
|
* @param id /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
Set<SystemDeptTb> describeDeptByRoleId(Long id);
|
Set<SystemDeptTb> queryDeptByRoleId(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取部门下所有关联的部门
|
* 获取部门下所有关联的部门
|
||||||
@@ -83,7 +83,7 @@ public interface SystemDeptService extends IService<SystemDeptTb> {
|
|||||||
* @param depts /
|
* @param depts /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
Set<SystemDeptTb> describeRelationDeptSet(List<SystemDeptTb> deptList, Set<SystemDeptTb> depts);
|
Set<SystemDeptTb> queryRelationDeptSet(List<SystemDeptTb> deptList, Set<SystemDeptTb> depts);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID获取同级与上级数据
|
* 根据ID获取同级与上级数据
|
||||||
@@ -92,7 +92,7 @@ public interface SystemDeptService extends IService<SystemDeptTb> {
|
|||||||
* @param depts /
|
* @param depts /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemDeptTb> describeSuperiorDeptListByPid(SystemDeptTb dept, List<SystemDeptTb> depts);
|
List<SystemDeptTb> querySuperiorDeptListByPid(SystemDeptTb dept, List<SystemDeptTb> depts);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建树形数据
|
* 构建树形数据
|
||||||
@@ -108,7 +108,7 @@ public interface SystemDeptService extends IService<SystemDeptTb> {
|
|||||||
* @param deptList 、
|
* @param deptList 、
|
||||||
* @return 、
|
* @return 、
|
||||||
*/
|
*/
|
||||||
List<Long> describeChildDeptIdListByDeptIds(List<SystemDeptTb> deptList);
|
List<Long> queryChildDeptIdListByDeptIds(List<SystemDeptTb> deptList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证是否被角色或用户关联
|
* 验证是否被角色或用户关联
|
||||||
|
|||||||
+15
-15
@@ -53,7 +53,7 @@ public class SystemDeptServiceImpl extends ServiceImpl<SystemDeptMapper, SystemD
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void modifyDept(SystemDeptTb resources) {
|
public void modifyDept(SystemDeptTb resources) {
|
||||||
// 旧的部门
|
// 旧的部门
|
||||||
Long oldPid = describeDeptById(resources.getId()).getPid();
|
Long oldPid = queryDeptById(resources.getId()).getPid();
|
||||||
Long newPid = resources.getPid();
|
Long newPid = resources.getPid();
|
||||||
if (resources.getPid() != null && resources.getId().equals(resources.getPid())) {
|
if (resources.getPid() != null && resources.getId().equals(resources.getPid())) {
|
||||||
throw new BadRequestException("上级不能为自己");
|
throw new BadRequestException("上级不能为自己");
|
||||||
@@ -113,7 +113,7 @@ public class SystemDeptServiceImpl extends ServiceImpl<SystemDeptMapper, SystemD
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemDeptTb> describeDeptList(QuerySystemDeptArgs criteria, Boolean isQuery) throws Exception {
|
public List<SystemDeptTb> queryDeptList(QuerySystemDeptArgs criteria, Boolean isQuery) throws Exception {
|
||||||
String dataScopeType = SecurityHelper.getDataScopeType();
|
String dataScopeType = SecurityHelper.getDataScopeType();
|
||||||
if (isQuery) {
|
if (isQuery) {
|
||||||
if (dataScopeType.equals(SystemDataScopeEnum.ALL.getValue())) {
|
if (dataScopeType.equals(SystemDataScopeEnum.ALL.getValue())) {
|
||||||
@@ -148,40 +148,40 @@ public class SystemDeptServiceImpl extends ServiceImpl<SystemDeptMapper, SystemD
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemDeptTb describeDeptById(Long id) {
|
public SystemDeptTb queryDeptById(Long id) {
|
||||||
return systemDeptMapper.selectById(id);
|
return systemDeptMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemDeptTb> describeDeptListByPid(long pid) {
|
public List<SystemDeptTb> queryDeptListByPid(long pid) {
|
||||||
return systemDeptMapper.queryDeptListByPid(pid);
|
return systemDeptMapper.queryDeptListByPid(pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SystemDeptTb> describeDeptByRoleId(Long id) {
|
public Set<SystemDeptTb> queryDeptByRoleId(Long id) {
|
||||||
return systemDeptMapper.queryDeptSetByRoleId(id);
|
return systemDeptMapper.queryDeptSetByRoleId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SystemDeptTb> describeRelationDeptSet(List<SystemDeptTb> menuList, Set<SystemDeptTb> deptSet) {
|
public Set<SystemDeptTb> queryRelationDeptSet(List<SystemDeptTb> menuList, Set<SystemDeptTb> deptSet) {
|
||||||
for (SystemDeptTb dept : menuList) {
|
for (SystemDeptTb dept : menuList) {
|
||||||
deptSet.add(dept);
|
deptSet.add(dept);
|
||||||
List<SystemDeptTb> deptList = systemDeptMapper.queryDeptListByPid(dept.getId());
|
List<SystemDeptTb> deptList = systemDeptMapper.queryDeptListByPid(dept.getId());
|
||||||
if (CollUtil.isNotEmpty(deptList)) {
|
if (CollUtil.isNotEmpty(deptList)) {
|
||||||
describeRelationDeptSet(deptList, deptSet);
|
queryRelationDeptSet(deptList, deptSet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return deptSet;
|
return deptSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> describeChildDeptIdListByDeptIds(List<SystemDeptTb> deptList) {
|
public List<Long> queryChildDeptIdListByDeptIds(List<SystemDeptTb> deptList) {
|
||||||
List<Long> list = new ArrayList<>();
|
List<Long> list = new ArrayList<>();
|
||||||
for (SystemDeptTb systemDeptTb : deptList) {
|
for (SystemDeptTb systemDeptTb : deptList) {
|
||||||
if (systemDeptTb != null && systemDeptTb.getEnabled()) {
|
if (systemDeptTb != null && systemDeptTb.getEnabled()) {
|
||||||
List<SystemDeptTb> deptList1 = systemDeptMapper.queryDeptListByPid(systemDeptTb.getId());
|
List<SystemDeptTb> deptList1 = systemDeptMapper.queryDeptListByPid(systemDeptTb.getId());
|
||||||
if (CollUtil.isNotEmpty(deptList1)) {
|
if (CollUtil.isNotEmpty(deptList1)) {
|
||||||
list.addAll(describeChildDeptIdListByDeptIds(deptList1));
|
list.addAll(queryChildDeptIdListByDeptIds(deptList1));
|
||||||
}
|
}
|
||||||
list.add(systemDeptTb.getId());
|
list.add(systemDeptTb.getId());
|
||||||
}
|
}
|
||||||
@@ -190,13 +190,13 @@ public class SystemDeptServiceImpl extends ServiceImpl<SystemDeptMapper, SystemD
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemDeptTb> describeSuperiorDeptListByPid(SystemDeptTb dept, List<SystemDeptTb> deptList) {
|
public List<SystemDeptTb> querySuperiorDeptListByPid(SystemDeptTb dept, List<SystemDeptTb> deptList) {
|
||||||
if (dept.getPid() == null) {
|
if (dept.getPid() == null) {
|
||||||
deptList.addAll(systemDeptMapper.queryDeptListByPidIsNull());
|
deptList.addAll(systemDeptMapper.queryDeptListByPidIsNull());
|
||||||
return deptList;
|
return deptList;
|
||||||
}
|
}
|
||||||
deptList.addAll(systemDeptMapper.queryDeptListByPid(dept.getPid()));
|
deptList.addAll(systemDeptMapper.queryDeptListByPid(dept.getPid()));
|
||||||
return describeSuperiorDeptListByPid(describeDeptById(dept.getPid()), deptList);
|
return querySuperiorDeptListByPid(queryDeptById(dept.getPid()), deptList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -221,7 +221,7 @@ public class SystemDeptServiceImpl extends ServiceImpl<SystemDeptMapper, SystemD
|
|||||||
}
|
}
|
||||||
if (isChild) {
|
if (isChild) {
|
||||||
deptSet.add(dept);
|
deptSet.add(dept);
|
||||||
} else if (dept.getPid() != null && !deptNames.contains(describeDeptById(dept.getPid()).getName())) {
|
} else if (dept.getPid() != null && !deptNames.contains(queryDeptById(dept.getPid()).getName())) {
|
||||||
deptSet.add(dept);
|
deptSet.add(dept);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -250,11 +250,11 @@ public class SystemDeptServiceImpl extends ServiceImpl<SystemDeptMapper, SystemD
|
|||||||
Set<SystemDeptTb> depts = new HashSet<>();
|
Set<SystemDeptTb> depts = new HashSet<>();
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
// 根部门
|
// 根部门
|
||||||
depts.add(describeDeptById(id));
|
depts.add(queryDeptById(id));
|
||||||
// 子部门
|
// 子部门
|
||||||
List<SystemDeptTb> deptList = describeDeptListByPid(id);
|
List<SystemDeptTb> deptList = queryDeptListByPid(id);
|
||||||
if (CollectionUtil.isNotEmpty(deptList)) {
|
if (CollectionUtil.isNotEmpty(deptList)) {
|
||||||
depts = describeRelationDeptSet(deptList, depts);
|
depts = queryRelationDeptSet(deptList, depts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return depts;
|
return depts;
|
||||||
|
|||||||
+1
-1
@@ -46,5 +46,5 @@ public interface SystemDictDetailService extends IService<SystemDictDetailTb> {
|
|||||||
* @param name 字典名称
|
* @param name 字典名称
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemDictDetailTb> describeDictDetailListByName(String name);
|
List<SystemDictDetailTb> queryDictDetailListByName(String name);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ public class SystemDictDetailServiceImpl extends ServiceImpl<SystemDictDetailMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemDictDetailTb> describeDictDetailListByName(String name) {
|
public List<SystemDictDetailTb> queryDictDetailListByName(String name) {
|
||||||
return systemDictDetailMapper.queryDictDetailListByDictName(name);
|
return systemDictDetailMapper.queryDictDetailListByDictName(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -51,7 +51,7 @@ public interface SystemDictService extends IService<SystemDictTb> {
|
|||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
CsResultVo<List<SystemDictTb>> describeDictPage(QuerySystemDictArgs criteria, Page<SystemDictTb> page);
|
CsResultVo<List<SystemDictTb>> queryDictPage(QuerySystemDictArgs criteria, Page<SystemDictTb> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部数据
|
* 查询全部数据
|
||||||
@@ -59,5 +59,5 @@ public interface SystemDictService extends IService<SystemDictTb> {
|
|||||||
* @param criteria /
|
* @param criteria /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemDictTb> describeDictList(QuerySystemDictArgs criteria);
|
List<SystemDictTb> queryDictList(QuerySystemDictArgs criteria);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -84,13 +84,13 @@ public class SystemDictServiceImpl extends ServiceImpl<SystemDictMapper, SystemD
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsResultVo<List<SystemDictTb>> describeDictPage(QuerySystemDictArgs criteria, Page<SystemDictTb> page) {
|
public CsResultVo<List<SystemDictTb>> queryDictPage(QuerySystemDictArgs criteria, Page<SystemDictTb> page) {
|
||||||
IPage<SystemDictTb> dicts = systemDictMapper.queryDictPageByArgs(criteria, page);
|
IPage<SystemDictTb> dicts = systemDictMapper.queryDictPageByArgs(criteria, page);
|
||||||
return PageUtil.toPage(dicts);
|
return PageUtil.toPage(dicts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemDictTb> describeDictList(QuerySystemDictArgs criteria) {
|
public List<SystemDictTb> queryDictList(QuerySystemDictArgs criteria) {
|
||||||
return systemDictMapper.queryDictPageByArgs(criteria, PageUtil.getCount(systemDictMapper)).getRecords();
|
return systemDictMapper.queryDictPageByArgs(criteria, PageUtil.getCount(systemDictMapper)).getRecords();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -29,5 +29,5 @@ public interface SystemEmailService extends IService<SystemEmailConfigTb> {
|
|||||||
*
|
*
|
||||||
* @return EmailConfig 邮件配置
|
* @return EmailConfig 邮件配置
|
||||||
*/
|
*/
|
||||||
SystemEmailConfigTb describeEmailConfig();
|
SystemEmailConfigTb queryEmailConfig();
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -22,7 +22,7 @@ public class SystemEmailServiceImpl extends ServiceImpl<SystemEmailConfigMapper,
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void modifyEmailConfigOnPassChange(SystemEmailConfigTb emailConfig) throws Exception {
|
public void modifyEmailConfigOnPassChange(SystemEmailConfigTb emailConfig) throws Exception {
|
||||||
SystemEmailConfigTb localConfig = describeEmailConfig();
|
SystemEmailConfigTb localConfig = queryEmailConfig();
|
||||||
if (!emailConfig.getPassword().equals(localConfig.getPassword())) {
|
if (!emailConfig.getPassword().equals(localConfig.getPassword())) {
|
||||||
// 对称加密
|
// 对称加密
|
||||||
emailConfig.setPassword(DesEncryptUtil.desEncrypt(emailConfig.getPassword()));
|
emailConfig.setPassword(DesEncryptUtil.desEncrypt(emailConfig.getPassword()));
|
||||||
@@ -35,7 +35,7 @@ public class SystemEmailServiceImpl extends ServiceImpl<SystemEmailConfigMapper,
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void sendEmail(SendSystemEmailArgs sendEmailRequest) {
|
public void sendEmail(SendSystemEmailArgs sendEmailRequest) {
|
||||||
SystemEmailConfigTb emailConfig = describeEmailConfig();
|
SystemEmailConfigTb emailConfig = queryEmailConfig();
|
||||||
if (emailConfig.getId() == null) {
|
if (emailConfig.getId() == null) {
|
||||||
throw new BadRequestException("请先配置,再操作");
|
throw new BadRequestException("请先配置,再操作");
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ public class SystemEmailServiceImpl extends ServiceImpl<SystemEmailConfigMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemEmailConfigTb describeEmailConfig() {
|
public SystemEmailConfigTb queryEmailConfig() {
|
||||||
SystemEmailConfigTb emailConfig = getById(1L);
|
SystemEmailConfigTb emailConfig = getById(1L);
|
||||||
return emailConfig == null ? new SystemEmailConfigTb() : emailConfig;
|
return emailConfig == null ? new SystemEmailConfigTb() : emailConfig;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -50,7 +50,7 @@ public interface SystemJobService extends IService<SystemJobTb> {
|
|||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
CsResultVo<List<SystemJobTb>> describeJobPage(QuerySystemJobArgs criteria, Page<SystemJobTb> page);
|
CsResultVo<List<SystemJobTb>> queryJobPage(QuerySystemJobArgs criteria, Page<SystemJobTb> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部数据
|
* 查询全部数据
|
||||||
@@ -58,7 +58,7 @@ public interface SystemJobService extends IService<SystemJobTb> {
|
|||||||
* @param criteria /
|
* @param criteria /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemJobTb> describeJobList(QuerySystemJobArgs criteria);
|
List<SystemJobTb> queryJobList(QuerySystemJobArgs criteria);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,5 +74,5 @@ public interface SystemJobService extends IService<SystemJobTb> {
|
|||||||
* @param id /
|
* @param id /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
SystemJobTb describeJobById(Long id);
|
SystemJobTb queryJobById(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -73,17 +73,17 @@ public class SystemJobServiceImpl extends ServiceImpl<SystemJobMapper, SystemJob
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsResultVo<List<SystemJobTb>> describeJobPage(QuerySystemJobArgs criteria, Page<SystemJobTb> page) {
|
public CsResultVo<List<SystemJobTb>> queryJobPage(QuerySystemJobArgs criteria, Page<SystemJobTb> page) {
|
||||||
return PageUtil.toPage(systemJobMapper.queryJobPageByArgs(criteria, page));
|
return PageUtil.toPage(systemJobMapper.queryJobPageByArgs(criteria, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemJobTb> describeJobList(QuerySystemJobArgs criteria) {
|
public List<SystemJobTb> queryJobList(QuerySystemJobArgs criteria) {
|
||||||
return systemJobMapper.queryJobPageByArgs(criteria, PageUtil.getCount(systemJobMapper)).getRecords();
|
return systemJobMapper.queryJobPageByArgs(criteria, PageUtil.getCount(systemJobMapper)).getRecords();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemJobTb describeJobById(Long id) {
|
public SystemJobTb queryJobById(Long id) {
|
||||||
return systemJobMapper.selectById(id);
|
return systemJobMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -52,7 +52,7 @@ public interface SystemLocalStorageService extends IService<SystemLocalStorageTb
|
|||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
CsResultVo<List<SystemLocalStorageTb>> describeLocalStoragePage(QuerySystemLocalStorageArgs criteria, Page<SystemLocalStorageTb> page);
|
CsResultVo<List<SystemLocalStorageTb>> queryLocalStoragePage(QuerySystemLocalStorageArgs criteria, Page<SystemLocalStorageTb> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部数据
|
* 查询全部数据
|
||||||
@@ -60,5 +60,5 @@ public interface SystemLocalStorageService extends IService<SystemLocalStorageTb
|
|||||||
* @param criteria 条件
|
* @param criteria 条件
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemLocalStorageTb> describeLocalStorageList(QuerySystemLocalStorageArgs criteria);
|
List<SystemLocalStorageTb> queryLocalStorageList(QuerySystemLocalStorageArgs criteria);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -97,12 +97,12 @@ public class SystemLocalStorageServiceImpl extends ServiceImpl<SystemLocalStorag
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsResultVo<List<SystemLocalStorageTb>> describeLocalStoragePage(QuerySystemLocalStorageArgs criteria, Page<SystemLocalStorageTb> page) {
|
public CsResultVo<List<SystemLocalStorageTb>> queryLocalStoragePage(QuerySystemLocalStorageArgs criteria, Page<SystemLocalStorageTb> page) {
|
||||||
return PageUtil.toPage(systemLocalStorageMapper.queryLocalStoragePageByArgs(criteria, page));
|
return PageUtil.toPage(systemLocalStorageMapper.queryLocalStoragePageByArgs(criteria, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemLocalStorageTb> describeLocalStorageList(QuerySystemLocalStorageArgs criteria) {
|
public List<SystemLocalStorageTb> queryLocalStorageList(QuerySystemLocalStorageArgs criteria) {
|
||||||
return systemLocalStorageMapper.queryLocalStoragePageByArgs(criteria, PageUtil.getCount(systemLocalStorageMapper)).getRecords();
|
return systemLocalStorageMapper.queryLocalStoragePageByArgs(criteria, PageUtil.getCount(systemLocalStorageMapper)).getRecords();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -53,7 +53,7 @@ public interface SystemMenuService extends IService<SystemMenuTb> {
|
|||||||
* @return /
|
* @return /
|
||||||
* @throws Exception /
|
* @throws Exception /
|
||||||
*/
|
*/
|
||||||
List<SystemMenuTb> describeMenuList(QuerySystemMenuArgs criteria, Boolean isQuery) throws Exception;
|
List<SystemMenuTb> queryMenuList(QuerySystemMenuArgs criteria, Boolean isQuery) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询
|
* 根据ID查询
|
||||||
@@ -61,7 +61,7 @@ public interface SystemMenuService extends IService<SystemMenuTb> {
|
|||||||
* @param id /
|
* @param id /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
SystemMenuTb describeMenuById(long id);
|
SystemMenuTb queryMenuById(long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有子节点,包含自身ID
|
* 获取所有子节点,包含自身ID
|
||||||
@@ -70,7 +70,7 @@ public interface SystemMenuService extends IService<SystemMenuTb> {
|
|||||||
* @param menuSet /
|
* @param menuSet /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
Set<SystemMenuTb> describeChildMenuSet(List<SystemMenuTb> menuList, Set<SystemMenuTb> menuSet);
|
Set<SystemMenuTb> queryChildMenuSet(List<SystemMenuTb> menuList, Set<SystemMenuTb> menuSet);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建菜单树
|
* 构建菜单树
|
||||||
@@ -94,7 +94,7 @@ public interface SystemMenuService extends IService<SystemMenuTb> {
|
|||||||
* @param pid /
|
* @param pid /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemMenuTb> describeMenuListByPid(Long pid);
|
List<SystemMenuTb> queryMenuListByPid(Long pid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID获取同级与上级数据
|
* 根据ID获取同级与上级数据
|
||||||
@@ -103,7 +103,7 @@ public interface SystemMenuService extends IService<SystemMenuTb> {
|
|||||||
* @param objects /
|
* @param objects /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemMenuTb> describeSuperiorMenuList(SystemMenuTb menu, List<SystemMenuTb> objects);
|
List<SystemMenuTb> querySuperiorMenuList(SystemMenuTb menu, List<SystemMenuTb> objects);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据当前用户获取菜单
|
* 根据当前用户获取菜单
|
||||||
@@ -111,5 +111,5 @@ public interface SystemMenuService extends IService<SystemMenuTb> {
|
|||||||
* @param currentUserId /
|
* @param currentUserId /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemMenuTb> describeMenuListByUserId(Long currentUserId);
|
List<SystemMenuTb> queryMenuListByUserId(Long currentUserId);
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -159,7 +159,7 @@ public class SystemMenuServiceImpl extends ServiceImpl<SystemMenuMapper, SystemM
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemMenuTb> describeMenuList(QuerySystemMenuArgs criteria, Boolean isQuery) throws Exception {
|
public List<SystemMenuTb> queryMenuList(QuerySystemMenuArgs criteria, Boolean isQuery) throws Exception {
|
||||||
if (Boolean.TRUE.equals(isQuery)) {
|
if (Boolean.TRUE.equals(isQuery)) {
|
||||||
criteria.setPidIsNull(true);
|
criteria.setPidIsNull(true);
|
||||||
List<Field> fields = ClassUtil.getAllFields(criteria.getClass(), new ArrayList<>());
|
List<Field> fields = ClassUtil.getAllFields(criteria.getClass(), new ArrayList<>());
|
||||||
@@ -181,7 +181,7 @@ public class SystemMenuServiceImpl extends ServiceImpl<SystemMenuMapper, SystemM
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemMenuTb describeMenuById(long id) {
|
public SystemMenuTb queryMenuById(long id) {
|
||||||
return systemMenuMapper.selectById(id);
|
return systemMenuMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,26 +192,26 @@ public class SystemMenuServiceImpl extends ServiceImpl<SystemMenuMapper, SystemM
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SystemMenuTb> describeMenuListByUserId(Long currentUserId) {
|
public List<SystemMenuTb> queryMenuListByUserId(Long currentUserId) {
|
||||||
List<SystemRoleTb> roles = systemRoleService.describeRoleListByUsersId(currentUserId);
|
List<SystemRoleTb> roles = systemRoleService.queryRoleListByUsersId(currentUserId);
|
||||||
Set<Long> roleIds = roles.stream().map(SystemRoleTb::getId).collect(Collectors.toSet());
|
Set<Long> roleIds = roles.stream().map(SystemRoleTb::getId).collect(Collectors.toSet());
|
||||||
return new ArrayList<>(systemMenuMapper.queryMenuSetByRoleIdsAndType(roleIds, 2));
|
return new ArrayList<>(systemMenuMapper.queryMenuSetByRoleIdsAndType(roleIds, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SystemMenuTb> describeChildMenuSet(List<SystemMenuTb> menuList, Set<SystemMenuTb> menuSet) {
|
public Set<SystemMenuTb> queryChildMenuSet(List<SystemMenuTb> menuList, Set<SystemMenuTb> menuSet) {
|
||||||
for (SystemMenuTb menu : menuList) {
|
for (SystemMenuTb menu : menuList) {
|
||||||
menuSet.add(menu);
|
menuSet.add(menu);
|
||||||
List<SystemMenuTb> menus = systemMenuMapper.queryMenuListByPidOrderByMenuSort(menu.getId());
|
List<SystemMenuTb> menus = systemMenuMapper.queryMenuListByPidOrderByMenuSort(menu.getId());
|
||||||
if (CollUtil.isNotEmpty(menus)) {
|
if (CollUtil.isNotEmpty(menus)) {
|
||||||
describeChildMenuSet(menus, menuSet);
|
queryChildMenuSet(menus, menuSet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return menuSet;
|
return menuSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemMenuTb> describeMenuListByPid(Long pid) {
|
public List<SystemMenuTb> queryMenuListByPid(Long pid) {
|
||||||
List<SystemMenuTb> menus;
|
List<SystemMenuTb> menus;
|
||||||
if (pid != null && !pid.equals(0L)) {
|
if (pid != null && !pid.equals(0L)) {
|
||||||
menus = systemMenuMapper.queryMenuListByPidOrderByMenuSort(pid);
|
menus = systemMenuMapper.queryMenuListByPidOrderByMenuSort(pid);
|
||||||
@@ -222,13 +222,13 @@ public class SystemMenuServiceImpl extends ServiceImpl<SystemMenuMapper, SystemM
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemMenuTb> describeSuperiorMenuList(SystemMenuTb menu, List<SystemMenuTb> menus) {
|
public List<SystemMenuTb> querySuperiorMenuList(SystemMenuTb menu, List<SystemMenuTb> menus) {
|
||||||
if (menu.getPid() == null) {
|
if (menu.getPid() == null) {
|
||||||
menus.addAll(systemMenuMapper.queryMenuListByPidIsNullOrderByMenuSort());
|
menus.addAll(systemMenuMapper.queryMenuListByPidIsNullOrderByMenuSort());
|
||||||
return menus;
|
return menus;
|
||||||
}
|
}
|
||||||
menus.addAll(systemMenuMapper.queryMenuListByPidOrderByMenuSort(menu.getPid()));
|
menus.addAll(systemMenuMapper.queryMenuListByPidOrderByMenuSort(menu.getPid()));
|
||||||
return describeSuperiorMenuList(describeMenuById(menu.getPid()), menus);
|
return querySuperiorMenuList(queryMenuById(menu.getPid()), menus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -9,5 +9,5 @@ public interface SystemMonitorService {
|
|||||||
*
|
*
|
||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
*/
|
*/
|
||||||
Map<String, Object> describeServerMonitorInfo();
|
Map<String, Object> queryServerMonitorInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ public class SystemMonitorServiceImpl implements SystemMonitorService {
|
|||||||
private final DecimalFormat df = new DecimalFormat("0.00");
|
private final DecimalFormat df = new DecimalFormat("0.00");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> describeServerMonitorInfo() {
|
public Map<String, Object> queryServerMonitorInfo() {
|
||||||
Map<String, Object> resultMap = new LinkedHashMap<>(8);
|
Map<String, Object> resultMap = new LinkedHashMap<>(8);
|
||||||
try {
|
try {
|
||||||
SystemInfo si = new SystemInfo();
|
SystemInfo si = new SystemInfo();
|
||||||
|
|||||||
+1
-1
@@ -25,5 +25,5 @@ public interface SystemQiniuConfigService extends IService<SystemQiniuConfigTb>
|
|||||||
*
|
*
|
||||||
* @return QiniuConfig
|
* @return QiniuConfig
|
||||||
*/
|
*/
|
||||||
SystemQiniuConfigTb describeQiniuConfig();
|
SystemQiniuConfigTb queryQiniuConfig();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class SystemQiniuConfigServiceImpl extends ServiceImpl<SystemQiniuConfigM
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemQiniuConfigTb describeQiniuConfig() {
|
public SystemQiniuConfigTb queryQiniuConfig() {
|
||||||
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigMapper.selectById(1L);
|
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigMapper.selectById(1L);
|
||||||
return qiniuConfig == null ? new SystemQiniuConfigTb() : qiniuConfig;
|
return qiniuConfig == null ? new SystemQiniuConfigTb() : qiniuConfig;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -63,7 +63,7 @@ public interface SystemQiniuContentService extends IService<SystemQiniuContentTb
|
|||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
CsResultVo<List<SystemQiniuContentTb>> describeQiniuContentPage(QuerySystemQiniuArgs criteria, Page<SystemQiniuContentTb> page);
|
CsResultVo<List<SystemQiniuContentTb>> queryQiniuContentPage(QuerySystemQiniuArgs criteria, Page<SystemQiniuContentTb> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部
|
* 查询全部
|
||||||
@@ -71,5 +71,5 @@ public interface SystemQiniuContentService extends IService<SystemQiniuContentTb
|
|||||||
* @param criteria 条件
|
* @param criteria 条件
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemQiniuContentTb> describeQiniuContentList(QuerySystemQiniuArgs criteria);
|
List<SystemQiniuContentTb> queryQiniuContentList(QuerySystemQiniuArgs criteria);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -46,7 +46,7 @@ public class SystemQiniuContentServiceImpl extends ServiceImpl<SystemQiniuConten
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public SystemQiniuContentTb uploadFile(MultipartFile file) {
|
public SystemQiniuContentTb uploadFile(MultipartFile file) {
|
||||||
FileUtil.checkSize(maxSize, file.getSize());
|
FileUtil.checkSize(maxSize, file.getSize());
|
||||||
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigService.describeQiniuConfig();
|
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigService.queryQiniuConfig();
|
||||||
if (qiniuConfig.getId() == null) {
|
if (qiniuConfig.getId() == null) {
|
||||||
throw new BadRequestException("请先添加相应配置,再操作");
|
throw new BadRequestException("请先添加相应配置,再操作");
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public class SystemQiniuContentServiceImpl extends ServiceImpl<SystemQiniuConten
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String createFilePreviewUrl(SystemQiniuContentTb content) {
|
public String createFilePreviewUrl(SystemQiniuContentTb content) {
|
||||||
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigService.describeQiniuConfig();
|
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigService.queryQiniuConfig();
|
||||||
String finalUrl;
|
String finalUrl;
|
||||||
String type = "公开";
|
String type = "公开";
|
||||||
if (type.equals(content.getType())) {
|
if (type.equals(content.getType())) {
|
||||||
@@ -101,7 +101,7 @@ public class SystemQiniuContentServiceImpl extends ServiceImpl<SystemQiniuConten
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void removeFileById(Long id) {
|
public void removeFileById(Long id) {
|
||||||
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigService.describeQiniuConfig();
|
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigService.queryQiniuConfig();
|
||||||
SystemQiniuContentTb qiniuContent = systemQiniuContentMapper.selectById(id);
|
SystemQiniuContentTb qiniuContent = systemQiniuContentMapper.selectById(id);
|
||||||
if (qiniuContent == null) {
|
if (qiniuContent == null) {
|
||||||
throw new BadRequestException("文件不存在");
|
throw new BadRequestException("文件不存在");
|
||||||
@@ -122,7 +122,7 @@ public class SystemQiniuContentServiceImpl extends ServiceImpl<SystemQiniuConten
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void synchronize() {
|
public void synchronize() {
|
||||||
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigService.describeQiniuConfig();
|
SystemQiniuConfigTb qiniuConfig = systemQiniuConfigService.queryQiniuConfig();
|
||||||
if (qiniuConfig.getId() == null) {
|
if (qiniuConfig.getId() == null) {
|
||||||
throw new BadRequestException("请先添加相应配置,再操作");
|
throw new BadRequestException("请先添加相应配置,再操作");
|
||||||
}
|
}
|
||||||
@@ -187,12 +187,12 @@ public class SystemQiniuContentServiceImpl extends ServiceImpl<SystemQiniuConten
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsResultVo<List<SystemQiniuContentTb>> describeQiniuContentPage(QuerySystemQiniuArgs criteria, Page<SystemQiniuContentTb> page) {
|
public CsResultVo<List<SystemQiniuContentTb>> queryQiniuContentPage(QuerySystemQiniuArgs criteria, Page<SystemQiniuContentTb> page) {
|
||||||
return PageUtil.toPage(systemQiniuContentMapper.queryQiniuContentPageByArgs(criteria, page));
|
return PageUtil.toPage(systemQiniuContentMapper.queryQiniuContentPageByArgs(criteria, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemQiniuContentTb> describeQiniuContentList(QuerySystemQiniuArgs criteria) {
|
public List<SystemQiniuContentTb> queryQiniuContentList(QuerySystemQiniuArgs criteria) {
|
||||||
return systemQiniuContentMapper.queryQiniuContentPageByArgs(criteria, PageUtil.getCount(systemQiniuContentMapper)).getRecords();
|
return systemQiniuContentMapper.queryQiniuContentPageByArgs(criteria, PageUtil.getCount(systemQiniuContentMapper)).getRecords();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -83,7 +83,7 @@ public interface SystemQuartzJobService extends IService<SystemQuartzJobTb> {
|
|||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
CsResultVo<List<SystemQuartzJobTb>> describeQuartzJobPage(QuerySystemQuartzJobArgs criteria, Page<SystemQuartzJobTb> page);
|
CsResultVo<List<SystemQuartzJobTb>> queryQuartzJobPage(QuerySystemQuartzJobArgs criteria, Page<SystemQuartzJobTb> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部
|
* 查询全部
|
||||||
@@ -91,7 +91,7 @@ public interface SystemQuartzJobService extends IService<SystemQuartzJobTb> {
|
|||||||
* @param criteria 条件
|
* @param criteria 条件
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemQuartzJobTb> describeQuartzJobList(QuerySystemQuartzJobArgs criteria);
|
List<SystemQuartzJobTb> queryQuartzJobList(QuerySystemQuartzJobArgs criteria);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询日志
|
* 分页查询日志
|
||||||
@@ -100,7 +100,7 @@ public interface SystemQuartzJobService extends IService<SystemQuartzJobTb> {
|
|||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
CsResultVo<List<SystemQuartzLogTb>> describeQuartzLogPage(QuerySystemQuartzJobArgs criteria, Page<SystemQuartzLogTb> page);
|
CsResultVo<List<SystemQuartzLogTb>> queryQuartzLogPage(QuerySystemQuartzJobArgs criteria, Page<SystemQuartzLogTb> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部
|
* 查询全部
|
||||||
@@ -108,5 +108,5 @@ public interface SystemQuartzJobService extends IService<SystemQuartzJobTb> {
|
|||||||
* @param criteria 条件
|
* @param criteria 条件
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemQuartzLogTb> describeQuartzLogList(QuerySystemQuartzJobArgs criteria);
|
List<SystemQuartzLogTb> queryQuartzLogList(QuerySystemQuartzJobArgs criteria);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -162,22 +162,22 @@ public class SystemQuartzJobServiceImpl extends ServiceImpl<SystemQuartzJobMappe
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsResultVo<List<SystemQuartzJobTb>> describeQuartzJobPage(QuerySystemQuartzJobArgs criteria, Page<SystemQuartzJobTb> page) {
|
public CsResultVo<List<SystemQuartzJobTb>> queryQuartzJobPage(QuerySystemQuartzJobArgs criteria, Page<SystemQuartzJobTb> page) {
|
||||||
return PageUtil.toPage(systemQuartzJobMapper.queryQuartzJobPageByArgs(criteria, page));
|
return PageUtil.toPage(systemQuartzJobMapper.queryQuartzJobPageByArgs(criteria, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsResultVo<List<SystemQuartzLogTb>> describeQuartzLogPage(QuerySystemQuartzJobArgs criteria, Page<SystemQuartzLogTb> page) {
|
public CsResultVo<List<SystemQuartzLogTb>> queryQuartzLogPage(QuerySystemQuartzJobArgs criteria, Page<SystemQuartzLogTb> page) {
|
||||||
return PageUtil.toPage(systemQuartzLogMapper.queryQuartzLogPageByArgs(criteria, page));
|
return PageUtil.toPage(systemQuartzLogMapper.queryQuartzLogPageByArgs(criteria, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemQuartzJobTb> describeQuartzJobList(QuerySystemQuartzJobArgs criteria) {
|
public List<SystemQuartzJobTb> queryQuartzJobList(QuerySystemQuartzJobArgs criteria) {
|
||||||
return systemQuartzJobMapper.queryQuartzJobPageByArgs(criteria, PageUtil.getCount(systemQuartzJobMapper)).getRecords();
|
return systemQuartzJobMapper.queryQuartzJobPageByArgs(criteria, PageUtil.getCount(systemQuartzJobMapper)).getRecords();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemQuartzLogTb> describeQuartzLogList(QuerySystemQuartzJobArgs criteria) {
|
public List<SystemQuartzLogTb> queryQuartzLogList(QuerySystemQuartzJobArgs criteria) {
|
||||||
return systemQuartzLogMapper.queryQuartzLogPageByArgs(criteria, PageUtil.getCount(systemQuartzLogMapper)).getRecords();
|
return systemQuartzLogMapper.queryQuartzLogPageByArgs(criteria, PageUtil.getCount(systemQuartzLogMapper)).getRecords();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -60,7 +60,7 @@ public interface SystemRoleService extends IService<SystemRoleTb> {
|
|||||||
*
|
*
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemRoleTb> describeRoleList();
|
List<SystemRoleTb> queryRoleList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部
|
* 查询全部
|
||||||
@@ -68,7 +68,7 @@ public interface SystemRoleService extends IService<SystemRoleTb> {
|
|||||||
* @param criteria 条件
|
* @param criteria 条件
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemRoleTb> describeRoleList(QuerySystemRoleArgs criteria);
|
List<SystemRoleTb> queryRoleList(QuerySystemRoleArgs criteria);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 待条件分页查询
|
* 待条件分页查询
|
||||||
@@ -77,7 +77,7 @@ public interface SystemRoleService extends IService<SystemRoleTb> {
|
|||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
CsResultVo<List<SystemRoleTb>> describeRolePage(QuerySystemRoleArgs criteria, Page<Object> page);
|
CsResultVo<List<SystemRoleTb>> queryRolePage(QuerySystemRoleArgs criteria, Page<Object> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询
|
* 根据ID查询
|
||||||
@@ -85,7 +85,7 @@ public interface SystemRoleService extends IService<SystemRoleTb> {
|
|||||||
* @param id /
|
* @param id /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
SystemRoleTb describeRoleById(long id);
|
SystemRoleTb queryRoleById(long id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -94,7 +94,7 @@ public interface SystemRoleService extends IService<SystemRoleTb> {
|
|||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemRoleTb> describeRoleListByUsersId(Long userId);
|
List<SystemRoleTb> queryRoleListByUsersId(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色查询角色级别
|
* 根据角色查询角色级别
|
||||||
@@ -102,7 +102,7 @@ public interface SystemRoleService extends IService<SystemRoleTb> {
|
|||||||
* @param roles /
|
* @param roles /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
Integer describeDeptLevelByRoles(Set<SystemRoleTb> roles);
|
Integer queryDeptLevelByRoles(Set<SystemRoleTb> roles);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户权限信息
|
* 获取用户权限信息
|
||||||
@@ -125,5 +125,5 @@ public interface SystemRoleService extends IService<SystemRoleTb> {
|
|||||||
* @param menuId /
|
* @param menuId /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemRoleTb> describeRoleListByMenuId(Long menuId);
|
List<SystemRoleTb> queryRoleListByMenuId(Long menuId);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-8
@@ -116,17 +116,17 @@ public class SystemRoleServiceImpl extends ServiceImpl<SystemRoleMapper, SystemR
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemRoleTb> describeRoleList() {
|
public List<SystemRoleTb> queryRoleList() {
|
||||||
return systemRoleMapper.queryRoleList();
|
return systemRoleMapper.queryRoleList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemRoleTb> describeRoleList(QuerySystemRoleArgs criteria) {
|
public List<SystemRoleTb> queryRoleList(QuerySystemRoleArgs criteria) {
|
||||||
return systemRoleMapper.queryRoleListByArgs(criteria);
|
return systemRoleMapper.queryRoleListByArgs(criteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsResultVo<List<SystemRoleTb>> describeRolePage(QuerySystemRoleArgs criteria, Page<Object> page) {
|
public CsResultVo<List<SystemRoleTb>> queryRolePage(QuerySystemRoleArgs criteria, Page<Object> page) {
|
||||||
criteria.setOffset(page.offset());
|
criteria.setOffset(page.offset());
|
||||||
List<SystemRoleTb> roles = systemRoleMapper.queryRoleListByArgs(criteria);
|
List<SystemRoleTb> roles = systemRoleMapper.queryRoleListByArgs(criteria);
|
||||||
Long total = systemRoleMapper.getRoleCountByArgs(criteria);
|
Long total = systemRoleMapper.getRoleCountByArgs(criteria);
|
||||||
@@ -134,23 +134,23 @@ public class SystemRoleServiceImpl extends ServiceImpl<SystemRoleMapper, SystemR
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemRoleTb describeRoleById(long id) {
|
public SystemRoleTb queryRoleById(long id) {
|
||||||
return systemRoleMapper.selectById(id);
|
return systemRoleMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemRoleTb> describeRoleListByUsersId(Long userId) {
|
public List<SystemRoleTb> queryRoleListByUsersId(Long userId) {
|
||||||
return systemRoleMapper.queryRoleListByUserId(userId);
|
return systemRoleMapper.queryRoleListByUserId(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer describeDeptLevelByRoles(Set<SystemRoleTb> roles) {
|
public Integer queryDeptLevelByRoles(Set<SystemRoleTb> roles) {
|
||||||
if (CollUtil.isEmpty(roles)) {
|
if (CollUtil.isEmpty(roles)) {
|
||||||
return Integer.MAX_VALUE;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
Set<SystemRoleTb> roleSet = new HashSet<>();
|
Set<SystemRoleTb> roleSet = new HashSet<>();
|
||||||
for (SystemRoleTb role : roles) {
|
for (SystemRoleTb role : roles) {
|
||||||
roleSet.add(describeRoleById(role.getId()));
|
roleSet.add(queryRoleById(role.getId()));
|
||||||
}
|
}
|
||||||
return Collections.min(roleSet.stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
return Collections.min(roleSet.stream().map(SystemRoleTb::getLevel).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
@@ -180,7 +180,7 @@ public class SystemRoleServiceImpl extends ServiceImpl<SystemRoleMapper, SystemR
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemRoleTb> describeRoleListByMenuId(Long menuId) {
|
public List<SystemRoleTb> queryRoleListByMenuId(Long menuId) {
|
||||||
return systemRoleMapper.queryRoleListByMenuId(menuId);
|
return systemRoleMapper.queryRoleListByMenuId(menuId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -91,7 +91,7 @@ public interface SystemUserService extends IService<SystemUserTb> {
|
|||||||
* @param id ID
|
* @param id ID
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
SystemUserTb describeUserById(long id);
|
SystemUserTb queryUserById(long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户名查询
|
* 根据用户名查询
|
||||||
@@ -99,7 +99,7 @@ public interface SystemUserService extends IService<SystemUserTb> {
|
|||||||
* @param username /
|
* @param username /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
SystemUserTb describeUserByUsername(String username);
|
SystemUserTb queryUserByUsername(String username);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部
|
* 查询全部
|
||||||
@@ -108,7 +108,7 @@ public interface SystemUserService extends IService<SystemUserTb> {
|
|||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
CsResultVo<List<SystemUserTb>> describeUserPage(QuerySystemUserArgs criteria, Page<Object> page);
|
CsResultVo<List<SystemUserTb>> queryUserPage(QuerySystemUserArgs criteria, Page<Object> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部不分页
|
* 查询全部不分页
|
||||||
@@ -116,5 +116,5 @@ public interface SystemUserService extends IService<SystemUserTb> {
|
|||||||
* @param criteria 条件
|
* @param criteria 条件
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SystemUserTb> describeUserList(QuerySystemUserArgs criteria);
|
List<SystemUserTb> queryUserList(QuerySystemUserArgs criteria);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -225,7 +225,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsResultVo<List<SystemUserTb>> describeUserPage(QuerySystemUserArgs criteria, Page<Object> page) {
|
public CsResultVo<List<SystemUserTb>> queryUserPage(QuerySystemUserArgs criteria, Page<Object> page) {
|
||||||
criteria.setOffset(page.offset());
|
criteria.setOffset(page.offset());
|
||||||
List<SystemUserTb> users = systemUserMapper.queryUserPageByArgs(criteria, PageUtil.getCount(systemUserMapper)).getRecords();
|
List<SystemUserTb> users = systemUserMapper.queryUserPageByArgs(criteria, PageUtil.getCount(systemUserMapper)).getRecords();
|
||||||
Long total = systemUserMapper.getUserCountByArgs(criteria);
|
Long total = systemUserMapper.getUserCountByArgs(criteria);
|
||||||
@@ -233,17 +233,17 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SystemUserTb> describeUserList(QuerySystemUserArgs criteria) {
|
public List<SystemUserTb> queryUserList(QuerySystemUserArgs criteria) {
|
||||||
return systemUserMapper.queryUserPageByArgs(criteria, PageUtil.getCount(systemUserMapper)).getRecords();
|
return systemUserMapper.queryUserPageByArgs(criteria, PageUtil.getCount(systemUserMapper)).getRecords();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemUserTb describeUserById(long id) {
|
public SystemUserTb queryUserById(long id) {
|
||||||
return systemUserMapper.selectById(id);
|
return systemUserMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SystemUserTb describeUserByUsername(String username) {
|
public SystemUserTb queryUserByUsername(String username) {
|
||||||
return systemUserMapper.getUserByUsername(username);
|
return systemUserMapper.getUserByUsername(username);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user