mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 01:25:28 +08:00
update 优化方法签名,移除不必要的异常声明以简化代码
This commit is contained in:
parent
e38e99b7f8
commit
89c69aab91
@ -92,17 +92,15 @@ public class AuthController {
|
||||
LoginVo loginVo = IAuthStrategy.login(body, client, grantType);
|
||||
|
||||
Long userId = LoginHelper.getUserId();
|
||||
scheduledExecutorService.schedule(() -> {
|
||||
messageService.publishMessage(
|
||||
List.of(userId),
|
||||
PushPayloadDTO.of(
|
||||
PushTypeEnum.MESSAGE,
|
||||
PushSourceEnum.BACKEND,
|
||||
DateUtils.getTodayHour(new Date()) + "好,欢迎登录 RuoYi-Vue-Plus 后台管理系统",
|
||||
null
|
||||
)
|
||||
);
|
||||
}, 5, TimeUnit.SECONDS);
|
||||
scheduledExecutorService.schedule(() -> messageService.publishMessage(
|
||||
List.of(userId),
|
||||
PushPayloadDTO.of(
|
||||
PushTypeEnum.MESSAGE,
|
||||
PushSourceEnum.BACKEND,
|
||||
DateUtils.getTodayHour(new Date()) + "好,欢迎登录 RuoYi-Vue-Plus 后台管理系统",
|
||||
null
|
||||
)
|
||||
), 5, TimeUnit.SECONDS);
|
||||
return R.ok(loginVo);
|
||||
}
|
||||
|
||||
@ -113,7 +111,7 @@ public class AuthController {
|
||||
* @return 跳转地址
|
||||
*/
|
||||
@GetMapping("/binding/{source}")
|
||||
public R<String> authBinding(@PathVariable("source") String source) {
|
||||
public R<String> authBinding(@PathVariable String source) {
|
||||
SocialLoginConfigProperties obj = socialProperties.getType().get(source);
|
||||
if (ObjectUtil.isNull(obj)) {
|
||||
return R.fail(source + "平台账号暂不支持");
|
||||
|
||||
@ -46,25 +46,22 @@ import java.util.function.Supplier;
|
||||
@Service
|
||||
public class SysLoginService {
|
||||
|
||||
/**
|
||||
* 最大重试次数。
|
||||
*/
|
||||
@Value("${user.password.maxRetryCount}")
|
||||
private Integer maxRetryCount;
|
||||
|
||||
/**
|
||||
* 锁定时间。
|
||||
*/
|
||||
@Value("${user.password.lockTime}")
|
||||
private Integer lockTime;
|
||||
|
||||
private final ISysPermissionService permissionService;
|
||||
private final ISysSocialService sysSocialService;
|
||||
private final ISysRoleService roleService;
|
||||
private final ISysDeptService deptService;
|
||||
private final ISysPostService postService;
|
||||
private final SysUserMapper userMapper;
|
||||
|
||||
/**
|
||||
* 最大重试次数。
|
||||
*/
|
||||
@Value("${user.password.maxRetryCount}")
|
||||
private Integer maxRetryCount;
|
||||
/**
|
||||
* 锁定时间。
|
||||
*/
|
||||
@Value("${user.password.lockTime}")
|
||||
private Integer lockTime;
|
||||
|
||||
/**
|
||||
* 绑定第三方用户
|
||||
@ -159,19 +156,20 @@ public class SysLoginService {
|
||||
loginUser.setDeptName(deptOpt.map(SysDeptVo::getDeptName).orElse(StringUtils.EMPTY));
|
||||
loginUser.setDeptCategory(deptOpt.map(SysDeptVo::getDeptCategory).orElse(StringUtils.EMPTY));
|
||||
}
|
||||
ThreadUtils.virtualInvokeAll(() -> {
|
||||
loginUser.setMenuPermission(permissionService.getMenuPermission(userId));
|
||||
}, () -> {
|
||||
loginUser.setRolePermission(permissionService.getRolePermission(userId));
|
||||
}, () -> {
|
||||
List<SysRoleVo> roles = roleService.selectRolesByUserId(userId);
|
||||
List<RoleDTO> roleDtos = BeanUtil.copyToList(roles, RoleDTO.class);
|
||||
loginUser.setRoles(roleDtos);
|
||||
loginUser.setDataScopeRoleMap(permissionService.getDataScopeRoleMap(roleDtos));
|
||||
}, () -> {
|
||||
List<SysPostVo> posts = postService.selectPostsByUserId(userId);
|
||||
loginUser.setPosts(BeanUtil.copyToList(posts, PostDTO.class));
|
||||
});
|
||||
ThreadUtils.virtualInvokeAll(
|
||||
() -> loginUser.setMenuPermission(permissionService.getMenuPermission(userId)),
|
||||
() -> loginUser.setRolePermission(permissionService.getRolePermission(userId)),
|
||||
() -> {
|
||||
List<SysRoleVo> roles = roleService.selectRolesByUserId(userId);
|
||||
List<RoleDTO> roleDtos = BeanUtil.copyToList(roles, RoleDTO.class);
|
||||
loginUser.setRoles(roleDtos);
|
||||
loginUser.setDataScopeRoleMap(permissionService.getDataScopeRoleMap(roleDtos));
|
||||
},
|
||||
() -> {
|
||||
List<SysPostVo> posts = postService.selectPostsByUserId(userId);
|
||||
loginUser.setPosts(BeanUtil.copyToList(posts, PostDTO.class));
|
||||
}
|
||||
);
|
||||
return loginUser;
|
||||
}
|
||||
|
||||
|
||||
@ -98,9 +98,8 @@ public class ThreadPoolConfig {
|
||||
* @param t 任务执行过程中抛出的异常
|
||||
*/
|
||||
public static void printException(Runnable r, Throwable t) {
|
||||
if (t == null && r instanceof Future<?>) {
|
||||
if (t == null && r instanceof Future<?> future) {
|
||||
try {
|
||||
Future<?> future = (Future<?>) r;
|
||||
if (future.isDone()) {
|
||||
future.get();
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ import java.lang.reflect.Method;
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class ReflectUtils extends ReflectUtil {
|
||||
|
||||
|
||||
@ -21,6 +21,6 @@ public enum EncodeType {
|
||||
/**
|
||||
* 16进制编码
|
||||
*/
|
||||
HEX;
|
||||
HEX
|
||||
|
||||
}
|
||||
|
||||
@ -33,9 +33,8 @@ public class EncryptResponseBodyWrapper extends HttpServletResponseWrapper {
|
||||
* 构造加密响应包装器。
|
||||
*
|
||||
* @param response 原始响应
|
||||
* @throws IOException 创建输出流异常
|
||||
*/
|
||||
public EncryptResponseBodyWrapper(HttpServletResponse response) throws IOException {
|
||||
public EncryptResponseBodyWrapper(HttpServletResponse response) {
|
||||
super(response);
|
||||
this.byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
this.servletOutputStream = this.getOutputStream();
|
||||
@ -116,7 +115,6 @@ public class EncryptResponseBodyWrapper extends HttpServletResponseWrapper {
|
||||
* @param publicKey RSA公钥 (用于加密 AES 秘钥)
|
||||
* @param headerFlag 请求头标志
|
||||
* @return 加密内容
|
||||
* @throws IOException
|
||||
*/
|
||||
public String getEncryptContent(HttpServletResponse servletResponse, String publicKey, String headerFlag) throws IOException {
|
||||
// 生成秘钥
|
||||
@ -147,7 +145,7 @@ public class EncryptResponseBodyWrapper extends HttpServletResponseWrapper {
|
||||
* @return 响应输出流
|
||||
*/
|
||||
@Override
|
||||
public ServletOutputStream getOutputStream() throws IOException {
|
||||
public ServletOutputStream getOutputStream() {
|
||||
return new ServletOutputStream() {
|
||||
/**
|
||||
* 判断响应输出流是否可写。
|
||||
@ -173,10 +171,9 @@ public class EncryptResponseBodyWrapper extends HttpServletResponseWrapper {
|
||||
* 写入单个字节到响应缓存。
|
||||
*
|
||||
* @param b 待写入字节
|
||||
* @throws IOException IO 异常
|
||||
*/
|
||||
@Override
|
||||
public void write(int b) throws IOException {
|
||||
public void write(int b) {
|
||||
byteArrayOutputStream.write(b);
|
||||
}
|
||||
|
||||
@ -197,10 +194,9 @@ public class EncryptResponseBodyWrapper extends HttpServletResponseWrapper {
|
||||
* @param b 待写入字节数组
|
||||
* @param off 起始偏移量
|
||||
* @param len 写入长度
|
||||
* @throws IOException IO 异常
|
||||
*/
|
||||
@Override
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
public void write(byte[] b, int off, int len) {
|
||||
byteArrayOutputStream.write(b, off, len);
|
||||
}
|
||||
};
|
||||
|
||||
@ -73,7 +73,7 @@ public class DefaultExcelListener<T> extends AnalysisEventListener<T> implements
|
||||
* @param context Excel 上下文
|
||||
*/
|
||||
@Override
|
||||
public void onException(Exception exception, AnalysisContext context) throws Exception {
|
||||
public void onException(Exception exception, AnalysisContext context) {
|
||||
String errMsg = null;
|
||||
if (exception instanceof ExcelDataConvertException excelDataConvertException) {
|
||||
// 如果是某一个单元格的转换异常 能获取到具体行号
|
||||
|
||||
@ -615,9 +615,8 @@ public final class ExcelBuilder<T> {
|
||||
*
|
||||
* @param filename 文件名
|
||||
* @param response HTTP 响应
|
||||
* @throws UnsupportedEncodingException 文件名编码异常
|
||||
*/
|
||||
private static void resetResponse(String filename, HttpServletResponse response) throws UnsupportedEncodingException {
|
||||
private static void resetResponse(String filename, HttpServletResponse response) {
|
||||
FileUtils.setAttachmentResponseHeader(response, encodingFilename(filename));
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8");
|
||||
}
|
||||
|
||||
@ -109,16 +109,20 @@ public class JsonValueEnhancer {
|
||||
* @param visited 已访问对象集合,用于避免循环引用
|
||||
*/
|
||||
private void collectValue(Object value, JsonEnhancementContext context, IdentityHashMap<Object, Boolean> visited) {
|
||||
if (value == null) {
|
||||
return;
|
||||
}
|
||||
if (value instanceof Map<?, ?> map) {
|
||||
map.values().forEach(child -> collectValue(child, context, visited));
|
||||
return;
|
||||
}
|
||||
if (value instanceof Iterable<?> iterable) {
|
||||
iterable.forEach(child -> collectValue(child, context, visited));
|
||||
return;
|
||||
switch (value) {
|
||||
case null -> {
|
||||
return;
|
||||
}
|
||||
case Map<?, ?> map -> {
|
||||
map.values().forEach(child -> collectValue(child, context, visited));
|
||||
return;
|
||||
}
|
||||
case Iterable<?> iterable -> {
|
||||
iterable.forEach(child -> collectValue(child, context, visited));
|
||||
return;
|
||||
}
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
if (value.getClass().isArray()) {
|
||||
int length = Array.getLength(value);
|
||||
|
||||
@ -142,9 +142,8 @@ public class LogAspect {
|
||||
* @param log 日志
|
||||
* @param operLog 操作日志
|
||||
* @param jsonResult 返回结果
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
public void getControllerMethodDescription(JoinPoint joinPoint, Log log, OperLogEvent operLog, Object jsonResult) throws Exception {
|
||||
public void getControllerMethodDescription(JoinPoint joinPoint, Log log, OperLogEvent operLog, Object jsonResult) {
|
||||
// 设置action动作
|
||||
operLog.setBusinessType(log.businessType().ordinal());
|
||||
// 设置标题
|
||||
@ -168,9 +167,8 @@ public class LogAspect {
|
||||
* @param joinPoint 切点
|
||||
* @param operLog 操作日志
|
||||
* @param excludeParamNames 排除参数名
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
private void setRequestValue(JoinPoint joinPoint, OperLogEvent operLog, String[] excludeParamNames) throws Exception {
|
||||
private void setRequestValue(JoinPoint joinPoint, OperLogEvent operLog, String[] excludeParamNames) {
|
||||
Map<String, String> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest());
|
||||
String requestMethod = operLog.getRequestMethod();
|
||||
if (MapUtil.isEmpty(paramsMap) && StringUtils.equalsAny(requestMethod, HttpMethod.PUT.name(), HttpMethod.POST.name(), HttpMethod.DELETE.name())) {
|
||||
|
||||
@ -718,7 +718,7 @@ public final class LambdaQueryBuilder<T> implements LambdaQueryCondition<T, Lamb
|
||||
* @return 当前查询构造辅助对象
|
||||
*/
|
||||
public LambdaQueryBuilder<T> allEq(BiPredicate<SFunction<T, ?>, Object> filter, Map<?, ?> params, boolean null2IsNull) {
|
||||
wrapper.allEq(true, (BiPredicate) filter, (Map) params, null2IsNull);
|
||||
wrapper.allEq(true, filter, (Map) params, null2IsNull);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -732,7 +732,7 @@ public final class LambdaQueryBuilder<T> implements LambdaQueryCondition<T, Lamb
|
||||
* @return 当前查询构造辅助对象
|
||||
*/
|
||||
public LambdaQueryBuilder<T> allEq(boolean condition, BiPredicate<SFunction<T, ?>, Object> filter, Map<?, ?> params, boolean null2IsNull) {
|
||||
wrapper.allEq(condition, (BiPredicate) filter, (Map) params, null2IsNull);
|
||||
wrapper.allEq(condition, filter, (Map) params, null2IsNull);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -1368,7 +1368,6 @@ public final class LambdaQueryBuilder<T> implements LambdaQueryCondition<T, Lamb
|
||||
*
|
||||
* @return 聚合查询包装器
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private AggregateLambdaQueryWrapper<T> aggregateWrapper() {
|
||||
return (AggregateLambdaQueryWrapper<T>) wrapper;
|
||||
}
|
||||
|
||||
@ -23,7 +23,6 @@ import org.apache.ibatis.session.RowBounds;
|
||||
import org.dromara.common.mybatis.handler.PlusDataPermissionHandler;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -49,10 +48,9 @@ public class PlusDataPermissionInterceptor extends BaseMultiTableInnerIntercepto
|
||||
* @param rowBounds 分页对象
|
||||
* @param resultHandler 结果处理器
|
||||
* @param boundSql 绑定的 SQL 对象
|
||||
* @throws SQLException 如果发生 SQL 异常
|
||||
*/
|
||||
@Override
|
||||
public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException {
|
||||
public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) {
|
||||
// 检查是否需要忽略数据权限处理
|
||||
if (InterceptorIgnoreHelper.willIgnoreDataPermission(ms.getId())) {
|
||||
return;
|
||||
|
||||
@ -222,11 +222,9 @@ public abstract class AbstractOssClientImpl implements OssClient {
|
||||
@Override
|
||||
public <T> T doCustomUpload(AsyncRequestBody body, Consumer<PutObjectRequest.Builder> putObjectRequestBuilderConsumer, Collection<TransferListener> transferListeners, BiFunction<CompletedUpload, Throwable, T> handleAsyncAction) {
|
||||
try {
|
||||
return s3TransferManager.upload(uploadRequestBuilder -> {
|
||||
uploadRequestBuilder.requestBody(body)
|
||||
.putObjectRequest(putObjectRequestBuilderConsumer)
|
||||
.transferListeners(transferListeners);
|
||||
})
|
||||
return s3TransferManager.upload(uploadRequestBuilder -> uploadRequestBuilder.requestBody(body)
|
||||
.putObjectRequest(putObjectRequestBuilderConsumer)
|
||||
.transferListeners(transferListeners))
|
||||
.completionFuture()
|
||||
.handleAsync(handleAsyncAction)
|
||||
.join();
|
||||
@ -506,14 +504,12 @@ public abstract class AbstractOssClientImpl implements OssClient {
|
||||
String md5Digest = options.getMd5Digest();
|
||||
Map<String, String> metadata = options.getMetadata();
|
||||
Collection<TransferListener> transferListeners = options.getTransferListeners();
|
||||
HandleAsyncResult<PutObjectResponse> result = doCustomUpload(body, builder -> {
|
||||
builder.bucket(bucket)
|
||||
.key(key)
|
||||
.contentMD5(md5Digest)
|
||||
.contentType(contentType)
|
||||
.contentLength(contentLength)
|
||||
.metadata(metadata);
|
||||
}, transferListeners);
|
||||
HandleAsyncResult<PutObjectResponse> result = doCustomUpload(body, builder -> builder.bucket(bucket)
|
||||
.key(key)
|
||||
.contentMD5(md5Digest)
|
||||
.contentType(contentType)
|
||||
.contentLength(contentLength)
|
||||
.metadata(metadata), transferListeners);
|
||||
if (result.isFailure()) {
|
||||
throw toStorageException(result.error());
|
||||
}
|
||||
@ -720,10 +716,8 @@ public abstract class AbstractOssClientImpl implements OssClient {
|
||||
@Override
|
||||
public String bucketPresignGetUrl(String bucket, String key, Duration expiredTime) {
|
||||
try {
|
||||
return s3Presigner.presignGetObject(getObjectPresignRequestBuilder -> {
|
||||
getObjectPresignRequestBuilder.signatureDuration(expiredTime)
|
||||
.getObjectRequest(getObjectRequestBuilder -> getObjectRequestBuilder.bucket(bucket).key(key));
|
||||
})
|
||||
return s3Presigner.presignGetObject(getObjectPresignRequestBuilder -> getObjectPresignRequestBuilder.signatureDuration(expiredTime)
|
||||
.getObjectRequest(getObjectRequestBuilder -> getObjectRequestBuilder.bucket(bucket).key(key)))
|
||||
.url()
|
||||
.toExternalForm();
|
||||
} catch (Exception e) {
|
||||
@ -743,10 +737,8 @@ public abstract class AbstractOssClientImpl implements OssClient {
|
||||
@Override
|
||||
public String bucketPresignPutUrl(String bucket, String key, Duration expiredTime, Map<String, String> metadata) {
|
||||
try {
|
||||
return s3Presigner.presignPutObject(putObjectPresignRequestBuilder -> {
|
||||
putObjectPresignRequestBuilder.signatureDuration(expiredTime)
|
||||
.putObjectRequest(putObjectRequestBuilder -> putObjectRequestBuilder.bucket(bucket).key(key).metadata(metadata));
|
||||
})
|
||||
return s3Presigner.presignPutObject(putObjectPresignRequestBuilder -> putObjectPresignRequestBuilder.signatureDuration(expiredTime)
|
||||
.putObjectRequest(putObjectRequestBuilder -> putObjectRequestBuilder.bucket(bucket).key(key).metadata(metadata)))
|
||||
.url()
|
||||
.toExternalForm();
|
||||
} catch (Exception e) {
|
||||
@ -1127,10 +1119,9 @@ public abstract class AbstractOssClientImpl implements OssClient {
|
||||
/**
|
||||
* 关闭底层 S3 客户端资源。
|
||||
*
|
||||
* @throws Exception 关闭资源异常
|
||||
*/
|
||||
@Override
|
||||
public void close() throws Exception {
|
||||
public void close() {
|
||||
if (s3TransferManager != null) {
|
||||
s3TransferManager.close();
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ public record HandleAsyncResult<T>(
|
||||
* @return 异步处理结果
|
||||
*/
|
||||
public static <T> HandleAsyncResult<T> of(T result, Throwable error) {
|
||||
return new HandleAsyncResult<T>(result, error);
|
||||
return new HandleAsyncResult<>(result, error);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -71,7 +71,7 @@ public record HandleAsyncResult<T>(
|
||||
* @return 异步处理结果
|
||||
*/
|
||||
public static <T> HandleAsyncResult<T> success(T result) {
|
||||
return new HandleAsyncResult<T>(result, null);
|
||||
return new HandleAsyncResult<>(result, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -82,6 +82,6 @@ public record HandleAsyncResult<T>(
|
||||
* @return 异步处理结果
|
||||
*/
|
||||
public static <T> HandleAsyncResult<T> failure(Throwable error) {
|
||||
return new HandleAsyncResult<T>(null, error);
|
||||
return new HandleAsyncResult<>(null, error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,10 +95,9 @@ public class SseController implements DisposableBean {
|
||||
/**
|
||||
* 容器销毁时释放资源占位实现。
|
||||
*
|
||||
* @throws Exception 销毁异常
|
||||
*/
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
public void destroy() {
|
||||
// 销毁时不需要做什么 此方法避免无用操作报错
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ public class RepeatSubmitAspect {
|
||||
* @param repeatSubmit 防重复提交注解
|
||||
*/
|
||||
@Before("@annotation(repeatSubmit)")
|
||||
public void doBefore(JoinPoint point, RepeatSubmit repeatSubmit) throws Throwable {
|
||||
public void doBefore(JoinPoint point, RepeatSubmit repeatSubmit) {
|
||||
// 如果注解不为0 则使用注解数值
|
||||
long interval = repeatSubmit.timeUnit().toMillis(repeatSubmit.interval());
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ public class RedisConfig {
|
||||
|
||||
/**
|
||||
* redis集群配置 yml
|
||||
*
|
||||
* <p>
|
||||
* --- # redis 集群配置(单机与集群只能开启一个另一个需要注释掉)
|
||||
* spring.data:
|
||||
* redis:
|
||||
@ -134,7 +134,7 @@ public class RedisConfig {
|
||||
* timeout: 10s
|
||||
* # 是否开启ssl
|
||||
* ssl.enabled: false
|
||||
*
|
||||
* <p>
|
||||
* redisson:
|
||||
* # 线程池数量
|
||||
* threads: 16
|
||||
|
||||
@ -22,7 +22,7 @@ import java.util.stream.Stream;
|
||||
* @version 3.1.0 新增
|
||||
*/
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@SuppressWarnings(value = {"unchecked", "rawtypes"})
|
||||
@SuppressWarnings(value = {"rawtypes"})
|
||||
public class RedisUtils {
|
||||
|
||||
private static final RedissonClient CLIENT = SpringUtils.getBean(RedissonClient.class);
|
||||
@ -280,9 +280,7 @@ public class RedisUtils {
|
||||
return;
|
||||
}
|
||||
RBatch batch = CLIENT.createBatch();
|
||||
collection.forEach(t -> {
|
||||
batch.getBucket(t.toString()).deleteAsync();
|
||||
});
|
||||
collection.forEach(t -> batch.getBucket(t.toString()).deleteAsync());
|
||||
batch.execute();
|
||||
}
|
||||
|
||||
|
||||
@ -129,9 +129,7 @@ public class SecurityConfig implements WebMvcConfigurer {
|
||||
String password = SpringUtils.getProperty("spring.boot.admin.client.password");
|
||||
return new SaServletFilter()
|
||||
.addInclude("/actuator", "/actuator/**")
|
||||
.setAuth(obj -> {
|
||||
SaHttpBasicUtil.check(username + StringUtils.COLON + password);
|
||||
})
|
||||
.setAuth(obj -> SaHttpBasicUtil.check(username + StringUtils.COLON + password))
|
||||
.setError(e -> {
|
||||
HttpServletResponse response = ServletUtils.getResponse();
|
||||
response.setContentType(SaTokenConsts.CONTENT_TYPE_APPLICATION_JSON);
|
||||
|
||||
@ -33,7 +33,6 @@ public class SocialUtils {
|
||||
* @return 授权响应
|
||||
* @throws AuthException 授权异常
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static AuthResponse<AuthUser> loginAuth(String source, String code, String state, SocialProperties socialProperties) throws AuthException {
|
||||
AuthRequest authRequest = getAuthRequest(source, socialProperties);
|
||||
AuthCallback callback = new AuthCallback();
|
||||
@ -93,4 +92,3 @@ public class SocialUtils {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -18,10 +18,9 @@ public class RepeatableFilter implements Filter {
|
||||
* 过滤器初始化入口,当前无额外初始化逻辑。
|
||||
*
|
||||
* @param filterConfig 过滤器配置
|
||||
* @throws ServletException 过滤器初始化异常
|
||||
*/
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
public void init(FilterConfig filterConfig) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -44,10 +44,9 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper {
|
||||
* 基于缓存的请求体构造字符读取器。
|
||||
*
|
||||
* @return 可重复读取的字符流
|
||||
* @throws IOException IO 异常
|
||||
*/
|
||||
@Override
|
||||
public BufferedReader getReader() throws IOException {
|
||||
public BufferedReader getReader() {
|
||||
return new BufferedReader(new InputStreamReader(getInputStream(), StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
@ -55,20 +54,18 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper {
|
||||
* 返回基于缓存请求体重新生成的输入流。
|
||||
*
|
||||
* @return 可重复读取的输入流
|
||||
* @throws IOException IO 异常
|
||||
*/
|
||||
@Override
|
||||
public ServletInputStream getInputStream() throws IOException {
|
||||
public ServletInputStream getInputStream() {
|
||||
final ByteArrayInputStream bais = new ByteArrayInputStream(body);
|
||||
return new ServletInputStream() {
|
||||
/**
|
||||
* 读取缓存请求体的下一个字节。
|
||||
*
|
||||
* @return 下一个字节
|
||||
* @throws IOException IO 异常
|
||||
*/
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
public int read() {
|
||||
return bais.read();
|
||||
}
|
||||
|
||||
@ -76,10 +73,9 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper {
|
||||
* 返回缓存请求体剩余可读字节数。
|
||||
*
|
||||
* @return 剩余字节数
|
||||
* @throws IOException IO 异常
|
||||
*/
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
public int available() {
|
||||
return bais.available();
|
||||
}
|
||||
|
||||
|
||||
@ -30,10 +30,9 @@ public class XssFilter implements Filter {
|
||||
* 初始化过滤器并加载配置中的排除路径。
|
||||
*
|
||||
* @param filterConfig 过滤器配置
|
||||
* @throws ServletException 过滤器初始化异常
|
||||
*/
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
public void init(FilterConfig filterConfig) {
|
||||
if (properties.getExcludeUrls() != null) {
|
||||
excludes.addAll(properties.getExcludeUrls());
|
||||
}
|
||||
|
||||
@ -148,10 +148,9 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
||||
* 返回清洗后的 JSON 字节数。
|
||||
*
|
||||
* @return JSON 字节数
|
||||
* @throws IOException IO 异常
|
||||
*/
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
public int available() {
|
||||
return jsonBytes.length;
|
||||
}
|
||||
|
||||
@ -168,10 +167,9 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
||||
* 读取清洗后的 JSON 流下一个字节。
|
||||
*
|
||||
* @return 下一个字节
|
||||
* @throws IOException IO 异常
|
||||
*/
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
public int read() {
|
||||
return bis.read();
|
||||
}
|
||||
};
|
||||
|
||||
@ -146,10 +146,9 @@ public class PlusWebInvokeTimeInterceptor implements HandlerInterceptor {
|
||||
* @param response 当前响应
|
||||
* @param handler 目标处理器
|
||||
* @param ex 请求处理过程中的异常
|
||||
* @throws Exception 拦截器链路抛出的异常
|
||||
*/
|
||||
@Override
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
|
||||
StopWatch stopWatch = KEY_CACHE.get();
|
||||
if (ObjectUtil.isNotNull(stopWatch)) {
|
||||
stopWatch.stop();
|
||||
|
||||
@ -40,10 +40,9 @@ public class SecurityConfig {
|
||||
*
|
||||
* @param httpSecurity Spring Security 配置对象
|
||||
* @return 安全过滤链
|
||||
* @throws Exception 构建过滤链异常
|
||||
*/
|
||||
@Bean
|
||||
public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception {
|
||||
public SecurityFilterChain filterChain(HttpSecurity httpSecurity) {
|
||||
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
|
||||
successHandler.setTargetUrlParameter("redirectTo");
|
||||
successHandler.setDefaultTargetUrl(adminContextPath + "/");
|
||||
|
||||
@ -25,9 +25,7 @@ public class RedisPubSubController {
|
||||
*/
|
||||
@GetMapping("/pub")
|
||||
public R<Void> pub(String key, String value) {
|
||||
RedisUtils.publish(key, value, consumer -> {
|
||||
System.out.println("发布通道 => " + key + ", 发送值 => " + value);
|
||||
});
|
||||
RedisUtils.publish(key, value, consumer -> System.out.println("发布通道 => " + key + ", 发送值 => " + value));
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
@ -38,9 +36,7 @@ public class RedisPubSubController {
|
||||
*/
|
||||
@GetMapping("/sub")
|
||||
public R<Void> sub(String key) {
|
||||
RedisUtils.subscribe(key, String.class, msg -> {
|
||||
System.out.println("订阅通道 => " + key + ", 接收值 => " + msg);
|
||||
});
|
||||
RedisUtils.subscribe(key, String.class, msg -> System.out.println("订阅通道 => " + key + ", 接收值 => " + msg));
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
|
||||
@ -104,8 +104,7 @@ public class TestDemoController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("demo:demo:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TestDemoVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
public R<TestDemoVo> getInfo(@PathVariable @NotNull(message = "主键不能为空") Long id) {
|
||||
return R.ok(testDemoService.queryById(id));
|
||||
}
|
||||
|
||||
|
||||
@ -65,8 +65,7 @@ public class TestTreeController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("demo:tree:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TestTreeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
public R<TestTreeVo> getInfo(@PathVariable @NotNull(message = "主键不能为空") Long id) {
|
||||
return R.ok(testTreeService.queryById(id));
|
||||
}
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ public class GenController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("tool:gen:list")
|
||||
@GetMapping(value = "/column/{tableId}")
|
||||
public R<PageResult<GenTableColumn>> columnList(@PathVariable("tableId") Long tableId) {
|
||||
public R<PageResult<GenTableColumn>> columnList(@PathVariable Long tableId) {
|
||||
List<GenTableColumn> list = genTableService.selectGenTableColumnListByTableId(tableId);
|
||||
return R.ok(PageResult.build(list));
|
||||
}
|
||||
@ -153,7 +153,7 @@ public class GenController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("tool:gen:preview")
|
||||
@GetMapping("/preview/{tableId}")
|
||||
public R<Map<String, String>> preview(@PathVariable("tableId") Long tableId) throws IOException {
|
||||
public R<Map<String, String>> preview(@PathVariable Long tableId) {
|
||||
Map<String, String> dataMap = genTableService.previewCode(tableId);
|
||||
return R.ok(dataMap);
|
||||
}
|
||||
@ -167,7 +167,7 @@ public class GenController extends BaseController {
|
||||
@SaCheckPermission("tool:gen:code")
|
||||
@Log(title = "代码生成", businessType = BusinessType.GENCODE)
|
||||
@GetMapping("/download/{tableId}")
|
||||
public void download(HttpServletResponse response, @PathVariable("tableId") Long tableId) throws IOException {
|
||||
public void download(HttpServletResponse response, @PathVariable Long tableId) throws IOException {
|
||||
byte[] data = genTableService.downloadCode(tableId);
|
||||
genCode(response, data);
|
||||
}
|
||||
@ -182,7 +182,7 @@ public class GenController extends BaseController {
|
||||
@Log(title = "代码生成", businessType = BusinessType.UPDATE)
|
||||
@Lock4j(keys = {"#tableId"}, acquireTimeout = 5000)
|
||||
@GetMapping("/synchDb/{tableId}")
|
||||
public R<Void> synchDb(@PathVariable("tableId") Long tableId) {
|
||||
public R<Void> synchDb(@PathVariable Long tableId) {
|
||||
genTableService.synchDb(tableId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ -340,7 +340,7 @@ public class GenTableColumn extends BaseEntity {
|
||||
*/
|
||||
public String readConverterExp() {
|
||||
String remarks = StringUtils.substringBetween(this.columnComment, "(", ")");
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (StringUtils.isNotEmpty(remarks)) {
|
||||
for (String value : remarks.split(" ")) {
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
|
||||
@ -27,9 +27,8 @@ public class AlipayBillTask {
|
||||
*
|
||||
* @param jobArgs 任务执行参数
|
||||
* @return 执行结果
|
||||
* @throws InterruptedException 任务被中断时抛出
|
||||
*/
|
||||
public ExecuteResult jobExecute(JobArgs jobArgs) throws InterruptedException {
|
||||
public ExecuteResult jobExecute(JobArgs jobArgs) {
|
||||
// 设置清算日期
|
||||
String settlementDate = (String) jobArgs.getWfContext().get("settlementDate");
|
||||
if (StringUtils.equals(settlementDate, "sysdate")) {
|
||||
|
||||
@ -26,9 +26,8 @@ public class SummaryBillTask {
|
||||
*
|
||||
* @param jobArgs 任务执行参数
|
||||
* @return 汇总执行结果
|
||||
* @throws InterruptedException 任务被中断时抛出
|
||||
*/
|
||||
public ExecuteResult jobExecute(JobArgs jobArgs) throws InterruptedException {
|
||||
public ExecuteResult jobExecute(JobArgs jobArgs) {
|
||||
// 获得微信账单
|
||||
BigDecimal wechatAmount = BigDecimal.valueOf(0);
|
||||
String wechat = (String) jobArgs.getWfContext("wechat");
|
||||
|
||||
@ -27,9 +27,8 @@ public class WechatBillTask {
|
||||
*
|
||||
* @param jobArgs 任务执行参数
|
||||
* @return 执行结果
|
||||
* @throws InterruptedException 任务被中断时抛出
|
||||
*/
|
||||
public ExecuteResult jobExecute(JobArgs jobArgs) throws InterruptedException {
|
||||
public ExecuteResult jobExecute(JobArgs jobArgs) {
|
||||
// 从上下文中获得清算日期并设置,如果上下文中清算日期
|
||||
// 是sysdate设置为当前日期;否则取管理页面设置的值
|
||||
String settlementDate = (String) jobArgs.getWfContext().get("settlementDate");
|
||||
|
||||
@ -32,7 +32,7 @@ public class CacheController {
|
||||
*/
|
||||
@SaCheckPermission("monitor:cache:list")
|
||||
@GetMapping()
|
||||
public R<CacheListInfoVo> getInfo() throws Exception {
|
||||
public R<CacheListInfoVo> getInfo() {
|
||||
RedisConnection connection = connectionFactory.getConnection();
|
||||
try {
|
||||
Properties commandStats = connection.commands().info("commandstats");
|
||||
|
||||
@ -99,7 +99,7 @@ public class SysLoginInfoController extends BaseController {
|
||||
@Log(title = "账户解锁", businessType = BusinessType.OTHER)
|
||||
@RepeatSubmit()
|
||||
@GetMapping("/unlock/{userName}")
|
||||
public R<Void> unlock(@PathVariable("userName") String userName) {
|
||||
public R<Void> unlock(@PathVariable String userName) {
|
||||
String loginName = CacheNames.PWD_ERR_CNT_KEY + userName;
|
||||
if (RedisUtils.hasKey(loginName)) {
|
||||
RedisUtils.deleteObject(loginName);
|
||||
|
||||
@ -126,7 +126,7 @@ public class SysUserOnlineController extends BaseController {
|
||||
@Log(title = "在线设备", businessType = BusinessType.FORCE)
|
||||
@RepeatSubmit()
|
||||
@DeleteMapping("/myself/{tokenId}")
|
||||
public R<Void> remove(@PathVariable("tokenId") String tokenId) {
|
||||
public R<Void> remove(@PathVariable String tokenId) {
|
||||
try {
|
||||
// 获取指定账号 id 的 token 集合
|
||||
List<String> keys = StpUtil.getTokenValueListByLoginId(StpUtil.getLoginIdAsString());
|
||||
|
||||
@ -53,11 +53,16 @@ public class SysDeptController extends BaseController {
|
||||
* @return 过滤后的部门列表
|
||||
*/
|
||||
@SaCheckPermission("system:dept:list")
|
||||
@GetMapping("/list/exclude/{deptId}")
|
||||
public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
|
||||
@GetMapping(value = {"/list/exclude", "/list/exclude/{deptId}"})
|
||||
public R<List<SysDeptVo>> excludeChild(@PathVariable(required = false) Long deptId) {
|
||||
List<SysDeptVo> depts = deptService.selectDeptList(new SysDeptBo());
|
||||
depts.removeIf(d -> d.getDeptId().equals(deptId)
|
||||
|| StringUtils.splitList(d.getAncestors()).contains(Convert.toStr(deptId)));
|
||||
if (deptId == null) {
|
||||
return R.ok(depts);
|
||||
}
|
||||
String deptIdStr = Convert.toStr(deptId);
|
||||
// 过滤掉自身 + 所有子节点
|
||||
depts.removeIf(d -> deptId.equals(d.getDeptId())
|
||||
|| StringUtils.splitList(d.getAncestors()).contains(deptIdStr));
|
||||
return R.ok(depts);
|
||||
}
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ public class SysMenuController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("system:menu:query")
|
||||
@GetMapping(value = "/roleMenuTreeselect/{roleId}")
|
||||
public R<MenuTreeSelectVo> roleMenuTreeselect(@PathVariable("roleId") Long roleId) {
|
||||
public R<MenuTreeSelectVo> roleMenuTreeselect(@PathVariable Long roleId) {
|
||||
List<SysMenuVo> menus = menuService.selectMenuList(LoginHelper.getUserId());
|
||||
MenuTreeSelectVo selectVo = new MenuTreeSelectVo(
|
||||
menuService.selectMenuListByRoleId(roleId),
|
||||
@ -163,7 +163,7 @@ public class SysMenuController extends BaseController {
|
||||
@SaCheckPermission("system:menu:remove")
|
||||
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{menuId}")
|
||||
public R<Void> remove(@PathVariable("menuId") Long menuId) {
|
||||
public R<Void> remove(@PathVariable Long menuId) {
|
||||
if (menuService.hasChildByMenuId(menuId)) {
|
||||
return R.warn("存在子菜单,不允许删除");
|
||||
}
|
||||
@ -192,7 +192,7 @@ public class SysMenuController extends BaseController {
|
||||
@SaCheckPermission("system:menu:remove")
|
||||
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/cascade/{menuIds}")
|
||||
public R<Void> remove(@PathVariable("menuIds") Long[] menuIds) {
|
||||
public R<Void> remove(@PathVariable Long[] menuIds) {
|
||||
List<Long> menuIdList = List.of(menuIds);
|
||||
if (menuService.hasChildByMenuId(menuIdList)) {
|
||||
return R.warn("存在子菜单,不允许删除");
|
||||
|
||||
@ -20,7 +20,6 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@ -83,11 +82,10 @@ public class SysOssController extends BaseController {
|
||||
* 下载OSS对象
|
||||
*
|
||||
* @param ossId OSS对象ID
|
||||
* @throws IOException IO 异常
|
||||
*/
|
||||
@SaCheckPermission("system:oss:download")
|
||||
@GetMapping("/download/{ossId}")
|
||||
public ResponseEntity<byte[]> download(@PathVariable Long ossId) throws IOException {
|
||||
public ResponseEntity<byte[]> download(@PathVariable Long ossId) {
|
||||
return ossService.download(ossId);
|
||||
}
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ public class SysRoleController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("system:role:list")
|
||||
@GetMapping(value = "/deptTree/{roleId}")
|
||||
public R<DeptTreeSelectVo> roleDeptTreeselect(@PathVariable("roleId") Long roleId) {
|
||||
public R<DeptTreeSelectVo> roleDeptTreeselect(@PathVariable Long roleId) {
|
||||
DeptTreeSelectVo selectVo = new DeptTreeSelectVo(
|
||||
deptService.selectDeptListByRoleId(roleId),
|
||||
deptService.selectDeptTreeList(new SysDeptBo()));
|
||||
|
||||
@ -141,7 +141,7 @@ public class SysUserController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("system:user:query")
|
||||
@GetMapping(value = {"/", "/{userId}"})
|
||||
public R<SysUserInfoVo> getInfo(@PathVariable(value = "userId", required = false) Long userId) {
|
||||
public R<SysUserInfoVo> getInfo(@PathVariable(required = false) Long userId) {
|
||||
SysUserInfoVo userInfoVo = new SysUserInfoVo();
|
||||
if (ObjectUtil.isNotNull(userId)) {
|
||||
userService.checkUserDataScope(userId);
|
||||
|
||||
@ -25,7 +25,7 @@ public class SystemApplicationRunner implements ApplicationRunner {
|
||||
* @param args 启动参数
|
||||
*/
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
public void run(ApplicationArguments args) {
|
||||
ossConfigService.init();
|
||||
log.info("初始化OSS配置成功");
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ package org.dromara.workflow.service.impl;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.dromara.common.translation.annotation.TranslationType;
|
||||
import org.dromara.common.translation.core.TranslationInterface;
|
||||
import org.dromara.workflow.common.ConditionalOnEnable;
|
||||
|
||||
@ -116,49 +116,47 @@ public class FlwChartExtServiceImpl implements ChartExtService {
|
||||
}
|
||||
|
||||
defJson.setTopText("流程名称: " + defJson.getFlowName());
|
||||
defJson.getNodeList().forEach(nodeJson -> {
|
||||
nodeJson.setPromptContent(
|
||||
new PromptContent()
|
||||
// 提示信息
|
||||
.setInfo(
|
||||
CollUtil.newArrayList(
|
||||
new PromptContent.InfoItem()
|
||||
.setPrefix("任务名称: ")
|
||||
.setContent(nodeJson.getNodeName())
|
||||
.setContentStyle(Map.of(
|
||||
"border", "1px solid #d1e9ff",
|
||||
"backgroundColor", "#e8f4ff",
|
||||
"padding", "4px 8px",
|
||||
"borderRadius", "4px"
|
||||
))
|
||||
.setRowStyle(Map.of(
|
||||
"fontWeight", "bold",
|
||||
"margin", "0 0 6px 0",
|
||||
"padding", "0 0 8px 0",
|
||||
"borderBottom", "1px solid #ccc"
|
||||
))
|
||||
)
|
||||
defJson.getNodeList().forEach(nodeJson -> nodeJson.setPromptContent(
|
||||
new PromptContent()
|
||||
// 提示信息
|
||||
.setInfo(
|
||||
CollUtil.newArrayList(
|
||||
new PromptContent.InfoItem()
|
||||
.setPrefix("任务名称: ")
|
||||
.setContent(nodeJson.getNodeName())
|
||||
.setContentStyle(Map.of(
|
||||
"border", "1px solid #d1e9ff",
|
||||
"backgroundColor", "#e8f4ff",
|
||||
"padding", "4px 8px",
|
||||
"borderRadius", "4px"
|
||||
))
|
||||
.setRowStyle(Map.of(
|
||||
"fontWeight", "bold",
|
||||
"margin", "0 0 6px 0",
|
||||
"padding", "0 0 8px 0",
|
||||
"borderBottom", "1px solid #ccc"
|
||||
))
|
||||
)
|
||||
// 弹窗样式
|
||||
.setDialogStyle(MapUtil.mergeAll(
|
||||
"position", "absolute",
|
||||
"backgroundColor", "#fff",
|
||||
"border", "1px solid #ccc",
|
||||
"borderRadius", "4px",
|
||||
"boxShadow", "0 2px 8px rgba(0, 0, 0, 0.15)",
|
||||
"padding", "8px 12px",
|
||||
"fontSize", "14px",
|
||||
"zIndex", "1000",
|
||||
"maxWidth", "500px",
|
||||
"maxHeight", "300px",
|
||||
"overflowY", "auto",
|
||||
"overflowX", "hidden",
|
||||
"color", "#333",
|
||||
"pointerEvents", "auto",
|
||||
"scrollbarWidth", "thin"
|
||||
))
|
||||
);
|
||||
});
|
||||
)
|
||||
// 弹窗样式
|
||||
.setDialogStyle(MapUtil.mergeAll(
|
||||
"position", "absolute",
|
||||
"backgroundColor", "#fff",
|
||||
"border", "1px solid #ccc",
|
||||
"borderRadius", "4px",
|
||||
"boxShadow", "0 2px 8px rgba(0, 0, 0, 0.15)",
|
||||
"padding", "8px 12px",
|
||||
"fontSize", "14px",
|
||||
"zIndex", "1000",
|
||||
"maxWidth", "500px",
|
||||
"maxHeight", "300px",
|
||||
"overflowY", "auto",
|
||||
"overflowX", "hidden",
|
||||
"color", "#333",
|
||||
"pointerEvents", "auto",
|
||||
"scrollbarWidth", "thin"
|
||||
))
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -149,14 +149,12 @@ public class FlwCommonServiceImpl implements IFlwCommonService {
|
||||
}
|
||||
try {
|
||||
switch (messageTypeEnum) {
|
||||
case SYSTEM_MESSAGE -> {
|
||||
// 站内消息直接携带前端路由,消息盒子点击后可按路径分流。
|
||||
case SYSTEM_MESSAGE -> // 站内消息直接携带前端路由,消息盒子点击后可按路径分流。
|
||||
messageService.publishMessage(userIds, PushPayloadDTO.of(
|
||||
PushTypeEnum.MESSAGE,
|
||||
PushSourceEnum.WORKFLOW,
|
||||
message, null, path
|
||||
));
|
||||
}
|
||||
case EMAIL_MESSAGE -> MailBuilder.of().to(emails).subject(subject).text(message).send();
|
||||
case SMS_MESSAGE -> {
|
||||
// LinkedHashMap<String, String> map = new LinkedHashMap<>(1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user