读写分离

This commit is contained in:
2025-05-06 15:51:13 +08:00
parent b88cd28029
commit 34d66ae908
92 changed files with 630 additions and 637 deletions
@@ -1,6 +1,6 @@
package cn.odboy.monitor;
import cn.odboy.core.service.system.DictService;
import cn.odboy.core.service.system.SystemDictService;
import cn.odboy.monitor.service.HealthCheckPointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
@Component
public class HealthCheckPointerImpl implements HealthCheckPointService {
@Autowired
private DictService dictService;
private SystemDictService systemDictService;
@Override
public ResponseEntity<?> doReadiness() {
@@ -18,6 +18,6 @@ public class HealthCheckPointerImpl implements HealthCheckPointService {
@Override
public ResponseEntity<?> doLiveness() {
return ResponseEntity.ok(dictService.getById(1));
return ResponseEntity.ok(systemDictService.getById(1));
}
}
@@ -15,6 +15,6 @@ outagedetectioninterval=2
# 是否过滤 Log
filter=true
# 过滤 Log 时所排除的 sql 关键字,以逗号分隔
exclude=SELECT 1,INSERT INTO sys_log
exclude=SELECT 1,INSERT INTO system_quartz_log
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
excludecategories=info,debug,result,commit,resultset
@@ -7,7 +7,7 @@ import java.util.List;
/**
* 数据权限服务类
*/
public interface DataApi {
public interface SystemDataApi {
/**
* 获取数据权限
@@ -6,7 +6,7 @@ import cn.odboy.core.service.system.dto.QueryDeptRequest;
import java.util.List;
import java.util.Set;
public interface DeptApi {
public interface SystemDeptApi {
/**
* 查询所有数据
@@ -6,7 +6,7 @@ import cn.odboy.core.service.system.dto.QueryDictRequest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
public interface DictApi {
public interface SystemDictApi {
/**
* 分页查询
*
@@ -6,7 +6,7 @@ import cn.odboy.core.service.system.dto.QueryDictDetailRequest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
public interface DictDetailApi {
public interface SystemDictDetailApi {
/**
* 分页查询
*
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.Set;
public interface JobApi {
public interface SystemJobApi {
/**
* 分页查询
@@ -1,12 +1,12 @@
package cn.odboy.core.api.system;
import cn.odboy.core.dal.dataobject.system.Menu;
import cn.odboy.core.dal.dataobject.system.MenuResponse;
import cn.odboy.core.dal.model.system.MenuResponse;
import cn.odboy.core.service.system.dto.QueryMenuRequest;
import java.util.List;
import java.util.Set;
public interface MenuApi {
public interface SystemMenuApi {
/**
* 查询全部数据
*
@@ -2,7 +2,7 @@ package cn.odboy.core.api.system;
import java.util.Map;
public interface MonitorApi {
public interface SystemMonitorApi {
/**
* 查询服务器监控信息
@@ -1,13 +1,13 @@
package cn.odboy.core.api.job;
package cn.odboy.core.api.system;
import cn.odboy.base.PageResult;
import cn.odboy.core.dal.dataobject.job.QuartzJob;
import cn.odboy.core.dal.dataobject.job.QuartzLog;
import cn.odboy.core.service.job.dto.QueryQuartzJobRequest;
import cn.odboy.core.service.system.dto.QueryQuartzJobRequest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
public interface QuartzJobApi {
public interface SystemQuartzJobApi {
/**
* 分页查询
*
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.Set;
public interface RoleApi {
public interface SystemRoleApi {
/**
* 查询全部数据
@@ -6,7 +6,7 @@ import cn.odboy.core.service.system.dto.QueryUserRequest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
public interface UserApi {
public interface SystemUserApi {
/**
* 根据ID查询
@@ -1,15 +1,14 @@
package cn.odboy.core.api.system.impl;
import cn.hutool.core.collection.CollUtil;
import cn.odboy.core.api.system.DataApi;
import cn.odboy.core.api.system.DeptApi;
import cn.odboy.core.api.system.RoleApi;
import cn.odboy.core.api.system.SystemDataApi;
import cn.odboy.core.api.system.SystemDeptApi;
import cn.odboy.core.api.system.SystemRoleApi;
import cn.odboy.core.constant.DataScopeEnum;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.dal.dataobject.system.Dept;
import cn.odboy.core.dal.dataobject.system.Role;
import cn.odboy.core.dal.dataobject.system.User;
import cn.odboy.core.service.system.RoleService;
import cn.odboy.redis.RedisHelper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@@ -25,10 +24,10 @@ import java.util.concurrent.TimeUnit;
*/
@Service
@RequiredArgsConstructor
public class DataApiImpl implements DataApi {
public class SystemDataApiImpl implements SystemDataApi {
private final RedisHelper redisHelper;
private final RoleApi roleApi;
private final DeptApi deptApi;
private final SystemRoleApi systemRoleApi;
private final SystemDeptApi systemDeptApi;
/**
* 用户角色和用户部门改变时需清理缓存
@@ -43,7 +42,7 @@ public class DataApiImpl implements DataApi {
if (CollUtil.isEmpty(ids)) {
Set<Long> deptIds = new HashSet<>();
// 查询用户角色
List<Role> roleList = roleApi.describeRoleListByUsersId(user.getId());
List<Role> roleList = systemRoleApi.describeRoleListByUsersId(user.getId());
// 获取对应的部门ID
for (Role role : roleList) {
DataScopeEnum dataScopeEnum = DataScopeEnum.find(role.getDataScope());
@@ -72,12 +71,12 @@ public class DataApiImpl implements DataApi {
* @return 数据权限ID
*/
public Set<Long> getCustomize(Set<Long> deptIds, Role role) {
Set<Dept> deptList = deptApi.describeDeptByRoleId(role.getId());
Set<Dept> deptList = systemDeptApi.describeDeptByRoleId(role.getId());
for (Dept dept : deptList) {
deptIds.add(dept.getId());
List<Dept> deptChildren = deptApi.describeDeptListByPid(dept.getId());
List<Dept> deptChildren = systemDeptApi.describeDeptListByPid(dept.getId());
if (CollUtil.isNotEmpty(deptChildren)) {
deptIds.addAll(deptApi.describeChildDeptIdListByDeptIds(deptChildren));
deptIds.addAll(systemDeptApi.describeChildDeptIdListByDeptIds(deptChildren));
}
}
return deptIds;
@@ -4,7 +4,7 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.odboy.base.BaseResult;
import cn.odboy.core.api.system.DeptApi;
import cn.odboy.core.api.system.SystemDeptApi;
import cn.odboy.core.constant.DataScopeEnum;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.dal.dataobject.system.Dept;
@@ -29,7 +29,7 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
public class DeptApiImpl implements DeptApi {
public class SystemDeptApiImpl implements SystemDeptApi {
private final DeptMapper deptMapper;
private final RoleMapper roleMapper;
private final UserMapper userMapper;
@@ -1,7 +1,7 @@
package cn.odboy.core.api.system.impl;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.DictApi;
import cn.odboy.core.api.system.SystemDictApi;
import cn.odboy.core.dal.dataobject.system.Dict;
import cn.odboy.core.dal.mysql.system.DictMapper;
import cn.odboy.core.service.system.dto.QueryDictRequest;
@@ -14,7 +14,7 @@ import java.util.List;
@Service
@RequiredArgsConstructor
public class DictApiImpl implements DictApi {
public class SystemDictApiImpl implements SystemDictApi {
private final DictMapper dictMapper;
@Override
public PageResult<Dict> describeDictPage(QueryDictRequest criteria, Page<Object> page) {
@@ -2,7 +2,7 @@ package cn.odboy.core.api.system.impl;
import cn.hutool.core.collection.CollUtil;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.DictDetailApi;
import cn.odboy.core.api.system.SystemDictDetailApi;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.dal.dataobject.system.DictDetail;
import cn.odboy.core.dal.mysql.system.DictDetailMapper;
@@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit;
@Service
@RequiredArgsConstructor
public class DictDetailApiImpl implements DictDetailApi {
public class SystemDictDetailApiImpl implements SystemDictDetailApi {
private final DictDetailMapper dictDetailMapper;
private final RedisHelper redisHelper;
@Override
@@ -1,7 +1,7 @@
package cn.odboy.core.api.system.impl;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.JobApi;
import cn.odboy.core.api.system.SystemJobApi;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.dal.dataobject.system.Job;
import cn.odboy.core.dal.mysql.system.JobMapper;
@@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit;
@Service
@RequiredArgsConstructor
public class JobApiImpl implements JobApi {
public class SystemJobApiImpl implements SystemJobApi {
private final JobMapper jobMapper;
private final UserMapper userMapper;
private final RedisHelper redisHelper;
@@ -3,14 +3,14 @@ package cn.odboy.core.api.system.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.odboy.core.api.system.MenuApi;
import cn.odboy.core.api.system.RoleApi;
import cn.odboy.core.api.system.SystemMenuApi;
import cn.odboy.core.api.system.SystemRoleApi;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.dal.dataobject.system.Menu;
import cn.odboy.core.dal.dataobject.system.MenuResponse;
import cn.odboy.core.dal.model.system.MenuResponse;
import cn.odboy.core.dal.dataobject.system.Role;
import cn.odboy.core.dal.mysql.system.MenuMapper;
import cn.odboy.core.service.system.RoleService;
import cn.odboy.core.service.system.SystemRoleService;
import cn.odboy.core.service.system.dto.MenuMetaVo;
import cn.odboy.core.service.system.dto.QueryMenuRequest;
import cn.odboy.redis.RedisHelper;
@@ -29,10 +29,10 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
public class MenuApiImpl implements MenuApi {
public class SystemMenuApiImpl implements SystemMenuApi {
private final MenuMapper menuMapper;
private final RoleApi roleApi;
private final RoleService roleService;
private final SystemRoleApi systemRoleApi;
private final SystemRoleService systemRoleService;
private final RedisHelper redisHelper;
@Override
@@ -79,7 +79,7 @@ public class MenuApiImpl implements MenuApi {
String key = SystemRedisKey.MENU_USER + currentUserId;
List<Menu> menus = redisHelper.getList(key, Menu.class);
if (CollUtil.isEmpty(menus)) {
List<Role> roles = roleApi.describeRoleListByUsersId(currentUserId);
List<Role> roles = systemRoleApi.describeRoleListByUsersId(currentUserId);
Set<Long> roleIds = roles.stream().map(Role::getId).collect(Collectors.toSet());
menus = new ArrayList<>(menuMapper.queryMenuSetByRoleIdsAndType(roleIds, 2));
redisHelper.set(key, menus, 1, TimeUnit.DAYS);
@@ -3,7 +3,7 @@ package cn.odboy.core.api.system.impl;
import cn.hutool.core.date.BetweenFormatter.Level;
import cn.hutool.core.date.DateUtil;
import cn.odboy.constant.SystemConst;
import cn.odboy.core.api.system.MonitorApi;
import cn.odboy.core.api.system.SystemMonitorApi;
import cn.odboy.util.FileUtil;
import cn.odboy.util.IpUtil;
import lombok.extern.slf4j.Slf4j;
@@ -28,7 +28,7 @@ import java.util.Map;
@Slf4j
@Service
public class MonitorApiImpl implements MonitorApi {
public class SystemMonitorApiImpl implements SystemMonitorApi {
private final DecimalFormat df = new DecimalFormat("0.00");
@Override
@@ -1,12 +1,12 @@
package cn.odboy.core.api.job.impl;
package cn.odboy.core.api.system.impl;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.job.QuartzJobApi;
import cn.odboy.core.api.system.SystemQuartzJobApi;
import cn.odboy.core.dal.dataobject.job.QuartzJob;
import cn.odboy.core.dal.dataobject.job.QuartzLog;
import cn.odboy.core.dal.mysql.job.QuartzJobMapper;
import cn.odboy.core.dal.mysql.job.QuartzLogMapper;
import cn.odboy.core.service.job.dto.QueryQuartzJobRequest;
import cn.odboy.core.service.system.dto.QueryQuartzJobRequest;
import cn.odboy.util.PageUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
@@ -15,7 +15,7 @@ import java.util.List;
@Service
@RequiredArgsConstructor
public class QuartzJobApiImpl implements QuartzJobApi {
public class SystemQuartzJobApiImpl implements SystemQuartzJobApi {
private final QuartzJobMapper quartzJobMapper;
private final QuartzLogMapper quartzLogMapper;
@@ -2,7 +2,7 @@ package cn.odboy.core.api.system.impl;
import cn.hutool.core.collection.CollUtil;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.RoleApi;
import cn.odboy.core.api.system.SystemRoleApi;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.dal.dataobject.system.Menu;
import cn.odboy.core.dal.dataobject.system.Role;
@@ -27,7 +27,7 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
public class RoleApiImpl implements RoleApi {
public class SystemRoleApiImpl implements SystemRoleApi {
private final RoleMapper roleMapper;
private final UserMapper userMapper;
private final RedisHelper redisHelper;
@@ -1,7 +1,7 @@
package cn.odboy.core.api.system.impl;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.UserApi;
import cn.odboy.core.api.system.SystemUserApi;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.dal.dataobject.system.User;
import cn.odboy.core.dal.mysql.system.UserMapper;
@@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit;
@Service
@RequiredArgsConstructor
public class UserApiImpl implements UserApi {
public class SystemUserApiImpl implements SystemUserApi {
private final UserMapper userMapper;
private final RedisHelper redisHelper;
@@ -1,8 +1,8 @@
package cn.odboy.core.api.system;
package cn.odboy.core.cache.api;
import cn.odboy.core.service.system.dto.UserJwtVo;
public interface UserCacheApi {
public interface SystemUserCacheApi {
/**
* 返回用户缓存
*
@@ -1,11 +1,11 @@
package cn.odboy.core.api.system;
package cn.odboy.core.cache.api;
import cn.odboy.base.PageResult;
import cn.odboy.core.service.system.dto.UserOnlineVo;
import org.springframework.data.domain.Pageable;
import java.util.List;
public interface UserOnlineApi {
public interface SystemUserOnlineApi {
/**
* 查询全部数据
@@ -1,6 +1,6 @@
package cn.odboy.core.api.system.impl;
package cn.odboy.core.cache.api.impl;
import cn.odboy.core.api.system.UserCacheApi;
import cn.odboy.core.cache.api.SystemUserCacheApi;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.service.system.dto.UserJwtVo;
import cn.odboy.redis.RedisHelper;
@@ -11,7 +11,7 @@ import javax.annotation.Resource;
@Service
@RequiredArgsConstructor
public class UserCacheApiImpl implements UserCacheApi {
public class SystemUserCacheApiImpl implements SystemUserCacheApi {
@Resource
private RedisHelper redisHelper;
@@ -1,7 +1,7 @@
package cn.odboy.core.api.system.impl;
package cn.odboy.core.cache.api.impl;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.UserOnlineApi;
import cn.odboy.core.cache.api.SystemUserOnlineApi;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.service.system.dto.UserOnlineVo;
import cn.odboy.redis.RedisHelper;
@@ -18,7 +18,7 @@ import java.util.List;
@Slf4j
@Service
@RequiredArgsConstructor
public class UserOnlineApiImpl implements UserOnlineApi {
public class SystemUserOnlineApiImpl implements SystemUserOnlineApi {
private final RedisHelper redisHelper;
@@ -1,9 +1,9 @@
package cn.odboy.core.service.system;
package cn.odboy.core.cache.service;
import cn.odboy.core.service.system.dto.UserJwtVo;
import org.springframework.scheduling.annotation.Async;
public interface UserCacheService {
public interface SystemUserCacheService {
/**
* 添加缓存到Redis
*
@@ -1,4 +1,4 @@
package cn.odboy.core.service.system;
package cn.odboy.core.cache.service;
import cn.odboy.core.service.system.dto.UserJwtVo;
import cn.odboy.core.service.system.dto.UserOnlineVo;
@@ -7,7 +7,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
public interface UserOnlineService {
public interface SystemUserOnlineService {
/**
* 保存在线用户信息
*
@@ -1,9 +1,9 @@
package cn.odboy.core.service.system.impl;
package cn.odboy.core.cache.service.impl;
import cn.hutool.core.util.RandomUtil;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.service.system.dto.UserJwtVo;
import cn.odboy.core.service.system.UserCacheService;
import cn.odboy.core.cache.service.SystemUserCacheService;
import cn.odboy.redis.RedisHelper;
import cn.odboy.util.StringUtil;
import org.springframework.stereotype.Service;
@@ -13,7 +13,7 @@ import javax.annotation.Resource;
* 用户缓存管理
*/
@Service
public class UserCacheServiceImpl implements UserCacheService {
public class SystemUserCacheServiceImpl implements SystemUserCacheService {
@Resource
private RedisHelper redisHelper;
@@ -1,28 +1,23 @@
package cn.odboy.core.service.system.impl;
package cn.odboy.core.cache.service.impl;
import cn.odboy.base.PageResult;
import cn.odboy.core.framework.properties.AppProperties;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.service.system.dto.UserJwtVo;
import cn.odboy.core.service.system.dto.UserOnlineVo;
import cn.odboy.core.framework.permission.TokenProvider;
import cn.odboy.core.service.system.UserOnlineService;
import cn.odboy.core.cache.service.SystemUserOnlineService;
import cn.odboy.redis.RedisHelper;
import cn.odboy.util.BrowserUtil;
import cn.odboy.util.DesEncryptUtil;
import cn.odboy.util.FileUtil;
import cn.odboy.util.IpUtil;
import cn.odboy.util.PageUtil;
import cn.odboy.util.StringUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
@@ -32,7 +27,7 @@ import java.util.concurrent.TimeUnit;
@Slf4j
@Service
@AllArgsConstructor
public class UserOnlineServiceImpl implements UserOnlineService {
public class SystemUserOnlineServiceImpl implements SystemUserOnlineService {
private final AppProperties properties;
private final TokenProvider tokenProvider;
private final RedisHelper redisHelper;
@@ -2,12 +2,12 @@ package cn.odboy.core.controller.job;
import cn.odboy.base.PageResult;
import cn.odboy.context.SpringBeanHolder;
import cn.odboy.core.api.job.QuartzJobApi;
import cn.odboy.core.service.job.dto.QueryQuartzJobRequest;
import cn.odboy.core.service.job.dto.UpdateQuartzJobRequest;
import cn.odboy.core.api.system.SystemQuartzJobApi;
import cn.odboy.core.service.system.dto.QueryQuartzJobRequest;
import cn.odboy.core.service.system.dto.UpdateQuartzJobRequest;
import cn.odboy.core.dal.dataobject.job.QuartzJob;
import cn.odboy.core.dal.dataobject.job.QuartzLog;
import cn.odboy.core.service.job.QuartzJobService;
import cn.odboy.core.service.system.SystemQuartzJobService;
import cn.odboy.exception.BadRequestException;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
@@ -38,29 +38,29 @@ import java.util.Set;
@Api(tags = "系统:定时任务管理")
public class QuartzJobController {
private static final String ENTITY_NAME = "quartzJob";
private final QuartzJobService quartzJobService;
private final QuartzJobApi quartzJobApi;
private final SystemQuartzJobService systemQuartzJobService;
private final SystemQuartzJobApi systemQuartzJobApi;
@ApiOperation("查询定时任务")
@GetMapping
@PreAuthorize("@el.check('timing:list')")
public ResponseEntity<PageResult<QuartzJob>> queryQuartzJob(QueryQuartzJobRequest criteria) {
Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
return new ResponseEntity<>(quartzJobApi.describeQuartzJobPage(criteria, page), HttpStatus.OK);
return new ResponseEntity<>(systemQuartzJobApi.describeQuartzJobPage(criteria, page), HttpStatus.OK);
}
@ApiOperation("导出任务数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('timing:list')")
public void exportQuartzJob(HttpServletResponse response, QueryQuartzJobRequest criteria) throws IOException {
quartzJobService.downloadQuartzJobExcel(quartzJobApi.describeQuartzJobList(criteria), response);
systemQuartzJobService.downloadQuartzJobExcel(systemQuartzJobApi.describeQuartzJobList(criteria), response);
}
@ApiOperation("导出日志数据")
@GetMapping(value = "/logs/download")
@PreAuthorize("@el.check('timing:list')")
public void exportQuartzJobLog(HttpServletResponse response, QueryQuartzJobRequest criteria) throws IOException {
quartzJobService.downloadQuartzLogExcel(quartzJobApi.describeQuartzLogList(criteria), response);
systemQuartzJobService.downloadQuartzLogExcel(systemQuartzJobApi.describeQuartzLogList(criteria), response);
}
@ApiOperation("查询任务执行日志")
@@ -68,7 +68,7 @@ public class QuartzJobController {
@PreAuthorize("@el.check('timing:list')")
public ResponseEntity<PageResult<QuartzLog>> queryQuartzJobLog(QueryQuartzJobRequest criteria) {
Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
return new ResponseEntity<>(quartzJobApi.describeQuartzLogPage(criteria, page), HttpStatus.OK);
return new ResponseEntity<>(systemQuartzJobApi.describeQuartzLogPage(criteria, page), HttpStatus.OK);
}
@ApiOperation("新增定时任务")
@@ -80,7 +80,7 @@ public class QuartzJobController {
}
// 验证Bean是不是合法的,合法的定时任务 Bean 需要用 @Service 定义
checkBean(resources.getBeanName());
quartzJobService.createJob(resources);
systemQuartzJobService.createJob(resources);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -90,7 +90,7 @@ public class QuartzJobController {
public ResponseEntity<Object> updateQuartzJob(@Validated(QuartzJob.Update.class) @RequestBody UpdateQuartzJobRequest resources) {
// 验证Bean是不是合法的,合法的定时任务 Bean 需要用 @Service 定义
checkBean(resources.getBeanName());
quartzJobService.modifyQuartzJobResumeCron(resources);
systemQuartzJobService.modifyQuartzJobResumeCron(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -98,7 +98,7 @@ public class QuartzJobController {
@PostMapping(value = "/switchQuartzJobStatus/{id}")
@PreAuthorize("@el.check('timing:edit')")
public ResponseEntity<Object> switchQuartzJobStatus(@PathVariable Long id) {
quartzJobService.switchQuartzJobStatus(quartzJobService.getById(id));
systemQuartzJobService.switchQuartzJobStatus(systemQuartzJobService.getById(id));
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -106,7 +106,7 @@ public class QuartzJobController {
@PostMapping(value = "/startQuartzJob/{id}")
@PreAuthorize("@el.check('timing:edit')")
public ResponseEntity<Object> startQuartzJob(@PathVariable Long id) {
quartzJobService.startQuartzJob(quartzJobService.getById(id));
systemQuartzJobService.startQuartzJob(systemQuartzJobService.getById(id));
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -114,7 +114,7 @@ public class QuartzJobController {
@DeleteMapping
@PreAuthorize("@el.check('timing:del')")
public ResponseEntity<Object> removeJobByIds(@RequestBody Set<Long> ids) {
quartzJobService.removeJobByIds(ids);
systemQuartzJobService.removeJobByIds(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@@ -10,10 +10,10 @@ import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.framework.permission.util.SecurityHelper;
import cn.odboy.core.service.system.dto.UserJwtVo;
import cn.odboy.core.service.system.dto.UserLoginRequest;
import cn.odboy.core.dal.dataobject.system.UserInfoResponse;
import cn.odboy.core.dal.model.system.UserInfoResponse;
import cn.odboy.core.framework.permission.TokenProvider;
import cn.odboy.core.service.system.impl.UserDetailsServiceImpl;
import cn.odboy.core.service.system.impl.UserOnlineServiceImpl;
import cn.odboy.core.framework.permission.UserDetailsServiceImpl;
import cn.odboy.core.cache.service.impl.SystemUserOnlineServiceImpl;
import cn.odboy.exception.BadRequestException;
import cn.odboy.redis.RedisHelper;
import cn.odboy.util.RsaEncryptUtil;
@@ -49,7 +49,7 @@ import java.util.concurrent.TimeUnit;
@Api(tags = "系统:系统授权接口")
public class AuthController {
private final RedisHelper redisHelper;
private final UserOnlineServiceImpl onlineUserService;
private final SystemUserOnlineServiceImpl onlineUserService;
private final TokenProvider tokenProvider;
private final AppProperties properties;
private final PasswordEncoder passwordEncoder;
@@ -1,11 +1,11 @@
package cn.odboy.core.controller.system;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.DeptApi;
import cn.odboy.core.api.system.SystemDeptApi;
import cn.odboy.core.service.system.dto.CreateDeptRequest;
import cn.odboy.core.service.system.dto.QueryDeptRequest;
import cn.odboy.core.dal.dataobject.system.Dept;
import cn.odboy.core.service.system.DeptService;
import cn.odboy.core.service.system.SystemDeptService;
import cn.odboy.util.PageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -33,21 +33,21 @@ import java.util.stream.Collectors;
@Api(tags = "系统:部门管理")
@RequestMapping("/api/dept")
public class DeptController {
private final DeptApi deptApi;
private final DeptService deptService;
private final SystemDeptApi systemDeptApi;
private final SystemDeptService systemDeptService;
@ApiOperation("导出部门数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('dept:list')")
public void exportDept(HttpServletResponse response, QueryDeptRequest criteria) throws Exception {
deptService.downloadDeptExcel(deptApi.describeDeptList(criteria, false), response);
systemDeptService.downloadDeptExcel(systemDeptApi.describeDeptList(criteria, false), response);
}
@ApiOperation("查询部门")
@GetMapping
@PreAuthorize("@el.check('user:list','dept:list')")
public ResponseEntity<PageResult<Dept>> describeDeptPage(QueryDeptRequest criteria) throws Exception {
List<Dept> depts = deptApi.describeDeptList(criteria, true);
List<Dept> depts = systemDeptApi.describeDeptList(criteria, true);
return new ResponseEntity<>(PageUtil.toPage(depts), HttpStatus.OK);
}
@@ -57,8 +57,8 @@ public class DeptController {
public ResponseEntity<Object> describeDeptSuperiorTree(@RequestBody List<Long> ids, @RequestParam(defaultValue = "false") Boolean exclude) {
Set<Dept> deptSet = new LinkedHashSet<>();
for (Long id : ids) {
Dept dept = deptApi.describeDeptById(id);
List<Dept> depts = deptApi.describeSuperiorDeptListByPid(dept, new ArrayList<>());
Dept dept = systemDeptApi.describeDeptById(id);
List<Dept> depts = systemDeptApi.describeSuperiorDeptListByPid(dept, new ArrayList<>());
if (exclude) {
for (Dept data : depts) {
if (data.getId().equals(dept.getPid())) {
@@ -70,14 +70,14 @@ public class DeptController {
}
deptSet.addAll(depts);
}
return new ResponseEntity<>(deptApi.buildDeptTree(new ArrayList<>(deptSet)), HttpStatus.OK);
return new ResponseEntity<>(systemDeptApi.buildDeptTree(new ArrayList<>(deptSet)), HttpStatus.OK);
}
@ApiOperation("新增部门")
@PostMapping(value = "/saveDept")
@PreAuthorize("@el.check('dept:add')")
public ResponseEntity<Object> saveDept(@Validated @RequestBody CreateDeptRequest resources) {
deptService.saveDept(resources);
systemDeptService.saveDept(resources);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -85,7 +85,7 @@ public class DeptController {
@PostMapping(value = "/modifyDept")
@PreAuthorize("@el.check('dept:edit')")
public ResponseEntity<Object> modifyDept(@Validated(Dept.Update.class) @RequestBody Dept resources) {
deptService.modifyDept(resources);
systemDeptService.modifyDept(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -95,10 +95,10 @@ public class DeptController {
public ResponseEntity<Object> removeDeptByIds(@RequestBody Set<Long> ids) {
Set<Dept> depts = new HashSet<>();
// 获取部门,和其所有子部门
deptApi.traverseDeptByIdWithPids(ids, depts);
systemDeptApi.traverseDeptByIdWithPids(ids, depts);
// 验证是否被角色或用户关联
deptApi.verifyBindRelationByIds(depts);
deptService.removeDeptByIds(depts);
systemDeptApi.verifyBindRelationByIds(depts);
systemDeptService.removeDeptByIds(depts);
return new ResponseEntity<>(HttpStatus.OK);
}
}
@@ -1,11 +1,11 @@
package cn.odboy.core.controller.system;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.DictApi;
import cn.odboy.core.api.system.SystemDictApi;
import cn.odboy.core.service.system.dto.CreateDictRequest;
import cn.odboy.core.service.system.dto.QueryDictRequest;
import cn.odboy.core.dal.dataobject.system.Dict;
import cn.odboy.core.service.system.DictService;
import cn.odboy.core.service.system.SystemDictService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -29,21 +29,21 @@ import java.util.Set;
@Api(tags = "系统:字典管理")
@RequestMapping("/api/dict")
public class DictController {
private final DictApi dictApi;
private final DictService dictService;
private final SystemDictApi systemDictApi;
private final SystemDictService systemDictService;
@ApiOperation("导出字典数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('dict:list')")
public void exportDict(HttpServletResponse response, QueryDictRequest criteria) throws IOException {
dictService.downloadDictExcel(dictApi.describeDictList(criteria), response);
systemDictService.downloadDictExcel(systemDictApi.describeDictList(criteria), response);
}
@ApiOperation("查询字典")
@PostMapping(value = "/queryAllDict")
@PreAuthorize("@el.check('dict:list')")
public ResponseEntity<List<Dict>> queryAllDict() {
return new ResponseEntity<>(dictApi.describeDictList(new QueryDictRequest()), HttpStatus.OK);
return new ResponseEntity<>(systemDictApi.describeDictList(new QueryDictRequest()), HttpStatus.OK);
}
@ApiOperation("查询字典")
@@ -51,14 +51,14 @@ public class DictController {
@PreAuthorize("@el.check('dict:list')")
public ResponseEntity<PageResult<Dict>> queryDict(QueryDictRequest criteria) {
Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
return new ResponseEntity<>(dictApi.describeDictPage(criteria, page), HttpStatus.OK);
return new ResponseEntity<>(systemDictApi.describeDictPage(criteria, page), HttpStatus.OK);
}
@ApiOperation("新增字典")
@PostMapping(value = "/saveDict")
@PreAuthorize("@el.check('dict:add')")
public ResponseEntity<Object> saveDict(@Validated @RequestBody CreateDictRequest resources) {
dictService.saveDict(resources);
systemDictService.saveDict(resources);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -66,7 +66,7 @@ public class DictController {
@PostMapping(value = "/modifyDictById")
@PreAuthorize("@el.check('dict:edit')")
public ResponseEntity<Object> modifyDictById(@Validated(Dict.Update.class) @RequestBody Dict resources) {
dictService.modifyDictById(resources);
systemDictService.modifyDictById(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -74,7 +74,7 @@ public class DictController {
@PostMapping(value = "/removeDictByIds")
@PreAuthorize("@el.check('dict:del')")
public ResponseEntity<Object> removeDictByIds(@RequestBody Set<Long> ids) {
dictService.removeDictByIds(ids);
systemDictService.removeDictByIds(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
}
@@ -1,11 +1,11 @@
package cn.odboy.core.controller.system;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.DictDetailApi;
import cn.odboy.core.api.system.SystemDictDetailApi;
import cn.odboy.core.service.system.dto.CreateDictDetailRequest;
import cn.odboy.core.service.system.dto.QueryDictDetailRequest;
import cn.odboy.core.dal.dataobject.system.DictDetail;
import cn.odboy.core.service.system.DictDetailService;
import cn.odboy.core.service.system.SystemDictDetailService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -29,14 +29,14 @@ import java.util.Map;
@Api(tags = "系统:字典详情管理")
@RequestMapping("/api/dictDetail")
public class DictDetailController {
private final DictDetailService dictDetailService;
private final DictDetailApi dictDetailApi;
private final SystemDictDetailService systemDictDetailService;
private final SystemDictDetailApi systemDictDetailApi;
@ApiOperation("查询字典详情")
@GetMapping
public ResponseEntity<PageResult<DictDetail>> describeDictDetailPage(QueryDictDetailRequest criteria) {
Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
return new ResponseEntity<>(dictDetailApi.describeDictDetailPage(criteria, page), HttpStatus.OK);
return new ResponseEntity<>(systemDictDetailApi.describeDictDetailPage(criteria, page), HttpStatus.OK);
}
@ApiOperation("查询多个字典详情")
@@ -45,7 +45,7 @@ public class DictDetailController {
String[] names = dictName.split("[,,]");
Map<String, List<DictDetail>> dictMap = new HashMap<>(16);
for (String name : names) {
dictMap.put(name, dictDetailApi.describeDictDetailListByName(name));
dictMap.put(name, systemDictDetailApi.describeDictDetailListByName(name));
}
return new ResponseEntity<>(dictMap, HttpStatus.OK);
}
@@ -54,7 +54,7 @@ public class DictDetailController {
@PostMapping(value = "/saveDictDetail")
@PreAuthorize("@el.check('dict:add')")
public ResponseEntity<Object> saveDictDetail(@Validated @RequestBody CreateDictDetailRequest resources) {
dictDetailService.saveDictDetail(resources);
systemDictDetailService.saveDictDetail(resources);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -62,7 +62,7 @@ public class DictDetailController {
@PostMapping(value = "/modifyDictDetailById")
@PreAuthorize("@el.check('dict:edit')")
public ResponseEntity<Object> modifyDictDetailById(@Validated(DictDetail.Update.class) @RequestBody DictDetail resources) {
dictDetailService.modifyDictDetailById(resources);
systemDictDetailService.modifyDictDetailById(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -70,7 +70,7 @@ public class DictDetailController {
@PostMapping(value = "/removeDictDetailById")
@PreAuthorize("@el.check('dict:del')")
public ResponseEntity<Object> removeDictDetailById(@RequestBody DictDetail args) {
dictDetailService.removeDictDetailById(args.getId());
systemDictDetailService.removeDictDetailById(args.getId());
return new ResponseEntity<>(HttpStatus.OK);
}
}
@@ -1,11 +1,11 @@
package cn.odboy.core.controller.system;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.JobApi;
import cn.odboy.core.api.system.SystemJobApi;
import cn.odboy.core.service.system.dto.CreateJobRequest;
import cn.odboy.core.service.system.dto.QueryJobRequest;
import cn.odboy.core.dal.dataobject.system.Job;
import cn.odboy.core.service.system.JobService;
import cn.odboy.core.service.system.SystemJobService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -29,14 +29,14 @@ import java.util.Set;
@Api(tags = "系统:岗位管理")
@RequestMapping("/api/job")
public class JobController {
private final JobApi jobApi;
private final JobService jobService;
private final SystemJobApi systemJobApi;
private final SystemJobService systemJobService;
@ApiOperation("导出岗位数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('job:list')")
public void exportJob(HttpServletResponse response, QueryJobRequest criteria) throws IOException {
jobService.downloadJobExcel(jobApi.describeJobList(criteria), response);
systemJobService.downloadJobExcel(systemJobApi.describeJobList(criteria), response);
}
@ApiOperation("查询岗位")
@@ -44,14 +44,14 @@ public class JobController {
@PreAuthorize("@el.check('job:list','user:list')")
public ResponseEntity<PageResult<Job>> queryJob(QueryJobRequest criteria) {
Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
return new ResponseEntity<>(jobApi.describeJobPage(criteria, page), HttpStatus.OK);
return new ResponseEntity<>(systemJobApi.describeJobPage(criteria, page), HttpStatus.OK);
}
@ApiOperation("新增岗位")
@PostMapping(value = "/saveJob")
@PreAuthorize("@el.check('job:add')")
public ResponseEntity<Object> saveJob(@Validated @RequestBody CreateJobRequest resources) {
jobService.saveJob(resources);
systemJobService.saveJob(resources);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -59,7 +59,7 @@ public class JobController {
@PostMapping(value = "/modifyJobById")
@PreAuthorize("@el.check('job:edit')")
public ResponseEntity<Object> modifyJobById(@Validated(Job.Update.class) @RequestBody Job resources) {
jobService.modifyJobById(resources);
systemJobService.modifyJobById(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -68,8 +68,8 @@ public class JobController {
@PreAuthorize("@el.check('job:del')")
public ResponseEntity<Object> removeJobByIds(@RequestBody Set<Long> ids) {
// 验证是否被用户关联
jobApi.verifyBindRelationByIds(ids);
jobService.removeJobByIds(ids);
systemJobApi.verifyBindRelationByIds(ids);
systemJobService.removeJobByIds(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
}
@@ -2,12 +2,12 @@ package cn.odboy.core.controller.system;
import cn.hutool.core.collection.CollectionUtil;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.MenuApi;
import cn.odboy.core.api.system.SystemMenuApi;
import cn.odboy.core.framework.permission.util.SecurityHelper;
import cn.odboy.core.service.system.dto.QueryMenuRequest;
import cn.odboy.core.dal.dataobject.system.Menu;
import cn.odboy.core.dal.dataobject.system.MenuResponse;
import cn.odboy.core.service.system.MenuService;
import cn.odboy.core.dal.model.system.MenuResponse;
import cn.odboy.core.service.system.SystemMenuService;
import cn.odboy.exception.BadRequestException;
import cn.odboy.util.PageUtil;
import io.swagger.annotations.Api;
@@ -38,29 +38,29 @@ import java.util.stream.Collectors;
@RequestMapping("/api/menus")
public class MenuController {
private static final String ENTITY_NAME = "menu";
private final MenuApi menuApi;
private final MenuService menuService;
private final SystemMenuApi systemMenuApi;
private final SystemMenuService systemMenuService;
@ApiOperation("导出菜单数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('menu:list')")
public void exportMenu(HttpServletResponse response, QueryMenuRequest criteria) throws Exception {
menuService.downloadMenuExcel(menuApi.describeMenuList(criteria, false), response);
systemMenuService.downloadMenuExcel(systemMenuApi.describeMenuList(criteria, false), response);
}
@PostMapping(value = "/buildMenus")
@ApiOperation("获取前端所需菜单")
public ResponseEntity<List<MenuResponse>> buildMenus() {
List<Menu> menuList = menuApi.describeMenuListByUserId(SecurityHelper.getCurrentUserId());
List<Menu> menus = menuApi.buildMenuTree(menuList);
return new ResponseEntity<>(menuApi.buildMenuResponse(menus), HttpStatus.OK);
List<Menu> menuList = systemMenuApi.describeMenuListByUserId(SecurityHelper.getCurrentUserId());
List<Menu> menus = systemMenuApi.buildMenuTree(menuList);
return new ResponseEntity<>(systemMenuApi.buildMenuResponse(menus), HttpStatus.OK);
}
@ApiOperation("返回全部的菜单")
@PostMapping(value = "/describeMenuListByPid")
@PreAuthorize("@el.check('menu:list','roles:list')")
public ResponseEntity<List<Menu>> describeMenuListByPid(@RequestParam Long pid) {
return new ResponseEntity<>(menuApi.describeMenuListByPid(pid), HttpStatus.OK);
return new ResponseEntity<>(systemMenuApi.describeMenuListByPid(pid), HttpStatus.OK);
}
@ApiOperation("根据菜单ID返回所有子节点ID,包含自身ID")
@@ -68,9 +68,9 @@ public class MenuController {
@PreAuthorize("@el.check('menu:list','roles:list')")
public ResponseEntity<Object> describeChildMenuSet(@RequestParam Long id) {
Set<Menu> menuSet = new HashSet<>();
List<Menu> menuList = menuApi.describeMenuListByPid(id);
menuSet.add(menuApi.describeMenuById(id));
menuSet = menuApi.describeChildMenuSet(menuList, menuSet);
List<Menu> menuList = systemMenuApi.describeMenuListByPid(id);
menuSet.add(systemMenuApi.describeMenuById(id));
menuSet = systemMenuApi.describeChildMenuSet(menuList, menuSet);
Set<Long> ids = menuSet.stream().map(Menu::getId).collect(Collectors.toSet());
return new ResponseEntity<>(ids, HttpStatus.OK);
}
@@ -79,7 +79,7 @@ public class MenuController {
@ApiOperation("查询菜单")
@PreAuthorize("@el.check('menu:list')")
public ResponseEntity<PageResult<Menu>> queryMenu(QueryMenuRequest criteria) throws Exception {
List<Menu> menuList = menuApi.describeMenuList(criteria, true);
List<Menu> menuList = systemMenuApi.describeMenuList(criteria, true);
return new ResponseEntity<>(PageUtil.toPage(menuList), HttpStatus.OK);
}
@@ -90,8 +90,8 @@ public class MenuController {
Set<Menu> menus = new LinkedHashSet<>();
if (CollectionUtil.isNotEmpty(ids)) {
for (Long id : ids) {
Menu menu = menuApi.describeMenuById(id);
List<Menu> menuList = menuApi.describeSuperiorMenuList(menu, new ArrayList<>());
Menu menu = systemMenuApi.describeMenuById(id);
List<Menu> menuList = systemMenuApi.describeSuperiorMenuList(menu, new ArrayList<>());
for (Menu data : menuList) {
if (data.getId().equals(menu.getPid())) {
data.setSubCount(data.getSubCount() - 1);
@@ -101,9 +101,9 @@ public class MenuController {
}
// 编辑菜单时不显示自己以及自己下级的数据,避免出现PID数据环形问题
menus = menus.stream().filter(i -> !ids.contains(i.getId())).collect(Collectors.toSet());
return new ResponseEntity<>(menuApi.buildMenuTree(new ArrayList<>(menus)), HttpStatus.OK);
return new ResponseEntity<>(systemMenuApi.buildMenuTree(new ArrayList<>(menus)), HttpStatus.OK);
}
return new ResponseEntity<>(menuApi.describeMenuListByPid(null), HttpStatus.OK);
return new ResponseEntity<>(systemMenuApi.describeMenuListByPid(null), HttpStatus.OK);
}
@ApiOperation("新增菜单")
@@ -113,7 +113,7 @@ public class MenuController {
if (resources.getId() != null) {
throw new BadRequestException("A new " + ENTITY_NAME + " cannot already have an ID");
}
menuService.saveMenu(resources);
systemMenuService.saveMenu(resources);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -121,7 +121,7 @@ public class MenuController {
@PostMapping(value = "/modifyMenuById")
@PreAuthorize("@el.check('menu:edit')")
public ResponseEntity<Object> modifyMenuById(@Validated(Menu.Update.class) @RequestBody Menu resources) {
menuService.modifyMenuById(resources);
systemMenuService.modifyMenuById(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -131,11 +131,11 @@ public class MenuController {
public ResponseEntity<Object> removeMenuByIds(@RequestBody Set<Long> ids) {
Set<Menu> menuSet = new HashSet<>();
for (Long id : ids) {
List<Menu> menuList = menuApi.describeMenuListByPid(id);
menuSet.add(menuApi.describeMenuById(id));
menuSet = menuApi.describeChildMenuSet(menuList, menuSet);
List<Menu> menuList = systemMenuApi.describeMenuListByPid(id);
menuSet.add(systemMenuApi.describeMenuById(id));
menuSet = systemMenuApi.describeChildMenuSet(menuList, menuSet);
}
menuService.removeMenuByIds(menuSet);
systemMenuService.removeMenuByIds(menuSet);
return new ResponseEntity<>(HttpStatus.OK);
}
}
@@ -1,6 +1,6 @@
package cn.odboy.core.controller.system;
import cn.odboy.core.api.system.MonitorApi;
import cn.odboy.core.api.system.SystemMonitorApi;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/api/monitor")
public class MonitorController {
private final MonitorApi serverService;
private final SystemMonitorApi serverService;
@PostMapping(value = "/describeServerMonitorInfo")
@ApiOperation("查询服务监控")
@@ -1,9 +1,9 @@
package cn.odboy.core.controller.system;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.UserOnlineApi;
import cn.odboy.core.cache.api.SystemUserOnlineApi;
import cn.odboy.core.service.system.dto.UserOnlineVo;
import cn.odboy.core.service.system.UserOnlineService;
import cn.odboy.core.cache.service.SystemUserOnlineService;
import cn.odboy.util.DesEncryptUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -27,21 +27,21 @@ import java.util.Set;
@RequestMapping("/auth/online")
@Api(tags = "系统:在线用户管理")
public class OnlineController {
private final UserOnlineApi userOnlineApi;
private final UserOnlineService userOnlineService;
private final SystemUserOnlineApi systemUserOnlineApi;
private final SystemUserOnlineService systemUserOnlineService;
@ApiOperation("查询在线用户")
@GetMapping
@PreAuthorize("@el.check()")
public ResponseEntity<PageResult<UserOnlineVo>> queryOnlineUser(String username, Pageable pageable) {
return new ResponseEntity<>(userOnlineApi.describeUserOnlineModelPage(username, pageable), HttpStatus.OK);
return new ResponseEntity<>(systemUserOnlineApi.describeUserOnlineModelPage(username, pageable), HttpStatus.OK);
}
@ApiOperation("导出数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check()")
public void exportOnlineUser(HttpServletResponse response, String username) throws IOException {
userOnlineService.downloadUserOnlineModelExcel(userOnlineApi.describeUserOnlineModelListByUsername(username), response);
systemUserOnlineService.downloadUserOnlineModelExcel(systemUserOnlineApi.describeUserOnlineModelListByUsername(username), response);
}
@ApiOperation("踢出用户")
@@ -51,7 +51,7 @@ public class OnlineController {
for (String token : keys) {
// 解密Key
token = DesEncryptUtil.desDecrypt(token);
userOnlineService.logoutByToken(token);
systemUserOnlineService.logoutByToken(token);
}
return new ResponseEntity<>(HttpStatus.OK);
}
@@ -2,12 +2,12 @@ package cn.odboy.core.controller.system;
import cn.hutool.core.lang.Dict;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.RoleApi;
import cn.odboy.core.api.system.SystemRoleApi;
import cn.odboy.core.framework.permission.util.SecurityHelper;
import cn.odboy.core.service.system.dto.CreateRoleRequest;
import cn.odboy.core.service.system.dto.QueryRoleRequest;
import cn.odboy.core.dal.dataobject.system.Role;
import cn.odboy.core.service.system.RoleService;
import cn.odboy.core.service.system.SystemRoleService;
import cn.odboy.exception.BadRequestException;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
@@ -35,28 +35,28 @@ import java.util.stream.Collectors;
@Api(tags = "系统:角色管理")
@RequestMapping("/api/roles")
public class RoleController {
private final RoleApi roleApi;
private final RoleService roleService;
private final SystemRoleApi systemRoleApi;
private final SystemRoleService systemRoleService;
@ApiOperation("获取单个role")
@PostMapping(value = "/describeRoleById")
@PreAuthorize("@el.check('roles:list')")
public ResponseEntity<Role> describeRoleById(@RequestBody Role args) {
return new ResponseEntity<>(roleApi.describeRoleById(args.getId()), HttpStatus.OK);
return new ResponseEntity<>(systemRoleApi.describeRoleById(args.getId()), HttpStatus.OK);
}
@ApiOperation("导出角色数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('role:list')")
public void exportRole(HttpServletResponse response, QueryRoleRequest criteria) throws IOException {
roleService.downloadRoleExcel(roleApi.describeRoleList(criteria), response);
systemRoleService.downloadRoleExcel(systemRoleApi.describeRoleList(criteria), response);
}
@ApiOperation("返回全部的角色")
@PostMapping(value = "/describeRoleList")
@PreAuthorize("@el.check('roles:list','user:add','user:edit')")
public ResponseEntity<List<Role>> describeRoleList() {
return new ResponseEntity<>(roleApi.describeRoleList(), HttpStatus.OK);
return new ResponseEntity<>(systemRoleApi.describeRoleList(), HttpStatus.OK);
}
@ApiOperation("查询角色")
@@ -64,7 +64,7 @@ public class RoleController {
@PreAuthorize("@el.check('roles:list')")
public ResponseEntity<PageResult<Role>> describeRolePage(QueryRoleRequest criteria) {
Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
return new ResponseEntity<>(roleApi.describeRolePage(criteria, page), HttpStatus.OK);
return new ResponseEntity<>(systemRoleApi.describeRolePage(criteria, page), HttpStatus.OK);
}
@ApiOperation("获取用户级别")
@@ -78,7 +78,7 @@ public class RoleController {
@PreAuthorize("@el.check('roles:add')")
public ResponseEntity<Object> saveRole(@Validated @RequestBody CreateRoleRequest resources) {
checkRoleLevels(resources.getLevel());
roleService.saveRole(resources);
systemRoleService.saveRole(resources);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -87,7 +87,7 @@ public class RoleController {
@PreAuthorize("@el.check('roles:edit')")
public ResponseEntity<Object> modifyRoleById(@Validated(Role.Update.class) @RequestBody Role resources) {
checkRoleLevels(resources.getLevel());
roleService.modifyRoleById(resources);
systemRoleService.modifyRoleById(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -95,9 +95,9 @@ public class RoleController {
@PostMapping(value = "/modifyBindMenuById")
@PreAuthorize("@el.check('roles:edit')")
public ResponseEntity<Object> modifyBindMenuById(@RequestBody Role resources) {
Role role = roleService.getById(resources.getId());
Role role = systemRoleService.getById(resources.getId());
checkRoleLevels(role.getLevel());
roleService.modifyBindMenuById(resources);
systemRoleService.modifyBindMenuById(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -106,12 +106,12 @@ public class RoleController {
@PreAuthorize("@el.check('roles:del')")
public ResponseEntity<Object> removeRoleByIds(@RequestBody Set<Long> ids) {
for (Long id : ids) {
Role role = roleService.getById(id);
Role role = systemRoleService.getById(id);
checkRoleLevels(role.getLevel());
}
// 验证是否被用户关联
roleApi.verifyBindRelationByIds(ids);
roleService.removeRoleByIds(ids);
systemRoleApi.verifyBindRelationByIds(ids);
systemRoleService.removeRoleByIds(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@@ -121,7 +121,7 @@ public class RoleController {
* @return /
*/
private int checkRoleLevels(Integer level) {
List<Integer> levels = roleApi.describeRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(Role::getLevel).collect(Collectors.toList());
List<Integer> levels = systemRoleApi.describeRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(Role::getLevel).collect(Collectors.toList());
int min = Collections.min(levels);
if (level != null) {
if (level < min) {
@@ -3,18 +3,18 @@ package cn.odboy.core.controller.system;
import cn.hutool.core.collection.CollectionUtil;
import cn.odboy.base.MyMetaOption;
import cn.odboy.base.PageResult;
import cn.odboy.core.api.system.DataApi;
import cn.odboy.core.api.system.DeptApi;
import cn.odboy.core.api.system.RoleApi;
import cn.odboy.core.api.system.UserApi;
import cn.odboy.core.api.system.SystemDataApi;
import cn.odboy.core.api.system.SystemDeptApi;
import cn.odboy.core.api.system.SystemRoleApi;
import cn.odboy.core.api.system.SystemUserApi;
import cn.odboy.core.constant.CaptchaBizEnum;
import cn.odboy.core.dal.dataobject.system.Dept;
import cn.odboy.core.dal.dataobject.system.Role;
import cn.odboy.core.dal.dataobject.system.UpdateUserPasswordResponse;
import cn.odboy.core.dal.model.system.UpdateUserPasswordResponse;
import cn.odboy.core.dal.dataobject.system.User;
import cn.odboy.core.framework.permission.util.SecurityHelper;
import cn.odboy.core.framework.properties.AppProperties;
import cn.odboy.core.service.system.UserService;
import cn.odboy.core.service.system.SystemUserService;
import cn.odboy.core.service.system.dto.QueryUserRequest;
import cn.odboy.core.service.tools.CaptchaService;
import cn.odboy.exception.BadRequestException;
@@ -55,11 +55,11 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor
public class UserController {
private final PasswordEncoder passwordEncoder;
private final UserService userService;
private final DataApi dataApi;
private final DeptApi deptApi;
private final RoleApi roleApi;
private final UserApi userApi;
private final SystemUserService systemUserService;
private final SystemDataApi systemDataApi;
private final SystemDeptApi systemDeptApi;
private final SystemRoleApi systemRoleApi;
private final SystemUserApi systemUserApi;
private final CaptchaService verificationCodeService;
private final AppProperties properties;
@@ -67,7 +67,7 @@ public class UserController {
@GetMapping(value = "/download")
@PreAuthorize("@el.check('user:list')")
public void downloadUserExcel(HttpServletResponse response, QueryUserRequest criteria) throws IOException {
userService.downloadUserExcel(userApi.describeUserList(criteria), response);
systemUserService.downloadUserExcel(systemUserApi.describeUserList(criteria), response);
}
@ApiOperation("查询用户")
@@ -78,23 +78,23 @@ public class UserController {
if (!ObjectUtils.isEmpty(criteria.getDeptId())) {
criteria.getDeptIds().add(criteria.getDeptId());
// 先查找是否存在子节点
List<Dept> data = deptApi.describeDeptListByPid(criteria.getDeptId());
List<Dept> data = systemDeptApi.describeDeptListByPid(criteria.getDeptId());
// 然后把子节点的ID都加入到集合中
criteria.getDeptIds().addAll(deptApi.describeChildDeptIdListByDeptIds(data));
criteria.getDeptIds().addAll(systemDeptApi.describeChildDeptIdListByDeptIds(data));
}
// 数据权限
List<Long> dataScopes = dataApi.describeDeptIdListByUserIdWithDeptId(userApi.describeUserByUsername(SecurityHelper.getCurrentUsername()));
List<Long> dataScopes = systemDataApi.describeDeptIdListByUserIdWithDeptId(systemUserApi.describeUserByUsername(SecurityHelper.getCurrentUsername()));
// criteria.getDeptIds() 不为空并且数据权限不为空则取交集
if (!CollectionUtils.isEmpty(criteria.getDeptIds()) && !CollectionUtils.isEmpty(dataScopes)) {
// 取交集
criteria.getDeptIds().retainAll(dataScopes);
if (!CollectionUtil.isEmpty(criteria.getDeptIds())) {
return new ResponseEntity<>(userApi.describeUserPage(criteria, page), HttpStatus.OK);
return new ResponseEntity<>(systemUserApi.describeUserPage(criteria, page), HttpStatus.OK);
}
} else {
// 否则取并集
criteria.getDeptIds().addAll(dataScopes);
return new ResponseEntity<>(userApi.describeUserPage(criteria, page), HttpStatus.OK);
return new ResponseEntity<>(systemUserApi.describeUserPage(criteria, page), HttpStatus.OK);
}
return new ResponseEntity<>(PageUtil.noData(), HttpStatus.OK);
}
@@ -106,7 +106,7 @@ public class UserController {
checkLevel(resources);
// 默认密码 123456
resources.setPassword(passwordEncoder.encode("123456"));
userService.saveUser(resources);
systemUserService.saveUser(resources);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -115,7 +115,7 @@ public class UserController {
@PreAuthorize("@el.check('user:edit')")
public ResponseEntity<Object> modifyUserById(@Validated(User.Update.class) @RequestBody User resources) throws Exception {
checkLevel(resources);
userService.modifyUserById(resources);
systemUserService.modifyUserById(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -125,7 +125,7 @@ public class UserController {
if (!resources.getId().equals(SecurityHelper.getCurrentUserId())) {
throw new BadRequestException("不能修改他人资料");
}
userService.modifyUserCenterInfoById(resources);
systemUserService.modifyUserCenterInfoById(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -134,13 +134,13 @@ public class UserController {
@PreAuthorize("@el.check('user:del')")
public ResponseEntity<Object> removeUserByIds(@RequestBody Set<Long> ids) {
for (Long id : ids) {
Integer currentLevel = Collections.min(roleApi.describeRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(Role::getLevel).collect(Collectors.toList()));
Integer optLevel = Collections.min(roleApi.describeRoleListByUsersId(id).stream().map(Role::getLevel).collect(Collectors.toList()));
Integer currentLevel = Collections.min(systemRoleApi.describeRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(Role::getLevel).collect(Collectors.toList()));
Integer optLevel = Collections.min(systemRoleApi.describeRoleListByUsersId(id).stream().map(Role::getLevel).collect(Collectors.toList()));
if (currentLevel > optLevel) {
throw new BadRequestException("角色权限不足,不能删除:" + userApi.describeUserById(id).getUsername());
throw new BadRequestException("角色权限不足,不能删除:" + systemUserApi.describeUserById(id).getUsername());
}
}
userService.removeUserByIds(ids);
systemUserService.removeUserByIds(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@@ -149,14 +149,14 @@ public class UserController {
public ResponseEntity<Object> modifyUserPasswordByUsername(@RequestBody UpdateUserPasswordResponse passVo) throws Exception {
String oldPass = RsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), passVo.getOldPass());
String newPass = RsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), passVo.getNewPass());
User user = userApi.describeUserByUsername(SecurityHelper.getCurrentUsername());
User user = systemUserApi.describeUserByUsername(SecurityHelper.getCurrentUsername());
if (!passwordEncoder.matches(oldPass, user.getPassword())) {
throw new BadRequestException("修改失败,旧密码错误");
}
if (passwordEncoder.matches(newPass, user.getPassword())) {
throw new BadRequestException("新密码不能与旧密码相同");
}
userService.modifyUserPasswordByUsername(user.getUsername(), passwordEncoder.encode(newPass));
systemUserService.modifyUserPasswordByUsername(user.getUsername(), passwordEncoder.encode(newPass));
return new ResponseEntity<>(HttpStatus.OK);
}
@@ -164,26 +164,26 @@ public class UserController {
@PostMapping(value = "/resetUserPasswordByIds")
public ResponseEntity<Object> resetUserPasswordByIds(@RequestBody Set<Long> ids) {
String defaultPwd = passwordEncoder.encode("123456");
userService.resetUserPasswordByIds(ids, defaultPwd);
systemUserService.resetUserPasswordByIds(ids, defaultPwd);
return new ResponseEntity<>(HttpStatus.OK);
}
@ApiOperation("修改头像")
@PostMapping(value = "/modifyUserAvatar")
public ResponseEntity<Object> modifyUserAvatar(@RequestParam MultipartFile avatar) {
return new ResponseEntity<>(userService.modifyUserAvatar(avatar), HttpStatus.OK);
return new ResponseEntity<>(systemUserService.modifyUserAvatar(avatar), HttpStatus.OK);
}
@ApiOperation("修改邮箱")
@PostMapping(value = "/modifyUserEmailByUsername/{code}")
public ResponseEntity<Object> modifyUserEmailByUsername(@PathVariable String code, @RequestBody User resources) throws Exception {
String password = RsaEncryptUtil.decryptByPrivateKey(properties.getRsa().getPrivateKey(), resources.getPassword());
User user = userApi.describeUserByUsername(SecurityHelper.getCurrentUsername());
User user = systemUserApi.describeUserByUsername(SecurityHelper.getCurrentUsername());
if (!passwordEncoder.matches(password, user.getPassword())) {
throw new BadRequestException("密码错误");
}
verificationCodeService.checkCodeAvailable(CaptchaBizEnum.EMAIL_RESET_EMAIL_CODE.getBizCode(), resources.getEmail(), code);
userService.modifyUserEmailByUsername(user.getUsername(), resources.getEmail());
systemUserService.modifyUserEmailByUsername(user.getUsername(), resources.getEmail());
return new ResponseEntity<>(HttpStatus.OK);
}
@@ -193,8 +193,8 @@ public class UserController {
* @param resources /
*/
private void checkLevel(User resources) {
Integer currentLevel = Collections.min(roleApi.describeRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(Role::getLevel).collect(Collectors.toList()));
Integer optLevel = roleApi.describeDeptLevelByRoles(resources.getRoles());
Integer currentLevel = Collections.min(systemRoleApi.describeRoleListByUsersId(SecurityHelper.getCurrentUserId()).stream().map(Role::getLevel).collect(Collectors.toList()));
Integer optLevel = systemRoleApi.describeDeptLevelByRoles(resources.getRoles());
if (currentLevel > optLevel) {
throw new BadRequestException("角色权限不足");
}
@@ -205,7 +205,7 @@ public class UserController {
@PreAuthorize("@el.check('user:list')")
public ResponseEntity<List<MyMetaOption>> queryUserMetadataOptions(@Validated @RequestBody QueryUserRequest criteria) {
int maxPageSize = 50;
return new ResponseEntity<>(userService.page(new Page<>(criteria.getPage(), maxPageSize), new LambdaQueryWrapper<User>()
return new ResponseEntity<>(systemUserService.page(new Page<>(criteria.getPage(), maxPageSize), new LambdaQueryWrapper<User>()
.and(c -> {
c.eq(User::getPhone, criteria.getBlurry());
c.or();
@@ -15,7 +15,7 @@ import javax.validation.constraints.NotNull;
@Getter
@Setter
@TableName("sys_quartz_job")
@TableName("system_quartz_job")
public class QuartzJob extends MyEntity {
public static final String JOB_KEY = "JOB_KEY";
@@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode;
import java.sql.Timestamp;
@Data
@TableName("sys_quartz_log")
@TableName("system_quartz_log")
@EqualsAndHashCode(callSuper = false)
public class QuartzLog extends MyObject {
@@ -17,7 +17,7 @@ import java.util.Set;
@Getter
@Setter
@TableName("sys_dept")
@TableName("system_dept")
public class Dept extends MyEntity {
@NotNull(groups = Update.class)
@@ -15,7 +15,7 @@ import javax.validation.constraints.NotNull;
@Getter
@Setter
@TableName("sys_dict")
@TableName("system_dict")
public class Dict extends MyEntity {
@NotNull(groups = Update.class)
@@ -12,7 +12,7 @@ import javax.validation.constraints.NotNull;
@Getter
@Setter
@TableName("sys_dict_detail")
@TableName("system_dict_detail")
public class DictDetail extends MyEntity {
@NotNull(groups = Update.class)
@@ -14,7 +14,7 @@ import java.util.Objects;
@Getter
@Setter
@TableName("sys_job")
@TableName("system_job")
public class Job extends MyEntity {
@NotNull(groups = Update.class)
@@ -16,7 +16,7 @@ import java.util.Set;
@Getter
@Setter
@TableName("sys_menu")
@TableName("system_menu")
public class Menu extends MyEntity {
@NotNull(groups = {Update.class})
@@ -20,7 +20,7 @@ import java.util.Set;
*/
@Getter
@Setter
@TableName("sys_role")
@TableName("system_role")
public class Role extends MyEntity {
@NotNull(groups = {Update.class})
@@ -17,7 +17,7 @@ import java.util.Set;
@Getter
@Setter
@TableName("sys_user")
@TableName("system_user")
public class User extends MyEntity {
@NotNull(groups = Update.class)
@@ -1,4 +1,4 @@
package cn.odboy.core.dal.dataobject.system;
package cn.odboy.core.dal.model.system;
import cn.odboy.base.MyObject;
import cn.odboy.core.service.system.dto.MenuMetaVo;
@@ -1,4 +1,4 @@
package cn.odboy.core.dal.dataobject.system;
package cn.odboy.core.dal.model.system;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -1,4 +1,4 @@
package cn.odboy.core.dal.dataobject.system;
package cn.odboy.core.dal.model.system;
import cn.odboy.base.MyObject;
import cn.odboy.core.service.system.dto.RoleCodeVo;
@@ -1,6 +1,6 @@
package cn.odboy.core.dal.mysql.job;
import cn.odboy.core.service.job.dto.QueryQuartzJobRequest;
import cn.odboy.core.service.system.dto.QueryQuartzJobRequest;
import cn.odboy.core.dal.dataobject.job.QuartzJob;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -1,6 +1,6 @@
package cn.odboy.core.dal.mysql.job;
import cn.odboy.core.service.job.dto.QueryQuartzJobRequest;
import cn.odboy.core.service.system.dto.QueryQuartzJobRequest;
import cn.odboy.core.dal.dataobject.job.QuartzLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -1,7 +1,7 @@
package cn.odboy.core.framework.permission;
import cn.odboy.constant.RequestMethodEnum;
import cn.odboy.core.api.system.UserOnlineApi;
import cn.odboy.core.cache.api.SystemUserOnlineApi;
import cn.odboy.util.AnonTagUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.context.ApplicationContext;
@@ -30,7 +30,7 @@ public class SpringSecurityConfig {
private final JwtAuthenticationEntryPoint authenticationErrorHandler;
private final JwtAccessDeniedHandler jwtAccessDeniedHandler;
private final ApplicationContext applicationContext;
private final UserOnlineApi userOnlineApi;
private final SystemUserOnlineApi systemUserOnlineApi;
@Bean
GrantedAuthorityDefaults grantedAuthorityDefaults() {
@@ -108,6 +108,6 @@ public class SpringSecurityConfig {
}
private TokenConfigurer securityConfigurerAdapter() {
return new TokenConfigurer(tokenProvider, userOnlineApi);
return new TokenConfigurer(tokenProvider, systemUserOnlineApi);
}
}
@@ -1,6 +1,6 @@
package cn.odboy.core.framework.permission;
import cn.odboy.core.api.system.UserOnlineApi;
import cn.odboy.core.cache.api.SystemUserOnlineApi;
import lombok.RequiredArgsConstructor;
import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -10,11 +10,11 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
@RequiredArgsConstructor
public class TokenConfigurer extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> {
private final TokenProvider tokenProvider;
private final UserOnlineApi userOnlineApi;
private final SystemUserOnlineApi systemUserOnlineApi;
@Override
public void configure(HttpSecurity http) {
TokenFilter customFilter = new TokenFilter(tokenProvider, userOnlineApi);
TokenFilter customFilter = new TokenFilter(tokenProvider, systemUserOnlineApi);
http.addFilterBefore(customFilter, UsernamePasswordAuthenticationFilter.class);
}
}
@@ -2,7 +2,7 @@ package cn.odboy.core.framework.permission;
import cn.hutool.core.util.StrUtil;
import cn.odboy.constant.SystemConst;
import cn.odboy.core.api.system.UserOnlineApi;
import cn.odboy.core.cache.api.SystemUserOnlineApi;
import cn.odboy.core.service.system.dto.UserOnlineVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.Authentication;
@@ -19,14 +19,14 @@ import java.io.IOException;
@Slf4j
public class TokenFilter extends GenericFilterBean {
private final TokenProvider tokenProvider;
private final UserOnlineApi userOnlineApi;
private final SystemUserOnlineApi systemUserOnlineApi;
/**
* @param tokenProvider Token
* @param userOnlineApi 用户在线
* @param systemUserOnlineApi 用户在线
*/
public TokenFilter(TokenProvider tokenProvider, UserOnlineApi userOnlineApi) {
this.userOnlineApi = userOnlineApi;
public TokenFilter(TokenProvider tokenProvider, SystemUserOnlineApi systemUserOnlineApi) {
this.systemUserOnlineApi = systemUserOnlineApi;
this.tokenProvider = tokenProvider;
}
@@ -38,7 +38,7 @@ public class TokenFilter extends GenericFilterBean {
if (StrUtil.isNotBlank(token)) {
// 获取用户Token的Key
String loginKey = tokenProvider.loginKey(token);
UserOnlineVo userOnlineVo = userOnlineApi.describeUserOnlineModelByKey(loginKey);
UserOnlineVo userOnlineVo = systemUserOnlineApi.describeUserOnlineModelByKey(loginKey);
// 判断用户在线信息是否为空
if (userOnlineVo != null) {
// Token 续期判断
@@ -1,11 +1,11 @@
package cn.odboy.core.service.system.impl;
package cn.odboy.core.framework.permission;
import cn.odboy.core.api.system.DataApi;
import cn.odboy.core.api.system.RoleApi;
import cn.odboy.core.api.system.UserApi;
import cn.odboy.core.api.system.UserCacheApi;
import cn.odboy.core.api.system.SystemDataApi;
import cn.odboy.core.api.system.SystemRoleApi;
import cn.odboy.core.api.system.SystemUserApi;
import cn.odboy.core.cache.api.SystemUserCacheApi;
import cn.odboy.core.dal.dataobject.system.User;
import cn.odboy.core.service.system.UserCacheService;
import cn.odboy.core.cache.service.SystemUserCacheService;
import cn.odboy.core.service.system.dto.RoleCodeVo;
import cn.odboy.core.service.system.dto.UserJwtVo;
import cn.odboy.exception.BadRequestException;
@@ -19,17 +19,17 @@ import java.util.List;
@RequiredArgsConstructor
@Service("userDetailsService")
public class UserDetailsServiceImpl implements UserDetailsService {
private final RoleApi roleApi;
private final UserApi userApi;
private final DataApi dataApi;
private final UserCacheService userCacheService;
private final UserCacheApi userCacheApi;
private final SystemRoleApi systemRoleApi;
private final SystemUserApi systemUserApi;
private final SystemDataApi systemDataApi;
private final SystemUserCacheService systemUserCacheService;
private final SystemUserCacheApi systemUserCacheApi;
@Override
public UserJwtVo loadUserByUsername(String username) {
UserJwtVo userJwtVo = userCacheApi.describeUserJwtModelByUsername(username);
UserJwtVo userJwtVo = systemUserCacheApi.describeUserJwtModelByUsername(username);
if (userJwtVo == null) {
User user = userApi.describeUserByUsername(username);
User user = systemUserApi.describeUserByUsername(username);
if (user == null) {
throw new BadRequestException("用户不存在");
} else {
@@ -37,11 +37,11 @@ public class UserDetailsServiceImpl implements UserDetailsService {
throw new BadRequestException("账号未激活!");
}
// 获取用户的权限
List<RoleCodeVo> authorities = roleApi.buildUserRolePermissions(user);
List<RoleCodeVo> authorities = systemRoleApi.buildUserRolePermissions(user);
// 初始化JwtUserDto
userJwtVo = new UserJwtVo(user, dataApi.describeDeptIdListByUserIdWithDeptId(user), authorities);
userJwtVo = new UserJwtVo(user, systemDataApi.describeDeptIdListByUserIdWithDeptId(user), authorities);
// 添加缓存数据
userCacheService.saveUserJwtModelByUserName(username, userJwtVo);
systemUserCacheService.saveUserJwtModelByUserName(username, userJwtVo);
}
}
return userJwtVo;
@@ -10,7 +10,7 @@ import cn.odboy.core.service.tools.dto.SendEmailRequest;
import cn.odboy.core.dal.dataobject.job.QuartzJob;
import cn.odboy.core.dal.dataobject.job.QuartzLog;
import cn.odboy.core.dal.mysql.job.QuartzLogMapper;
import cn.odboy.core.service.job.QuartzJobService;
import cn.odboy.core.service.system.SystemQuartzJobService;
import cn.odboy.core.service.tools.EmailService;
import cn.odboy.redis.RedisHelper;
import cn.odboy.util.StringUtil;
@@ -37,7 +37,7 @@ public class ExecutionJobBean extends QuartzJobBean {
QuartzJob quartzJob = (QuartzJob) context.getMergedJobDataMap().get(QuartzJob.JOB_KEY);
// 获取spring bean
QuartzLogMapper quartzLogMapper = SpringBeanHolder.getBean(QuartzLogMapper.class);
QuartzJobService quartzJobService = SpringBeanHolder.getBean(QuartzJobService.class);
SystemQuartzJobService systemQuartzJobService = SpringBeanHolder.getBean(SystemQuartzJobService.class);
RedisHelper redisHelper = SpringBeanHolder.getBean(RedisHelper.class);
String uuid = quartzJob.getUuid();
@@ -67,7 +67,7 @@ public class ExecutionJobBean extends QuartzJobBean {
if (StringUtil.isNotBlank(quartzJob.getSubTask())) {
String[] tasks = quartzJob.getSubTask().split("[,,]");
// 执行子任务
quartzJobService.startSubQuartJob(tasks);
systemQuartzJobService.startSubQuartJob(tasks);
}
} catch (Exception e) {
if (StringUtil.isNotBlank(uuid)) {
@@ -83,7 +83,7 @@ public class ExecutionJobBean extends QuartzJobBean {
if (quartzJob.getPauseAfterFailure() != null && quartzJob.getPauseAfterFailure()) {
quartzJob.setIsPause(false);
// 更新状态
quartzJobService.switchQuartzJobStatus(quartzJob);
systemQuartzJobService.switchQuartzJobStatus(quartzJob);
}
if (quartzJob.getEmail() != null) {
EmailService emailService = SpringBeanHolder.getBean(EmailService.class);
@@ -8,7 +8,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Set;
public interface DeptService extends IService<Dept> {
public interface SystemDeptService extends IService<Dept> {
/**
* 创建
@@ -5,7 +5,7 @@ import cn.odboy.core.service.system.dto.CreateDictDetailRequest;
import com.baomidou.mybatisplus.extension.service.IService;
public interface DictDetailService extends IService<DictDetail> {
public interface SystemDictDetailService extends IService<DictDetail> {
/**
* 创建
@@ -9,7 +9,7 @@ import java.util.List;
import java.util.Set;
public interface DictService extends IService<Dict> {
public interface SystemDictService extends IService<Dict> {
/**
* 创建
*
@@ -9,7 +9,7 @@ import java.util.List;
import java.util.Set;
public interface JobService extends IService<Job> {
public interface SystemJobService extends IService<Job> {
/**
* 创建
*
@@ -8,7 +8,7 @@ import java.util.List;
import java.util.Set;
public interface MenuService extends IService<Menu> {
public interface SystemMenuService extends IService<Menu> {
/**
@@ -1,8 +1,8 @@
package cn.odboy.core.service.job;
package cn.odboy.core.service.system;
import cn.odboy.core.dal.dataobject.job.QuartzJob;
import cn.odboy.core.dal.dataobject.job.QuartzLog;
import cn.odboy.core.service.job.dto.UpdateQuartzJobRequest;
import cn.odboy.core.service.system.dto.UpdateQuartzJobRequest;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@@ -10,7 +10,7 @@ import java.util.List;
import java.util.Set;
public interface QuartzJobService extends IService<QuartzJob> {
public interface SystemQuartzJobService extends IService<QuartzJob> {
/**
* 创建
*
@@ -9,7 +9,7 @@ import java.util.List;
import java.util.Set;
public interface RoleService extends IService<Role> {
public interface SystemRoleService extends IService<Role> {
/**
@@ -9,7 +9,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
public interface UserService extends IService<User> {
public interface SystemUserService extends IService<User> {
/**
* 新增用户
*
@@ -1,4 +1,4 @@
package cn.odboy.core.service.job.dto;
package cn.odboy.core.service.system.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -1,4 +1,4 @@
package cn.odboy.core.service.job.dto;
package cn.odboy.core.service.system.dto;
import cn.odboy.base.MyObject;
import lombok.Data;
@@ -1,13 +1,13 @@
package cn.odboy.core.service.system.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.odboy.core.api.system.DeptApi;
import cn.odboy.core.api.system.SystemDeptApi;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.dal.dataobject.system.Dept;
import cn.odboy.core.dal.dataobject.system.User;
import cn.odboy.core.dal.mysql.system.DeptMapper;
import cn.odboy.core.dal.mysql.system.UserMapper;
import cn.odboy.core.service.system.DeptService;
import cn.odboy.core.service.system.SystemDeptService;
import cn.odboy.core.service.system.dto.CreateDeptRequest;
import cn.odboy.exception.BadRequestException;
import cn.odboy.redis.RedisHelper;
@@ -27,11 +27,11 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements DeptService {
public class SystemDeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements SystemDeptService {
private final DeptMapper deptMapper;
private final UserMapper userMapper;
private final RedisHelper redisHelper;
private final DeptApi deptApi;
private final SystemDeptApi systemDeptApi;
@Override
@@ -48,7 +48,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements De
@Transactional(rollbackFor = Exception.class)
public void modifyDept(Dept resources) {
// 旧的部门
Long oldPid = deptApi.describeDeptById(resources.getId()).getPid();
Long oldPid = systemDeptApi.describeDeptById(resources.getId()).getPid();
Long newPid = resources.getPid();
if (resources.getPid() != null && resources.getId().equals(resources.getPid())) {
throw new BadRequestException("上级不能为自己");
@@ -6,7 +6,7 @@ import cn.odboy.core.dal.dataobject.system.Dict;
import cn.odboy.core.dal.dataobject.system.DictDetail;
import cn.odboy.core.dal.mysql.system.DictDetailMapper;
import cn.odboy.core.dal.mysql.system.DictMapper;
import cn.odboy.core.service.system.DictDetailService;
import cn.odboy.core.service.system.SystemDictDetailService;
import cn.odboy.core.service.system.dto.CreateDictDetailRequest;
import cn.odboy.redis.RedisHelper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -16,7 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
@Service
@RequiredArgsConstructor
public class DictDetailServiceImpl extends ServiceImpl<DictDetailMapper, DictDetail> implements DictDetailService {
public class SystemDictDetailServiceImpl extends ServiceImpl<DictDetailMapper, DictDetail> implements SystemDictDetailService {
private final DictMapper dictMapper;
private final RedisHelper redisHelper;
@@ -7,7 +7,7 @@ import cn.odboy.core.dal.dataobject.system.Dict;
import cn.odboy.core.dal.dataobject.system.DictDetail;
import cn.odboy.core.dal.mysql.system.DictDetailMapper;
import cn.odboy.core.dal.mysql.system.DictMapper;
import cn.odboy.core.service.system.DictService;
import cn.odboy.core.service.system.SystemDictService;
import cn.odboy.core.service.system.dto.CreateDictRequest;
import cn.odboy.redis.RedisHelper;
import cn.odboy.util.FileUtil;
@@ -25,7 +25,7 @@ import java.util.Set;
@Service
@RequiredArgsConstructor
public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements DictService {
public class SystemDictServiceImpl extends ServiceImpl<DictMapper, Dict> implements SystemDictService {
private final DictMapper dictMapper;
private final DictDetailMapper dictDetailMapper;
private final RedisHelper redisHelper;
@@ -4,8 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.dal.dataobject.system.Job;
import cn.odboy.core.dal.mysql.system.JobMapper;
import cn.odboy.core.dal.mysql.system.UserMapper;
import cn.odboy.core.service.system.JobService;
import cn.odboy.core.service.system.SystemJobService;
import cn.odboy.core.service.system.dto.CreateJobRequest;
import cn.odboy.exception.EntityExistException;
import cn.odboy.redis.RedisHelper;
@@ -24,7 +23,7 @@ import java.util.Set;
@Service
@RequiredArgsConstructor
public class JobServiceImpl extends ServiceImpl<JobMapper, Job> implements JobService {
public class SystemJobServiceImpl extends ServiceImpl<JobMapper, Job> implements SystemJobService {
private final JobMapper jobMapper;
private final RedisHelper redisHelper;
@@ -1,6 +1,6 @@
package cn.odboy.core.service.system.impl;
import cn.odboy.core.api.system.RoleApi;
import cn.odboy.core.api.system.SystemRoleApi;
import cn.odboy.core.constant.SystemRedisKey;
import cn.odboy.core.constant.TransferProtocolConst;
import cn.odboy.core.dal.dataobject.system.Menu;
@@ -9,7 +9,7 @@ import cn.odboy.core.dal.dataobject.system.User;
import cn.odboy.core.dal.mysql.system.MenuMapper;
import cn.odboy.core.dal.mysql.system.RoleMenuMapper;
import cn.odboy.core.dal.mysql.system.UserMapper;
import cn.odboy.core.service.system.MenuService;
import cn.odboy.core.service.system.SystemMenuService;
import cn.odboy.exception.BadRequestException;
import cn.odboy.exception.EntityExistException;
import cn.odboy.redis.RedisHelper;
@@ -31,11 +31,11 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {
public class SystemMenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements SystemMenuService {
private final MenuMapper menuMapper;
private final RoleMenuMapper roleMenuMapper;
private final UserMapper userMapper;
private final RoleApi roleApi;
private final SystemRoleApi systemRoleApi;
private final RedisHelper redisHelper;
private static final String YES_STR = "是";
@@ -168,7 +168,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements Me
redisHelper.del(SystemRedisKey.MENU_ID + id);
redisHelper.delByKeys(SystemRedisKey.MENU_USER, users.stream().map(User::getId).collect(Collectors.toSet()));
// 清除 Role 缓存
List<Role> roles = roleApi.describeRoleListByMenuId(id);
List<Role> roles = systemRoleApi.describeRoleListByMenuId(id);
redisHelper.delByKeys(SystemRedisKey.ROLE_ID, roles.stream().map(Role::getId).collect(Collectors.toSet()));
}
@@ -1,4 +1,4 @@
package cn.odboy.core.service.job.impl;
package cn.odboy.core.service.system.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.IdUtil;
@@ -8,8 +8,8 @@ import cn.odboy.core.dal.dataobject.job.QuartzLog;
import cn.odboy.core.dal.mysql.job.QuartzJobMapper;
import cn.odboy.core.dal.mysql.job.QuartzLogMapper;
import cn.odboy.core.framework.quartz.context.QuartzManage;
import cn.odboy.core.service.job.QuartzJobService;
import cn.odboy.core.service.job.dto.UpdateQuartzJobRequest;
import cn.odboy.core.service.system.SystemQuartzJobService;
import cn.odboy.core.service.system.dto.UpdateQuartzJobRequest;
import cn.odboy.exception.BadRequestException;
import cn.odboy.redis.RedisHelper;
import cn.odboy.util.FileUtil;
@@ -30,7 +30,7 @@ import java.util.Set;
@RequiredArgsConstructor
@Service(value = "quartzJobService")
public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob> implements QuartzJobService {
public class SystemQuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob> implements SystemQuartzJobService {
private final QuartzJobMapper quartzJobMapper;
private final QuartzLogMapper quartzLogMapper;
@@ -10,8 +10,8 @@ import cn.odboy.core.dal.mysql.system.RoleDeptMapper;
import cn.odboy.core.dal.mysql.system.RoleMapper;
import cn.odboy.core.dal.mysql.system.RoleMenuMapper;
import cn.odboy.core.dal.mysql.system.UserMapper;
import cn.odboy.core.service.system.RoleService;
import cn.odboy.core.service.system.UserCacheService;
import cn.odboy.core.service.system.SystemRoleService;
import cn.odboy.core.cache.service.SystemUserCacheService;
import cn.odboy.core.service.system.dto.CreateRoleRequest;
import cn.odboy.exception.EntityExistException;
import cn.odboy.redis.RedisHelper;
@@ -31,12 +31,12 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
public class SystemRoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements SystemRoleService {
private final RoleMapper roleMapper;
private final RoleDeptMapper roleDeptMapper;
private final RoleMenuMapper roleMenuMapper;
private final UserMapper userMapper;
private final UserCacheService userCacheService;
private final SystemUserCacheService systemUserCacheService;
private final RedisHelper redisHelper;
@Override
@@ -125,7 +125,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements Ro
public void delCaches(Long id, List<User> users) {
users = CollectionUtil.isEmpty(users) ? userMapper.queryUserListByRoleId(id) : users;
if (CollectionUtil.isNotEmpty(users)) {
users.forEach(item -> userCacheService.cleanUserJwtModelCacheByUsername(item.getUsername()));
users.forEach(item -> systemUserCacheService.cleanUserJwtModelCacheByUsername(item.getUsername()));
Set<Long> userIds = users.stream().map(User::getId).collect(Collectors.toSet());
redisHelper.delByKeys(SystemRedisKey.DATA_USER, userIds);
redisHelper.delByKeys(SystemRedisKey.MENU_USER, userIds);
@@ -9,9 +9,9 @@ import cn.odboy.core.dal.mysql.system.UserMapper;
import cn.odboy.core.dal.mysql.system.UserRoleMapper;
import cn.odboy.core.framework.permission.util.SecurityHelper;
import cn.odboy.core.framework.properties.AppProperties;
import cn.odboy.core.service.system.UserCacheService;
import cn.odboy.core.service.system.UserOnlineService;
import cn.odboy.core.service.system.UserService;
import cn.odboy.core.cache.service.SystemUserCacheService;
import cn.odboy.core.cache.service.SystemUserOnlineService;
import cn.odboy.core.service.system.SystemUserService;
import cn.odboy.exception.BadRequestException;
import cn.odboy.exception.EntityExistException;
import cn.odboy.redis.RedisHelper;
@@ -38,14 +38,14 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
public class SystemUserServiceImpl extends ServiceImpl<UserMapper, User> implements SystemUserService {
private final UserMapper userMapper;
private final UserJobMapper userJobMapper;
private final UserRoleMapper userRoleMapper;
private final AppProperties properties;
private final RedisHelper redisHelper;
private final UserCacheService userCacheService;
private final UserOnlineService userOnlineService;
private final SystemUserCacheService systemUserCacheService;
private final SystemUserOnlineService systemUserOnlineService;
@Override
@Transactional(rollbackFor = Exception.class)
@@ -96,7 +96,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
}
// 如果用户被禁用,则清除用户登录信息
if (!resources.getEnabled()) {
userOnlineService.kickOutByUsername(resources.getUsername());
systemUserOnlineService.kickOutByUsername(resources.getUsername());
}
user.setDeptId(resources.getDept().getId());
user.setUsername(resources.getUsername());
@@ -166,7 +166,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
// 清除缓存
flushCache(user.getUsername());
// 强制退出
userOnlineService.kickOutByUsername(user.getUsername());
systemUserOnlineService.kickOutByUsername(user.getUsername());
});
// 重置密码
userMapper.updatePasswordByUserIds(password, ids);
@@ -242,6 +242,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
* @param username /
*/
private void flushCache(String username) {
userCacheService.cleanUserJwtModelCacheByUsername(username);
systemUserCacheService.cleanUserJwtModelCacheByUsername(username);
}
}
@@ -4,7 +4,7 @@
<select id="queryQuartzJobPageByArgs" resultType="cn.odboy.core.dal.dataobject.job.QuartzJob">
SELECT
*
FROM sys_quartz_job
FROM system_quartz_job
<where>
<if test="criteria.jobName != null and criteria.jobName != ''">
AND job_name LIKE CONCAT('%',#{criteria.jobName},'%')
@@ -17,7 +17,7 @@
</select>
<select id="queryActiveQuartzJobList" resultType="cn.odboy.core.dal.dataobject.job.QuartzJob">
SELECT *
FROM sys_quartz_job
FROM system_quartz_job
WHERE is_pause = 0
</select>
</mapper>
@@ -4,7 +4,7 @@
<select id="queryQuartzLogPageByArgs" resultType="cn.odboy.core.dal.dataobject.job.QuartzLog">
SELECT
*
FROM sys_quartz_log
FROM system_quartz_log
<where>
<if test="criteria.jobName != null and criteria.jobName != ''">
AND job_name LIKE CONCAT('%',#{criteria.jobName},'%')
@@ -26,7 +26,7 @@
enabled,
dept_sort
FROM
sys_dept
system_dept
<where>
<if test="criteria.ids != null and criteria.ids.size() > 0">
AND dept_id in
@@ -63,12 +63,12 @@
update_by,
enabled,
dept_sort
from sys_dept
from system_dept
where pid = #{pid}
</select>
<select id="getDeptCountByPid" resultType="java.lang.Integer">
select count(*)
from sys_dept
from system_dept
where pid = #{pid}
</select>
<select id="queryDeptListByPidIsNull" resultMap="BaseResultMap">
@@ -82,7 +82,7 @@
update_by,
enabled,
dept_sort
from sys_dept
from system_dept
where pid is null
</select>
<select id="queryDeptSetByRoleId" resultType="cn.odboy.core.dal.dataobject.system.Dept">
@@ -96,13 +96,13 @@
d.update_by,
d.enabled,
d.dept_sort
FROM sys_dept d,
sys_roles_depts rd
FROM system_dept d,
system_roles_depts rd
WHERE d.dept_id = rd.dept_id
AND rd.role_id = #{roleId}
</select>
<update id="updateSubCountById">
update sys_dept
update system_dept
set sub_count = #{count}
where dept_id = #{id}
</update>
@@ -20,7 +20,7 @@
select
dd.id, dd.label, dd.`value`, dd.`dict_sort`, dd.create_by, dd.update_by, dd.create_time, dd.update_time,
d.id as dict_id, d.name
from sys_dict_detail dd, sys_dict d
from system_dict_detail dd, system_dict d
where dd.dict_id = d.id
<if test="name != null and name != ''">
and d.name = #{name}
@@ -31,7 +31,7 @@
select
dd.id, dd.label, dd.`value`, dd.`dict_sort`, dd.create_by, dd.update_by, dd.create_time, dd.update_time,
d.id as dict_id, d.name
from sys_dict_detail dd, sys_dict d
from system_dict_detail dd, system_dict d
where dd.dict_id = d.id
<if test="criteria.dictName != null and criteria.dictName != ''">
and d.name = #{criteria.dictName}
@@ -42,7 +42,7 @@
order by dd.dict_sort, dd.dict_id desc
</select>
<delete id="deleteDictDetailByDictIds">
delete from sys_dict_detail
delete from system_dict_detail
where dict_id in
<foreach collection="dictIds" item="item" index="index" open="(" separator="," close=")">
#{item}
@@ -4,7 +4,7 @@
<select id="queryDictPageByArgs" resultType="cn.odboy.core.dal.dataobject.system.Dict">
SELECT
*
from sys_dict d
from system_dict d
<where>
<if test="criteria.blurry != null and criteria.blurry != ''">
and (
@@ -3,13 +3,13 @@
<mapper namespace="cn.odboy.core.dal.mysql.system.JobMapper">
<select id="getJobByName" resultType="cn.odboy.core.dal.dataobject.system.Job">
select id
from sys_job
from system_job
where name = #{name}
</select>
<select id="queryJobPageByArgs" resultType="cn.odboy.core.dal.dataobject.system.Job">
select
*
from sys_job
from system_job
<where>
<if test="criteria.name != null and criteria.name != ''">
and name like concat('%', #{criteria.name}, '%')
@@ -25,7 +25,7 @@
select
menu_id, title, name, menu_sort, component, path, type, permission, icon, cache, hidden, pid, sub_count,
i_frame, create_by, update_by, create_time, update_time
from sys_menu
from system_menu
<where>
<if test="criteria.blurry != null and criteria.blurry != ''">
and (
@@ -47,7 +47,7 @@
order by menu_sort
</select>
<select id="queryMenuSetByRoleIdsAndType" resultMap="BaseResultMap">
SELECT m.* FROM sys_menu m, sys_roles_menus r
SELECT m.* FROM system_menu m, system_roles_menus r
WHERE m.menu_id = r.menu_id AND r.role_id IN
<foreach collection="roleIds" item="roleId" open="(" separator="," close=")">
#{roleId}
@@ -74,7 +74,7 @@
update_by,
create_time,
update_time
from sys_menu
from system_menu
where pid is null
order by menu_sort
</select>
@@ -97,27 +97,27 @@
update_by,
create_time,
update_time
from sys_menu
from system_menu
WHERE pid = #{pid}
ORDER BY menu_sort
</select>
<select id="getMenuByTitle" resultType="cn.odboy.core.dal.dataobject.system.Menu">
SELECT menu_id id
FROM sys_menu
FROM system_menu
WHERE title = #{title}
</select>
<select id="getMenuByComponentName" resultType="cn.odboy.core.dal.dataobject.system.Menu">
SELECT menu_id id
FROM sys_menu
FROM system_menu
WHERE name = #{name}
</select>
<select id="getMenuCountByPid" resultType="java.lang.Integer">
SELECT count(*)
FROM sys_menu
FROM system_menu
WHERE pid = #{pid}
</select>
<update id="updateSubCntByMenuId">
update sys_menu
update system_menu
set sub_count = #{count}
where menu_id = #{menuId}
</update>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.odboy.core.dal.mysql.system.RoleDeptMapper">
<insert id="insertBatchWithRoleId">
insert into sys_roles_depts (role_id, dept_id)
insert into system_roles_depts (role_id, dept_id)
values
<foreach collection="depts" item="item" open="(" separator="),(" close=")">
#{roleId}, #{item.id}
@@ -11,12 +11,12 @@
<delete id="deleteByRoleId">
delete
from sys_roles_depts
from system_roles_depts
where role_id = #{roleId}
</delete>
<delete id="deleteByRoleIds">
delete from sys_roles_depts
delete from system_roles_depts
where role_id in
<foreach collection="roleIds" item="id" open="(" separator="," close=")">
#{id}
@@ -23,7 +23,7 @@
</resultMap>
<select id="queryRoleList" resultType="cn.odboy.core.dal.dataobject.system.Role">
select role_id as id, name, level
from sys_role
from system_role
order by level
</select>
<select id="queryRoleListByArgs" resultMap="BaseResultMap">
@@ -35,7 +35,7 @@
role.role_id as role_role_id, role.name as role_name, role.data_scope as role_data_scope,
role.level as role_level, role.description as role_description, role.create_by as role_create_by,
role.update_by as role_update_by, role.create_time as role_create_time, role.update_time as role_update_time
from sys_role role
from system_role role
<where>
<if test="criteria.blurry != null and criteria.blurry != ''">
and (
@@ -52,15 +52,15 @@
limit #{criteria.offset}, #{criteria.size}
</if>
) role
left join sys_roles_menus srm on role.role_role_id = srm.role_id
left join sys_menu menu on menu.menu_id = srm.menu_id
left join sys_roles_depts srd on role.role_role_id = srd.role_id
left join sys_dept dept on dept.dept_id = srd.dept_id
left join system_roles_menus srm on role.role_role_id = srm.role_id
left join system_menu menu on menu.menu_id = srm.menu_id
left join system_roles_depts srd on role.role_role_id = srd.role_id
left join system_dept dept on dept.dept_id = srd.dept_id
order by role.role_level
</select>
<select id="getRoleCountByArgs" resultType="java.lang.Long">
select count(*)
from sys_role role
from system_role role
<where>
<if test="criteria.blurry != null and criteria.blurry != ''">
and (
@@ -75,7 +75,7 @@
</select>
<select id="getRoleByName" resultType="cn.odboy.core.dal.dataobject.system.Role">
select role_id as id
from sys_role
from system_role
where name = #{name}
</select>
<select id="getRoleById" resultMap="BaseResultMap">
@@ -93,11 +93,11 @@
menu.menu_id as menu_id,
menu.title as menu_title,
menu.permission as menu_permission
from sys_role role
left join sys_roles_menus srm on role.role_id = srm.role_id
left join sys_menu menu on menu.menu_id = srm.menu_id
left join sys_roles_depts srd on role.role_id = srd.role_id
left join sys_dept dept on dept.dept_id = srd.dept_id
from system_role role
left join system_roles_menus srm on role.role_id = srm.role_id
left join system_menu menu on menu.menu_id = srm.menu_id
left join system_roles_depts srd on role.role_id = srd.role_id
left join system_dept dept on dept.dept_id = srd.dept_id
where role.role_id = #{roleId}
</select>
<select id="queryRoleListByUserId" resultMap="BaseResultMap">
@@ -115,18 +115,18 @@
menu.menu_id as menu_id,
menu.title as menu_title,
menu.permission as menu_permission
from sys_role role
left join sys_roles_menus srm on role.role_id = srm.role_id
left join sys_menu menu on menu.menu_id = srm.menu_id
left join sys_roles_depts srd on role.role_id = srd.role_id
left join sys_dept dept on dept.dept_id = srd.dept_id
left join sys_users_roles ur on role.role_id = ur.role_id
from system_role role
left join system_roles_menus srm on role.role_id = srm.role_id
left join system_menu menu on menu.menu_id = srm.menu_id
left join system_roles_depts srd on role.role_id = srd.role_id
left join system_dept dept on dept.dept_id = srd.dept_id
left join system_users_roles ur on role.role_id = ur.role_id
WHERE role.role_id = ur.role_id
AND ur.user_id = #{userId}
</select>
<select id="getRoleCountByDeptIds" resultType="int">
select count(*)
from sys_role r, sys_roles_depts d
from system_role r, system_roles_depts d
where r.role_id = d.role_id
and d.dept_id in
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
@@ -135,8 +135,8 @@
</select>
<select id="queryRoleListByMenuId" resultType="cn.odboy.core.dal.dataobject.system.Role">
SELECT role.role_id as id
FROM sys_role role,
sys_roles_menus rm
FROM system_role role,
system_roles_menus rm
WHERE role.role_id = rm.role_id
AND rm.menu_id = #{menuId}
</select>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.odboy.core.dal.mysql.system.RoleMenuMapper">
<insert id="insertBatchWithRoleId">
insert into sys_roles_menus (role_id, menu_id)
insert into system_roles_menus (role_id, menu_id)
values
<foreach collection="menus" item="item" open="(" separator="),(" close=")">
#{roleId}, #{item.id}
@@ -11,12 +11,12 @@
<delete id="deleteByRoleId">
delete
from sys_roles_menus
from system_roles_menus
where role_id = #{roleId}
</delete>
<delete id="deleteByRoleIds">
delete from sys_roles_menus
delete from system_roles_menus
where role_id in
<foreach collection="roleIds" item="id" open="(" separator="," close=")">
#{id}
@@ -25,7 +25,7 @@
<delete id="deleteByMenuId">
delete
from sys_roles_menus
from system_roles_menus
where menu_id = #{menuId}
</delete>
</mapper>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.odboy.core.dal.mysql.system.UserJobMapper">
<insert id="insertBatchWithUserId">
insert into sys_users_jobs (user_id, job_id)
insert into system_users_jobs (user_id, job_id)
values
<foreach collection="jobs" item="item" open="(" separator="),(" close=")">
#{userId}, #{item.id}
@@ -11,12 +11,12 @@
<delete id="deleteByUserId">
delete
from sys_users_jobs
from system_users_jobs
where user_id = #{userId}
</delete>
<delete id="deleteByUserIds">
delete from sys_users_jobs
delete from system_users_jobs
where user_id in
<foreach collection="userIds" item="id" open="(" separator="," close=")">
#{id}
@@ -36,7 +36,7 @@
</resultMap>
<select id="getUserCountByArgs" resultType="java.lang.Long">
select count(*)
from sys_user u
from system_user u
<where>
<if test="criteria.id != null">
and u.user_id = #{criteria.id}
@@ -74,8 +74,8 @@
u.enabled as user_enabled, u.pwd_reset_time as user_pwd_reset_time, u.create_by as user_create_by,
u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time,
d.dept_id as dept_id, d.name as dept_name
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
from system_user u
left join system_dept d on u.dept_id = d.dept_id
<where>
<if test="criteria.id != null">
and u.user_id = #{criteria.id}
@@ -105,10 +105,10 @@
limit #{criteria.offset}, #{criteria.size}
</if>
) u
left join sys_users_jobs suj on u.user_user_id = suj.user_id
left join sys_job j on suj.job_id = j.id
left join sys_users_roles sur on u.user_user_id = sur.user_id
left join sys_role r on sur.role_id = r.role_id
left join system_users_jobs suj on u.user_user_id = suj.user_id
left join system_job j on suj.job_id = j.id
left join system_users_roles sur on u.user_user_id = sur.user_id
left join system_role r on sur.role_id = r.role_id
order by u.user_user_id desc
</select>
<select id="getUserByUsername" resultMap="BaseResultMap">
@@ -131,44 +131,44 @@
u.update_time as user_update_time,
d.dept_id as dept_id,
d.name as dept_name
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
from system_user u
left join system_dept d on u.dept_id = d.dept_id
where u.username = #{username}
</select>
<select id="getUserByEmail" resultType="cn.odboy.core.dal.dataobject.system.User">
select user_id as id, username
from sys_user
from system_user
where email = #{email}
</select>
<select id="getUserByPhone" resultType="cn.odboy.core.dal.dataobject.system.User">
select user_id as id, username
from sys_user
from system_user
where phone = #{phone}
</select>
<update id="updatePasswordByUsername">
update sys_user
update system_user
set password = #{password},
pwd_reset_time = #{lastPasswordResetTime}
where username = #{username}
</update>
<update id="updateEmailByUsername">
update sys_user
update system_user
set email = #{email}
where username = #{username}
</update>
<select id="queryUserListByRoleId" resultType="cn.odboy.core.dal.dataobject.system.User">
SELECT u.user_id as id, u.username
FROM sys_user u,
sys_users_roles r
FROM system_user u,
system_users_roles r
WHERE u.user_id = r.user_id
AND r.role_id = #{roleId}
group by u.user_id
</select>
<select id="queryUserListByDeptId" resultType="cn.odboy.core.dal.dataobject.system.User">
SELECT u.*
FROM sys_user u,
sys_users_roles r,
sys_roles_depts d
FROM system_user u,
system_users_roles r,
system_roles_depts d
WHERE u.user_id = r.user_id
AND r.role_id = d.role_id
AND d.dept_id = #{deptId}
@@ -176,37 +176,37 @@
</select>
<select id="queryUserListByMenuId" resultType="cn.odboy.core.dal.dataobject.system.User">
SELECT u.user_id as id, u.username
FROM sys_user u,
sys_users_roles ur,
sys_roles_menus rm
FROM system_user u,
system_users_roles ur,
system_roles_menus rm
WHERE u.user_id = ur.user_id
AND ur.role_id = rm.role_id
AND rm.menu_id = #{menuId}
group by u.user_id
</select>
<select id="getUserCountByJobIds" resultType="int">
SELECT count(*) FROM sys_user u, sys_users_jobs j
SELECT count(*) FROM system_user u, system_users_jobs j
WHERE u.user_id = j.user_id AND j.job_id IN
<foreach collection="jobIds" item="jobId" open="(" separator="," close=")">
#{jobId}
</foreach>
</select>
<select id="getUserCountByDeptIds" resultType="int">
SELECT count(*) FROM sys_user u
SELECT count(*) FROM system_user u
WHERE u.dept_id IN
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
#{deptId}
</foreach>
</select>
<select id="getUserCountByRoleIds" resultType="int">
SELECT count(*) FROM sys_user u, sys_users_roles r
SELECT count(*) FROM system_user u, system_users_roles r
WHERE u.user_id = r.user_id AND r.role_id in
<foreach collection="roleIds" item="roleId" open="(" separator="," close=")">
#{roleId}
</foreach>
</select>
<update id="updatePasswordByUserIds">
update sys_user set password = #{password}
update system_user set password = #{password}
where user_id in
<foreach collection="userIds" item="id" open="(" separator="," close=")">
#{id}
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.odboy.core.dal.mysql.system.UserRoleMapper">
<insert id="insertBatchWithUserId">
insert into sys_users_roles (user_id, role_id)
insert into system_users_roles (user_id, role_id)
values
<foreach collection="roles" item="item" open="(" separator="),(" close=")">
#{userId}, #{item.id}
@@ -11,12 +11,12 @@
<delete id="deleteByUserId">
delete
from sys_users_roles
from system_users_roles
where user_id = #{userId}
</delete>
<delete id="deleteByUserIds">
delete from sys_users_roles
delete from system_users_roles
where user_id in
<foreach collection="userIds" item="id" open="(" separator="," close=")">
#{id}
+237 -237
View File
@@ -11,7 +11,7 @@
Target Server Version : 80025
File Encoding : 65001
Date: 11/04/2025 14:45:16
Date: 06/05/2025 15:34:08
*/
SET NAMES utf8mb4;
@@ -258,10 +258,10 @@ CREATE TABLE `qrtz_triggers` (
-- ----------------------------
-- ----------------------------
-- Table structure for sys_dept
-- Table structure for system_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
DROP TABLE IF EXISTS `system_dept`;
CREATE TABLE `system_dept` (
`dept_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`pid` bigint(0) NULL DEFAULT NULL COMMENT '上级部门',
`sub_count` int(0) NULL DEFAULT 0 COMMENT '子部门数目',
@@ -276,24 +276,24 @@ CREATE TABLE `sys_dept` (
INDEX `idx_pid`(`pid`) USING BTREE,
INDEX `idx_enabled`(`enabled`) USING BTREE,
INDEX `idx_sys_dept_dept_id`(`dept_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_dept
-- Records of system_dept
-- ----------------------------
INSERT INTO `sys_dept` VALUES (2, 7, 1, '研发部', 3, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dept` VALUES (5, 7, 0, '运维部', 4, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dept` VALUES (6, 8, 0, '测试部', 6, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dept` VALUES (7, NULL, 2, '华南分部', 0, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dept` VALUES (8, NULL, 2, '华北分部', 1, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dept` VALUES (15, 8, 0, 'UI部门', 7, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dept` VALUES (17, 2, 0, '研发一组', 999, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dept` VALUES (2, 7, 1, '研发部', 3, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dept` VALUES (5, 7, 0, '运维部', 4, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dept` VALUES (6, 8, 0, '测试部', 6, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dept` VALUES (7, NULL, 2, '华南分部', 0, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dept` VALUES (8, NULL, 2, '华北分部', 1, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dept` VALUES (15, 8, 0, 'UI部门', 7, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dept` VALUES (17, 2, 0, '研发一组', 999, b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
-- ----------------------------
-- Table structure for sys_dict
-- Table structure for system_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
DROP TABLE IF EXISTS `system_dict`;
CREATE TABLE `system_dict` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称',
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
@@ -302,20 +302,20 @@ CREATE TABLE `sys_dict` (
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据字典' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据字典' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_dict
-- Records of system_dict
-- ----------------------------
INSERT INTO `sys_dict` VALUES (1, 'user_status', '用户状态', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dict` VALUES (4, 'dept_status', '部门状态', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dict` VALUES (5, 'job_status', '岗位状态', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dict` VALUES (1, 'user_status', '用户状态', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dict` VALUES (4, 'dept_status', '部门状态', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dict` VALUES (5, 'job_status', '岗位状态', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
-- ----------------------------
-- Table structure for sys_dict_detail
-- Table structure for system_dict_detail
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_detail`;
CREATE TABLE `sys_dict_detail` (
DROP TABLE IF EXISTS `system_dict_detail`;
CREATE TABLE `system_dict_detail` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`dict_id` bigint(0) NULL DEFAULT NULL COMMENT '字典id',
`label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典标签',
@@ -327,23 +327,23 @@ CREATE TABLE `sys_dict_detail` (
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_dict_id`(`dict_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据字典详情' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据字典详情' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_dict_detail
-- Records of system_dict_detail
-- ----------------------------
INSERT INTO `sys_dict_detail` VALUES (1, 1, '激活', 'true', 1, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dict_detail` VALUES (2, 1, '禁用', 'false', 2, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dict_detail` VALUES (3, 4, '启用', 'true', 1, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dict_detail` VALUES (4, 4, '停用', 'false', 2, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dict_detail` VALUES (5, 5, '启用', 'true', 1, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_dict_detail` VALUES (6, 5, '停用', 'false', 2, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dict_detail` VALUES (1, 1, '激活', 'true', 1, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dict_detail` VALUES (2, 1, '禁用', 'false', 2, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dict_detail` VALUES (3, 4, '启用', 'true', 1, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dict_detail` VALUES (4, 4, '停用', 'false', 2, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dict_detail` VALUES (5, 5, '启用', 'true', 1, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_dict_detail` VALUES (6, 5, '停用', 'false', 2, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
-- ----------------------------
-- Table structure for sys_job
-- Table structure for system_job
-- ----------------------------
DROP TABLE IF EXISTS `sys_job`;
CREATE TABLE `sys_job` (
DROP TABLE IF EXISTS `system_job`;
CREATE TABLE `system_job` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称',
`enabled` bit(1) NOT NULL COMMENT '岗位状态',
@@ -355,21 +355,21 @@ CREATE TABLE `sys_job` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uniq_name`(`name`) USING BTREE,
INDEX `idx_enabled`(`enabled`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '岗位' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '岗位' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_job
-- Records of system_job
-- ----------------------------
INSERT INTO `sys_job` VALUES (8, '人事专员', b'1', 3, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_job` VALUES (10, '产品经理', b'1', 4, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_job` VALUES (11, '全栈开发', b'1', 2, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_job` VALUES (12, '软件测试', b'1', 5, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_job` VALUES (8, '人事专员', b'1', 3, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_job` VALUES (10, '产品经理', b'1', 4, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_job` VALUES (11, '全栈开发', b'1', 2, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_job` VALUES (12, '软件测试', b'1', 5, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
-- ----------------------------
-- Table structure for sys_menu
-- Table structure for system_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
DROP TABLE IF EXISTS `system_menu`;
CREATE TABLE `system_menu` (
`menu_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`pid` bigint(0) NULL DEFAULT NULL COMMENT '上级菜单ID',
`sub_count` int(0) NULL DEFAULT 0 COMMENT '子菜单数目',
@@ -393,74 +393,74 @@ CREATE TABLE `sys_menu` (
UNIQUE INDEX `uniq_title`(`title`) USING BTREE,
INDEX `idx_pid`(`pid`) USING BTREE,
INDEX `idx_sys_menu_menu_id`(`menu_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 126 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统菜单' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 125 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统菜单' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_menu
-- Records of system_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES (1, NULL, 7, 0, '系统管理', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (2, 1, 3, 1, '用户管理', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (3, 1, 3, 1, '角色管理', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (5, 1, 3, 1, '菜单管理', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (6, NULL, 3, 0, '系统监控', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (9, 6, 0, 1, 'SQL监控', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (10, NULL, 12, 0, '组件管理', NULL, NULL, 50, 'zujian', 'components', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (11, 10, 0, 1, '图标库', 'Icons', 'components/icons/index', 51, 'icon', 'icon', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (14, 36, 0, 1, '邮件工具', 'Email', 'tools/email/index', 35, 'email', 'email', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (15, 10, 0, 1, '富文本', 'Editor', 'components/base/Editor', 52, 'fwb', 'tinymce', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (18, 36, 3, 1, '存储管理', 'Storage', 'tools/storage/index', 34, 'qiniu', 'storage', b'0', b'0', b'0', 'storage:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (21, NULL, 2, 0, '多级菜单', NULL, '', 900, 'menu', 'nested', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (22, 21, 2, 0, '二级菜单1', NULL, '', 999, 'menu', 'menu1', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (23, 21, 0, 1, '二级菜单2', NULL, 'nested/menu2/index', 999, 'menu', 'menu2', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (24, 22, 0, 1, '三级菜单1', 'Test', 'nested/menu1/menu1-1', 999, 'menu', 'menu1-1', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (27, 22, 0, 1, '三级菜单2', NULL, 'nested/menu1/menu1-2', 999, 'menu', 'menu1-2', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (28, 1, 3, 1, '任务调度', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'0', 'timing:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (33, 10, 0, 1, 'Markdown', 'Markdown', 'components/base/MarkDown', 53, 'markdown', 'markdown', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (34, 10, 0, 1, 'Yaml编辑器', 'YamlEdit', 'components/base/YamlEdit', 54, 'dev', 'yaml', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (35, 1, 3, 1, '部门管理', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'0', 'dept:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (36, NULL, 2, 0, '系统工具', NULL, '', 30, 'sys-tools', 'sys-tools', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (37, 1, 3, 1, '岗位管理', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'0', 'job:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (39, 1, 3, 1, '字典管理', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'0', 'dict:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (41, 6, 0, 1, '在线用户', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (44, 2, 0, 2, '用户新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (45, 2, 0, 2, '用户编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (46, 2, 0, 2, '用户删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (48, 3, 0, 2, '角色创建', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (49, 3, 0, 2, '角色修改', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (50, 3, 0, 2, '角色删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (52, 5, 0, 2, '菜单新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (53, 5, 0, 2, '菜单编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (54, 5, 0, 2, '菜单删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (56, 35, 0, 2, '部门新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (57, 35, 0, 2, '部门编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (58, 35, 0, 2, '部门删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (60, 37, 0, 2, '岗位新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (61, 37, 0, 2, '岗位编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (62, 37, 0, 2, '岗位删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (64, 39, 0, 2, '字典新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (65, 39, 0, 2, '字典编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (66, 39, 0, 2, '字典删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (73, 28, 0, 2, '任务新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (74, 28, 0, 2, '任务编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (75, 28, 0, 2, '任务删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (77, 18, 0, 2, '上传文件', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (78, 18, 0, 2, '文件编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (79, 18, 0, 2, '文件删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (80, 6, 0, 1, '服务监控', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (83, 10, 0, 1, '图表库', 'Echarts', 'components/base/Echarts', 50, 'chart', 'echarts', b'0', b'1', b'0', '', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (117, 10, 0, 1, '一键复制', 'clipboardDemo', 'components/base/ClipboardDemo', 999, 'menu', 'clipboardDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (118, 10, 0, 1, 'Java代码编辑器', 'javaCodemirror', 'components/base/CodemirrorDemo', 999, 'menu', 'javaCodemirror', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (119, 10, 0, 1, '数字滚动', 'countToDemo', 'components/base/CountToDemo', 999, 'menu', 'countToDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (120, 10, 0, 1, '拖拽表格', 'dragTableDemo', 'components/base/DragTableDemo', 999, 'menu', 'dragTableDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (121, 10, 0, 1, '分割面板', 'splitPaneDemo', 'components/base/SplitPaneDemo', 999, 'menu', 'splitPaneDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (122, 10, 0, 1, 'WebSocket', 'webSocketDemo', 'components/base/WebSocketDemo', 999, 'menu', 'webSocketDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_menu` VALUES (125, 10, 0, 1, '业务组件Demo', 'DemoShow', 'components/business/DemoShow', 999, 'menu', 'bussinessDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (1, NULL, 7, 0, '系统管理', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (2, 1, 3, 1, '用户管理', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (3, 1, 3, 1, '角色管理', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (5, 1, 3, 1, '菜单管理', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (6, NULL, 3, 0, '系统监控', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (9, 6, 0, 1, 'SQL监控', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (10, NULL, 12, 0, '组件管理', NULL, NULL, 50, 'zujian', 'components', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (11, 10, 0, 1, '图标库', 'Icons', 'components/icons/index', 51, 'icon', 'icon', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (14, 36, 0, 1, '邮件工具', 'Email', 'tools/email/index', 35, 'email', 'email', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (15, 10, 0, 1, '富文本', 'Editor', 'components/base/Editor', 52, 'fwb', 'tinymce', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (18, 36, 3, 1, '存储管理', 'Storage', 'tools/storage/index', 34, 'qiniu', 'storage', b'0', b'0', b'0', 'storage:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (21, NULL, 2, 0, '多级菜单', NULL, '', 900, 'menu', 'nested', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (22, 21, 2, 0, '二级菜单1', NULL, '', 999, 'menu', 'menu1', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (23, 21, 0, 1, '二级菜单2', NULL, 'nested/menu2/index', 999, 'menu', 'menu2', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (24, 22, 0, 1, '三级菜单1', 'Test', 'nested/menu1/menu1-1', 999, 'menu', 'menu1-1', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (27, 22, 0, 1, '三级菜单2', NULL, 'nested/menu1/menu1-2', 999, 'menu', 'menu1-2', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (28, 1, 3, 1, '任务调度', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'0', 'timing:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (33, 10, 0, 1, 'Markdown', 'Markdown', 'components/base/MarkDown', 53, 'markdown', 'markdown', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (34, 10, 0, 1, 'Yaml编辑器', 'YamlEdit', 'components/base/YamlEdit', 54, 'dev', 'yaml', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (35, 1, 3, 1, '部门管理', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'0', 'dept:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (36, NULL, 2, 0, '系统工具', NULL, '', 30, 'sys-tools', 'sys-tools', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (37, 1, 3, 1, '岗位管理', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'0', 'job:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (39, 1, 3, 1, '字典管理', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'0', 'dict:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (41, 6, 0, 1, '在线用户', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (44, 2, 0, 2, '用户新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (45, 2, 0, 2, '用户编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (46, 2, 0, 2, '用户删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (48, 3, 0, 2, '角色创建', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (49, 3, 0, 2, '角色修改', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (50, 3, 0, 2, '角色删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (52, 5, 0, 2, '菜单新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (53, 5, 0, 2, '菜单编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (54, 5, 0, 2, '菜单删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (56, 35, 0, 2, '部门新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (57, 35, 0, 2, '部门编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (58, 35, 0, 2, '部门删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (60, 37, 0, 2, '岗位新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (61, 37, 0, 2, '岗位编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (62, 37, 0, 2, '岗位删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (64, 39, 0, 2, '字典新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (65, 39, 0, 2, '字典编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (66, 39, 0, 2, '字典删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (73, 28, 0, 2, '任务新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (74, 28, 0, 2, '任务编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (75, 28, 0, 2, '任务删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (77, 18, 0, 2, '上传文件', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (78, 18, 0, 2, '文件编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (79, 18, 0, 2, '文件删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (80, 6, 0, 1, '服务监控', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (83, 10, 0, 1, '图表库', 'Echarts', 'components/base/Echarts', 50, 'chart', 'echarts', b'0', b'1', b'0', '', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (117, 10, 0, 1, '一键复制', 'clipboardDemo', 'components/base/ClipboardDemo', 999, 'menu', 'clipboardDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (118, 10, 0, 1, 'Java代码编辑器', 'javaCodemirror', 'components/base/CodemirrorDemo', 999, 'menu', 'javaCodemirror', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (119, 10, 0, 1, '数字滚动', 'countToDemo', 'components/base/CountToDemo', 999, 'menu', 'countToDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (120, 10, 0, 1, '拖拽表格', 'dragTableDemo', 'components/base/DragTableDemo', 999, 'menu', 'dragTableDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (121, 10, 0, 1, '分割面板', 'splitPaneDemo', 'components/base/SplitPaneDemo', 999, 'menu', 'splitPaneDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (122, 10, 0, 1, 'WebSocket', 'webSocketDemo', 'components/base/WebSocketDemo', 999, 'menu', 'webSocketDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_menu` VALUES (125, 10, 0, 1, '业务组件Demo', 'DemoShow', 'components/business/DemoShow', 999, 'menu', 'bussinessDemo', b'0', b'0', b'0', NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
-- ----------------------------
-- Table structure for sys_quartz_job
-- Table structure for system_quartz_job
-- ----------------------------
DROP TABLE IF EXISTS `sys_quartz_job`;
CREATE TABLE `sys_quartz_job` (
DROP TABLE IF EXISTS `system_quartz_job`;
CREATE TABLE `system_quartz_job` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`bean_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Spring Bean名称',
`cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'cron 表达式',
@@ -482,16 +482,16 @@ CREATE TABLE `sys_quartz_job` (
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '定时任务' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_quartz_job
-- Records of system_quartz_job
-- ----------------------------
INSERT INTO `sys_quartz_job` VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '测试', NULL, NULL, NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_quartz_job` VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试', 'run', '', '不带参测试', 'Zheng Jie', '', '6', b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_quartz_job` VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '测试', NULL, NULL, NULL, 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_quartz_job` VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试', 'run', '', '不带参测试', 'Zheng Jie', '', '6', b'1', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
-- ----------------------------
-- Table structure for sys_quartz_log
-- Table structure for system_quartz_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_quartz_log`;
CREATE TABLE `sys_quartz_log` (
DROP TABLE IF EXISTS `system_quartz_log`;
CREATE TABLE `system_quartz_log` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`bean_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Bean名称',
`cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'cron 表达式',
@@ -503,17 +503,17 @@ CREATE TABLE `sys_quartz_log` (
`exception_detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '异常详情',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '定时任务日志' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '定时任务日志' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_quartz_log
-- Records of system_quartz_log
-- ----------------------------
-- ----------------------------
-- Table structure for sys_role
-- Table structure for system_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
DROP TABLE IF EXISTS `system_role`;
CREATE TABLE `system_role` (
`role_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
`level` int(0) NULL DEFAULT NULL COMMENT '角色级别',
@@ -527,20 +527,20 @@ CREATE TABLE `sys_role` (
UNIQUE INDEX `uniq_name`(`name`) USING BTREE,
INDEX `idx_level`(`level`) USING BTREE,
INDEX `idx_sys_role_level`(`level`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_role
-- Records of system_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, '超级管理员', 1, '666', '全部', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_role` VALUES (2, '普通用户', 2, '-', '本级', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_role` VALUES (7, 'test', 3, 'testtesttesttesttesttesttesttesttest', '全部', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_role` VALUES (1, '超级管理员', 1, '666', '全部', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_role` VALUES (2, '普通用户', 2, '-', '本级', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_role` VALUES (7, 'test', 3, 'testtesttesttesttesttesttesttesttest', '全部', 'admin', 'admin', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
-- ----------------------------
-- Table structure for sys_roles_depts
-- Table structure for system_roles_depts
-- ----------------------------
DROP TABLE IF EXISTS `sys_roles_depts`;
CREATE TABLE `sys_roles_depts` (
DROP TABLE IF EXISTS `system_roles_depts`;
CREATE TABLE `system_roles_depts` (
`role_id` bigint(0) NOT NULL COMMENT '角色ID',
`dept_id` bigint(0) NOT NULL COMMENT '部门ID',
PRIMARY KEY (`role_id`, `dept_id`) USING BTREE,
@@ -550,14 +550,14 @@ CREATE TABLE `sys_roles_depts` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色部门关联' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_roles_depts
-- Records of system_roles_depts
-- ----------------------------
-- ----------------------------
-- Table structure for sys_roles_menus
-- Table structure for system_roles_menus
-- ----------------------------
DROP TABLE IF EXISTS `sys_roles_menus`;
CREATE TABLE `sys_roles_menus` (
DROP TABLE IF EXISTS `system_roles_menus`;
CREATE TABLE `system_roles_menus` (
`menu_id` bigint(0) NOT NULL COMMENT '菜单ID',
`role_id` bigint(0) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`menu_id`, `role_id`) USING BTREE,
@@ -567,100 +567,100 @@ CREATE TABLE `sys_roles_menus` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色菜单关联' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_roles_menus
-- Records of system_roles_menus
-- ----------------------------
INSERT INTO `sys_roles_menus` VALUES (1, 1);
INSERT INTO `sys_roles_menus` VALUES (2, 1);
INSERT INTO `sys_roles_menus` VALUES (3, 1);
INSERT INTO `sys_roles_menus` VALUES (5, 1);
INSERT INTO `sys_roles_menus` VALUES (6, 1);
INSERT INTO `sys_roles_menus` VALUES (9, 1);
INSERT INTO `sys_roles_menus` VALUES (10, 1);
INSERT INTO `sys_roles_menus` VALUES (10, 2);
INSERT INTO `sys_roles_menus` VALUES (11, 1);
INSERT INTO `sys_roles_menus` VALUES (11, 2);
INSERT INTO `sys_roles_menus` VALUES (14, 1);
INSERT INTO `sys_roles_menus` VALUES (14, 7);
INSERT INTO `sys_roles_menus` VALUES (15, 1);
INSERT INTO `sys_roles_menus` VALUES (15, 2);
INSERT INTO `sys_roles_menus` VALUES (18, 1);
INSERT INTO `sys_roles_menus` VALUES (18, 2);
INSERT INTO `sys_roles_menus` VALUES (18, 7);
INSERT INTO `sys_roles_menus` VALUES (21, 1);
INSERT INTO `sys_roles_menus` VALUES (21, 2);
INSERT INTO `sys_roles_menus` VALUES (22, 1);
INSERT INTO `sys_roles_menus` VALUES (22, 2);
INSERT INTO `sys_roles_menus` VALUES (23, 1);
INSERT INTO `sys_roles_menus` VALUES (23, 2);
INSERT INTO `sys_roles_menus` VALUES (24, 1);
INSERT INTO `sys_roles_menus` VALUES (24, 2);
INSERT INTO `sys_roles_menus` VALUES (27, 1);
INSERT INTO `sys_roles_menus` VALUES (27, 2);
INSERT INTO `sys_roles_menus` VALUES (28, 1);
INSERT INTO `sys_roles_menus` VALUES (33, 1);
INSERT INTO `sys_roles_menus` VALUES (33, 2);
INSERT INTO `sys_roles_menus` VALUES (34, 1);
INSERT INTO `sys_roles_menus` VALUES (34, 2);
INSERT INTO `sys_roles_menus` VALUES (35, 1);
INSERT INTO `sys_roles_menus` VALUES (36, 1);
INSERT INTO `sys_roles_menus` VALUES (36, 2);
INSERT INTO `sys_roles_menus` VALUES (36, 7);
INSERT INTO `sys_roles_menus` VALUES (37, 1);
INSERT INTO `sys_roles_menus` VALUES (39, 1);
INSERT INTO `sys_roles_menus` VALUES (41, 1);
INSERT INTO `sys_roles_menus` VALUES (44, 1);
INSERT INTO `sys_roles_menus` VALUES (45, 1);
INSERT INTO `sys_roles_menus` VALUES (46, 1);
INSERT INTO `sys_roles_menus` VALUES (48, 1);
INSERT INTO `sys_roles_menus` VALUES (49, 1);
INSERT INTO `sys_roles_menus` VALUES (50, 1);
INSERT INTO `sys_roles_menus` VALUES (52, 1);
INSERT INTO `sys_roles_menus` VALUES (53, 1);
INSERT INTO `sys_roles_menus` VALUES (54, 1);
INSERT INTO `sys_roles_menus` VALUES (56, 1);
INSERT INTO `sys_roles_menus` VALUES (57, 1);
INSERT INTO `sys_roles_menus` VALUES (58, 1);
INSERT INTO `sys_roles_menus` VALUES (60, 1);
INSERT INTO `sys_roles_menus` VALUES (61, 1);
INSERT INTO `sys_roles_menus` VALUES (62, 1);
INSERT INTO `sys_roles_menus` VALUES (64, 1);
INSERT INTO `sys_roles_menus` VALUES (65, 1);
INSERT INTO `sys_roles_menus` VALUES (66, 1);
INSERT INTO `sys_roles_menus` VALUES (73, 1);
INSERT INTO `sys_roles_menus` VALUES (74, 1);
INSERT INTO `sys_roles_menus` VALUES (75, 1);
INSERT INTO `sys_roles_menus` VALUES (77, 1);
INSERT INTO `sys_roles_menus` VALUES (77, 2);
INSERT INTO `sys_roles_menus` VALUES (77, 7);
INSERT INTO `sys_roles_menus` VALUES (78, 1);
INSERT INTO `sys_roles_menus` VALUES (78, 2);
INSERT INTO `sys_roles_menus` VALUES (78, 7);
INSERT INTO `sys_roles_menus` VALUES (79, 1);
INSERT INTO `sys_roles_menus` VALUES (79, 2);
INSERT INTO `sys_roles_menus` VALUES (79, 7);
INSERT INTO `sys_roles_menus` VALUES (80, 1);
INSERT INTO `sys_roles_menus` VALUES (80, 2);
INSERT INTO `sys_roles_menus` VALUES (83, 1);
INSERT INTO `sys_roles_menus` VALUES (83, 2);
INSERT INTO `sys_roles_menus` VALUES (117, 1);
INSERT INTO `sys_roles_menus` VALUES (117, 2);
INSERT INTO `sys_roles_menus` VALUES (118, 1);
INSERT INTO `sys_roles_menus` VALUES (118, 2);
INSERT INTO `sys_roles_menus` VALUES (119, 1);
INSERT INTO `sys_roles_menus` VALUES (119, 2);
INSERT INTO `sys_roles_menus` VALUES (120, 1);
INSERT INTO `sys_roles_menus` VALUES (120, 2);
INSERT INTO `sys_roles_menus` VALUES (121, 1);
INSERT INTO `sys_roles_menus` VALUES (121, 2);
INSERT INTO `sys_roles_menus` VALUES (122, 1);
INSERT INTO `sys_roles_menus` VALUES (122, 2);
INSERT INTO `sys_roles_menus` VALUES (125, 1);
INSERT INTO `system_roles_menus` VALUES (1, 1);
INSERT INTO `system_roles_menus` VALUES (2, 1);
INSERT INTO `system_roles_menus` VALUES (3, 1);
INSERT INTO `system_roles_menus` VALUES (5, 1);
INSERT INTO `system_roles_menus` VALUES (6, 1);
INSERT INTO `system_roles_menus` VALUES (9, 1);
INSERT INTO `system_roles_menus` VALUES (10, 1);
INSERT INTO `system_roles_menus` VALUES (10, 2);
INSERT INTO `system_roles_menus` VALUES (11, 1);
INSERT INTO `system_roles_menus` VALUES (11, 2);
INSERT INTO `system_roles_menus` VALUES (14, 1);
INSERT INTO `system_roles_menus` VALUES (14, 7);
INSERT INTO `system_roles_menus` VALUES (15, 1);
INSERT INTO `system_roles_menus` VALUES (15, 2);
INSERT INTO `system_roles_menus` VALUES (18, 1);
INSERT INTO `system_roles_menus` VALUES (18, 2);
INSERT INTO `system_roles_menus` VALUES (18, 7);
INSERT INTO `system_roles_menus` VALUES (21, 1);
INSERT INTO `system_roles_menus` VALUES (21, 2);
INSERT INTO `system_roles_menus` VALUES (22, 1);
INSERT INTO `system_roles_menus` VALUES (22, 2);
INSERT INTO `system_roles_menus` VALUES (23, 1);
INSERT INTO `system_roles_menus` VALUES (23, 2);
INSERT INTO `system_roles_menus` VALUES (24, 1);
INSERT INTO `system_roles_menus` VALUES (24, 2);
INSERT INTO `system_roles_menus` VALUES (27, 1);
INSERT INTO `system_roles_menus` VALUES (27, 2);
INSERT INTO `system_roles_menus` VALUES (28, 1);
INSERT INTO `system_roles_menus` VALUES (33, 1);
INSERT INTO `system_roles_menus` VALUES (33, 2);
INSERT INTO `system_roles_menus` VALUES (34, 1);
INSERT INTO `system_roles_menus` VALUES (34, 2);
INSERT INTO `system_roles_menus` VALUES (35, 1);
INSERT INTO `system_roles_menus` VALUES (36, 1);
INSERT INTO `system_roles_menus` VALUES (36, 2);
INSERT INTO `system_roles_menus` VALUES (36, 7);
INSERT INTO `system_roles_menus` VALUES (37, 1);
INSERT INTO `system_roles_menus` VALUES (39, 1);
INSERT INTO `system_roles_menus` VALUES (41, 1);
INSERT INTO `system_roles_menus` VALUES (44, 1);
INSERT INTO `system_roles_menus` VALUES (45, 1);
INSERT INTO `system_roles_menus` VALUES (46, 1);
INSERT INTO `system_roles_menus` VALUES (48, 1);
INSERT INTO `system_roles_menus` VALUES (49, 1);
INSERT INTO `system_roles_menus` VALUES (50, 1);
INSERT INTO `system_roles_menus` VALUES (52, 1);
INSERT INTO `system_roles_menus` VALUES (53, 1);
INSERT INTO `system_roles_menus` VALUES (54, 1);
INSERT INTO `system_roles_menus` VALUES (56, 1);
INSERT INTO `system_roles_menus` VALUES (57, 1);
INSERT INTO `system_roles_menus` VALUES (58, 1);
INSERT INTO `system_roles_menus` VALUES (60, 1);
INSERT INTO `system_roles_menus` VALUES (61, 1);
INSERT INTO `system_roles_menus` VALUES (62, 1);
INSERT INTO `system_roles_menus` VALUES (64, 1);
INSERT INTO `system_roles_menus` VALUES (65, 1);
INSERT INTO `system_roles_menus` VALUES (66, 1);
INSERT INTO `system_roles_menus` VALUES (73, 1);
INSERT INTO `system_roles_menus` VALUES (74, 1);
INSERT INTO `system_roles_menus` VALUES (75, 1);
INSERT INTO `system_roles_menus` VALUES (77, 1);
INSERT INTO `system_roles_menus` VALUES (77, 2);
INSERT INTO `system_roles_menus` VALUES (77, 7);
INSERT INTO `system_roles_menus` VALUES (78, 1);
INSERT INTO `system_roles_menus` VALUES (78, 2);
INSERT INTO `system_roles_menus` VALUES (78, 7);
INSERT INTO `system_roles_menus` VALUES (79, 1);
INSERT INTO `system_roles_menus` VALUES (79, 2);
INSERT INTO `system_roles_menus` VALUES (79, 7);
INSERT INTO `system_roles_menus` VALUES (80, 1);
INSERT INTO `system_roles_menus` VALUES (80, 2);
INSERT INTO `system_roles_menus` VALUES (83, 1);
INSERT INTO `system_roles_menus` VALUES (83, 2);
INSERT INTO `system_roles_menus` VALUES (117, 1);
INSERT INTO `system_roles_menus` VALUES (117, 2);
INSERT INTO `system_roles_menus` VALUES (118, 1);
INSERT INTO `system_roles_menus` VALUES (118, 2);
INSERT INTO `system_roles_menus` VALUES (119, 1);
INSERT INTO `system_roles_menus` VALUES (119, 2);
INSERT INTO `system_roles_menus` VALUES (120, 1);
INSERT INTO `system_roles_menus` VALUES (120, 2);
INSERT INTO `system_roles_menus` VALUES (121, 1);
INSERT INTO `system_roles_menus` VALUES (121, 2);
INSERT INTO `system_roles_menus` VALUES (122, 1);
INSERT INTO `system_roles_menus` VALUES (122, 2);
INSERT INTO `system_roles_menus` VALUES (125, 1);
-- ----------------------------
-- Table structure for sys_user
-- Table structure for system_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
DROP TABLE IF EXISTS `system_user`;
CREATE TABLE `system_user` (
`user_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`dept_id` bigint(0) NULL DEFAULT NULL COMMENT '部门名称',
`username` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
@@ -684,19 +684,19 @@ CREATE TABLE `sys_user` (
INDEX `idx_dept_id`(`dept_id`) USING BTREE,
INDEX `idx_enabled`(`enabled`) USING BTREE,
INDEX `uniq_phone`(`phone`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统用户' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统用户' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_user
-- Records of system_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1, 2, 'admin', '管理员', '男', '18888888888', '1943815081@qq.com', '', '', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'1', b'1', 'admin', 'admin', '2020-05-03 16:38:31', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `sys_user` VALUES (3, 2, '测试', '测试', '男', '18888888881', '188888@qq.com', NULL, NULL, '$2a$10$DpAGWp3CYtYySPqJe.CnL.c/OCR0kkPLLAwAyID0yFHLamtYdYsvy', b'0', b'1', 'admin', 'admin', NULL, '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_user` VALUES (1, 2, 'admin', '管理员', '男', '18888888888', '1943815081@qq.com', '', '', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'1', b'1', 'admin', 'admin', '2020-05-03 16:38:31', '2025-01-05 00:00:00', '2025-01-05 00:00:00');
INSERT INTO `system_user` VALUES (3, 2, '测试', '测试', '男', '18888888881', '188888@qq.com', NULL, NULL, '$2a$10$DpAGWp3CYtYySPqJe.CnL.c/OCR0kkPLLAwAyID0yFHLamtYdYsvy', b'0', b'1', 'admin', 'admin', NULL, '2025-01-05 00:00:00', '2025-01-05 00:00:00');
-- ----------------------------
-- Table structure for sys_users_jobs
-- Table structure for system_users_jobs
-- ----------------------------
DROP TABLE IF EXISTS `sys_users_jobs`;
CREATE TABLE `sys_users_jobs` (
DROP TABLE IF EXISTS `system_users_jobs`;
CREATE TABLE `system_users_jobs` (
`user_id` bigint(0) NOT NULL COMMENT '用户ID',
`job_id` bigint(0) NOT NULL COMMENT '岗位ID',
PRIMARY KEY (`user_id`, `job_id`) USING BTREE,
@@ -705,16 +705,16 @@ CREATE TABLE `sys_users_jobs` (
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户与岗位关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_users_jobs
-- Records of system_users_jobs
-- ----------------------------
INSERT INTO `sys_users_jobs` VALUES (1, 11);
INSERT INTO `sys_users_jobs` VALUES (3, 11);
INSERT INTO `system_users_jobs` VALUES (1, 11);
INSERT INTO `system_users_jobs` VALUES (3, 11);
-- ----------------------------
-- Table structure for sys_users_roles
-- Table structure for system_users_roles
-- ----------------------------
DROP TABLE IF EXISTS `sys_users_roles`;
CREATE TABLE `sys_users_roles` (
DROP TABLE IF EXISTS `system_users_roles`;
CREATE TABLE `system_users_roles` (
`user_id` bigint(0) NOT NULL COMMENT '用户ID',
`role_id` bigint(0) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`, `role_id`) USING BTREE,
@@ -723,10 +723,10 @@ CREATE TABLE `sys_users_roles` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色关联' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_users_roles
-- Records of system_users_roles
-- ----------------------------
INSERT INTO `sys_users_roles` VALUES (1, 1);
INSERT INTO `sys_users_roles` VALUES (3, 2);
INSERT INTO `system_users_roles` VALUES (1, 1);
INSERT INTO `system_users_roles` VALUES (3, 2);
-- ----------------------------
-- Table structure for tool_email_config
@@ -763,7 +763,7 @@ CREATE TABLE `tool_local_storage` (
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '本地存储' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '本地存储' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of tool_local_storage
@@ -804,7 +804,7 @@ CREATE TABLE `tool_qiniu_content` (
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '上传或同步的时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uniq_name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '七牛云文件存储' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '七牛云文件存储' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of tool_qiniu_content