diff --git a/snowy-plugin/snowy-plugin-dev/pom.xml b/snowy-plugin/snowy-plugin-dev/pom.xml
index f3d2f607c25ebabf7264a526f46708d5656eaa8b..fe44e4e9fde7e2e0694448e3be87cb64fd08cc09 100644
--- a/snowy-plugin/snowy-plugin-dev/pom.xml
+++ b/snowy-plugin/snowy-plugin-dev/pom.xml
@@ -43,5 +43,42 @@
org.dromara.sms4j
sms4j-javase-plugin
+
+
+
+ com.qcloud
+ cos_api
+
+
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+
+
+
+
+ io.minio
+ minio
+
+
+
+
+ com.aliyun
+ dysmsapi20170525
+
+
+
+
+ com.tencentcloudapi
+ tencentcloud-sdk-java-sms
+
+
+
+
+ org.bouncycastle
+ bcprov-jdk15on
+
+
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java
index 33df30b7bd4bd8713ae80117b2682eb29229757a..a46847455cd043c4af54293b6453065b4bd3c1a4 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java
@@ -22,6 +22,7 @@ import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.solon.service.impl.ServiceImpl;
@@ -47,9 +48,11 @@ import vip.xiaonuo.dev.modular.file.util.DevFileLocalUtil;
import vip.xiaonuo.dev.modular.file.util.DevFileMinIoUtil;
import vip.xiaonuo.dev.modular.file.util.DevFileTencentUtil;
+import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
+import java.net.URL;
import java.util.List;
/**
@@ -189,11 +192,13 @@ public class DevFileServiceImpl extends ServiceImpl impl
devFile.setSizeInfo(FileUtil.readableFileSize(file.getContentSize()));
devFile.setObjName(ObjectUtil.isNotEmpty(devFile.getSuffix()) ? fileId + StrUtil.DOT + devFile.getSuffix() : null);
// 如果是图片,则压缩生成缩略图
- if (ObjectUtil.isNotEmpty(suffix)) {
+ if (ObjectUtil.isNotEmpty(suffix) && StrUtil.isNotBlank(storageUrl)) {
if (isPic(suffix)) {
try {
- byte[] bytes = IoUtil.readBytes(file.getContent());
- devFile.setThumbnail(ImgUtil.toBase64DataUri(ImgUtil.scale(ImgUtil.toImage(bytes),
+ // byte[] bytes = IoUtil.readBytes(file.getContent());
+ //**暂时这样读取,最优解还是file.getContent可以服用,本地文件还好,OSS文件的话压力比较大
+ BufferedImage img = HttpUtil.isHttp(storageUrl) || HttpUtil.isHttps(storageUrl) ? ImgUtil.read(new URL(storageUrl)) : ImgUtil.read(storageUrl);
+ devFile.setThumbnail(ImgUtil.toBase64DataUri(ImgUtil.scale(img,
100, 100, null), suffix));
} catch (Exception ignored) {
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/log/util/DevLogUtil.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/log/util/DevLogUtil.java
index 1151bf17ff7798e8d4fdde90ebf6ba0cddc56179..b1c7906e1d5c9aa6197e1b5a4ad5c13bc6d1e4ca 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/log/util/DevLogUtil.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/log/util/DevLogUtil.java
@@ -46,7 +46,7 @@ public class DevLogUtil {
public static void executeOperationLog(CommonLog commonLog, String userName, Invocation inv, String resultJson) {
Context request = CommonServletUtil.getRequest();
DevLog devLog = genBasOpLog();
- String loginId = StpUtil.getLoginIdAsString();
+ String loginId = StpUtil.isLogin()? StpUtil.getLoginIdAsString():"";
if (ObjectUtil.isEmpty(loginId)) {
loginId = "-1";
}
diff --git a/snowy-web-app/src/main/resources/_sql/snowy_mysql.sql b/snowy-web-app/src/main/resources/_sql/snowy_mysql.sql
index 60b85ae8b6d9022b6e2fd8e4d7c618a4da98ad9c..0d2e71ee717985719def57dbc94a730c25f8bdcc 100644
--- a/snowy-web-app/src/main/resources/_sql/snowy_mysql.sql
+++ b/snowy-web-app/src/main/resources/_sql/snowy_mysql.sql
@@ -169,7 +169,7 @@ INSERT INTO `DEV_CONFIG` VALUES ('1554740179362967589', 'SNOWY_SMS_TENCENT_DEFAU
INSERT INTO `DEV_CONFIG` VALUES ('1554740179362967590', 'SNOWY_SMS_TENCENT_DEFAULT_SIGN_NAME', '腾讯云短信默认签名', 'SMS_TENCENT', '腾讯云短信默认签名', 45, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
INSERT INTO `DEV_CONFIG` VALUES ('1554740179362967591', 'SNOWY_SMS_ALIYUN_ACCESS_KEY_ID', '阿里云短信AccessKeyId', 'SMS_ALIYUN', '阿里云短信AccessKeyId', 46, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
INSERT INTO `DEV_CONFIG` VALUES ('1554740179362967592', 'SNOWY_SMS_ALIYUN_ACCESS_KEY_SECRET', '阿里云短信AccessKeySecret', 'SMS_ALIYUN', '阿里云短信AccessKeySecret', 47, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
-INSERT INTO `DEV_CONFIG` VALUES ('1554740179362967593', 'SNOWY_SMS_ALIYUN_END_POINT', '阿里云短信EndPoint', 'SMS_ALIYUN', '阿里云短信EndPoint', 48, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
+INSERT INTO `DEV_CONFIG` VALUES ('1554740179362967593', 'SNOWY_SMS_ALIYUN_END_POINT', 'dysmsapi.aliyuncs.com', 'SMS_ALIYUN', '阿里云短信EndPoint', 48, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
INSERT INTO `DEV_CONFIG` VALUES ('1554740179362967594', 'SNOWY_SMS_ALIYUN_DEFAULT_SIGN_NAME', '阿里云短信默认签名', 'SMS_ALIYUN', '阿里云短信默认签名', 49, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
INSERT INTO `DEV_CONFIG` VALUES ('1554740179362967595', 'SNOWY_SMS_XIAONUO_ACCESS_KEY_ID', '小诺短信账号Id', 'SMS_XIAONUO', '小诺短信账号Id', 50, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
INSERT INTO `DEV_CONFIG` VALUES ('1554740179362967596', 'SNOWY_SMS_XIAONUO_ACCESS_KEY_SECRET', '小诺短信账号Secret', 'SMS_XIAONUO', '小诺短信账号', 51, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
@@ -360,6 +360,10 @@ INSERT INTO `DEV_DICT` VALUES ('1811259821748785154', '0', '通知公告位置',
INSERT INTO `DEV_DICT` VALUES ('1811260041488371714', '1811259821748785154', '后台移动端首页', 'BACK_MOBILE', 'FRM', 136, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
INSERT INTO `DEV_DICT` VALUES ('1811260212410454018', '1811259821748785154', '后台业务首页', 'BACK_INDEX', 'FRM', 137, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
INSERT INTO `DEV_DICT` VALUES ('1811260660487950338', '1811259821748785154', '用户移动端首页', 'CLIENT_MOBILE', 'FRM', 138, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
+INSERT INTO `DEV_DICT` VALUES ('292417703091331072', '0', '消息推送引擎', 'PUSH_ENGINE', 'FRM', 11, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
+INSERT INTO `DEV_DICT` VALUES ('292418030402232320', '292417703091331072', '钉钉', 'DINGTALK', 'FRM', 12, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
+INSERT INTO `DEV_DICT` VALUES ('1811260660487950338', '292417703091331072', '飞书', 'FEISHU', 'FRM', 13, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
+INSERT INTO `DEV_DICT` VALUES ('1811260660487950338', '292417703091331072', '企业微信', 'WORKWECHAT', 'FRM', 15, NULL, 'NOT_DELETE', NULL, NULL, NULL, NULL);
-- ----------------------------
-- Table structure for DEV_EMAIL