浏览代码

Merge remote-tracking branch 'origin/master'

xiewenjie 3 年之前
父节点
当前提交
a402e21612
共有 25 个文件被更改,包括 777 次插入79 次删除
  1. 14 0
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ErrorCode.java
  2. 87 0
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ImageUtil.java
  3. 24 0
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/LogFormatConstant.java
  4. 22 7
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/LoginType.java
  5. 39 0
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ModelingBuildStatus.java
  6. 41 0
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/SceneDownloadProgressStatus.java
  7. 9 5
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ServerCode.java
  8. 11 0
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/UploadFilePath.java
  9. 9 0
      4dkankan-common-utils/src/main/java/com/fdkankan/common/exception/BusinessException.java
  10. 3 0
      4dkankan-common-utils/src/main/java/com/fdkankan/common/response/ResultData.java
  11. 25 0
      4dkankan-common-utils/src/main/java/com/fdkankan/common/util/ComputerUtil.java
  12. 55 5
      4dkankan-common-utils/src/main/java/com/fdkankan/common/util/CreateObjUtil.java
  13. 3 2
      4dkankan-common-utils/src/main/java/com/fdkankan/common/util/FileUtil.java
  14. 13 10
      4dkankan-common-utils/src/main/java/com/fdkankan/common/util/FileUtils.java
  15. 44 38
      4dkankan-common-utils/src/main/java/com/fdkankan/common/util/LogoConfig.java
  16. 6 6
      4dkankan-common-utils/src/main/java/com/fdkankan/common/util/MatrixToImageWriterUtil.java
  17. 9 1
      4dkankan-common-utils/src/main/java/com/fdkankan/common/util/StrExtUtil.java
  18. 9 0
      4dkankan-utils-email/README.md
  19. 48 0
      4dkankan-utils-email/pom.xml
  20. 258 0
      4dkankan-utils-email/src/main/java/com/fdkankan/email/MailService.java
  21. 23 2
      4dkankan-utils-fyun/src/main/java/com/fdkankan/fyun/oss/UploadToOssUtil.java
  22. 2 2
      4dkankan-utils-mq/src/main/java/com/fdkankan/mq/message/BuildSceneResultMqMessage.java
  23. 12 1
      4dkankan-utils-redis/src/main/java/com/fdkankan/redis/constant/RedisKey.java
  24. 10 0
      4dkankan-utils-redis/src/main/java/com/fdkankan/redis/constant/RedisLockKey.java
  25. 1 0
      pom.xml

+ 14 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ErrorCode.java

@@ -7,6 +7,9 @@ public enum ErrorCode {
     PARAM_REQUIRED(-3, "缺少必要参数"),
     PARAM_FORMAT_ERROR(-4, "解析请求参数出错"),
     SYSTEM_BUSY(-5, "系统繁忙,请稍后再试!"),
+
+    HAVE_NO_RIGHT(1001, "无权访问!"),
+
     AUTH_FAIL(4000, "鉴权失败!"),
     NON_TOKEN(4001, "无token,请重新登录"),
     TOKEN_ILLEGAL(4002, "token不合法"),
@@ -133,6 +136,11 @@ public enum ErrorCode {
     FAILURE_CODE_5054(5054, "该场景不存在无法扣除容量"),
     FAILURE_CODE_5055(5055, "该场景不属于八目相机无法扣除容量"),
     FAILURE_CODE_5056(5056, "双目相机异常"),
+    FAILURE_CODE_5057(5057, "该场景不属于八目相机,无法重置容量"),
+    FAILURE_CODE_5058(5054, "该场景不存在,无法重置容量"),
+    FAILURE_CODE_5059(5059, "该压缩包无可用obj或者mtl文件"),
+    FAILURE_CODE_5060(5060, "obj文件名应为mesh.obj"),
+    FAILURE_CODE_5061(5061, "该压缩包无可用jpg文件"),
 
 
     FAILURE_CODE_7001(7001, "激光场景状态同步失败,请重试!"),
@@ -146,6 +154,12 @@ public enum ErrorCode {
     FAILURE_CODE_7009(7009, "球幕视频文件不存在"),
     FAILURE_CODE_7010(7010, "相机或者相机详情不存在"),
     FAILURE_CODE_7011(7011, "公司信息不存在"),
+    FAILURE_CODE_7012(7012, "上传的文件名错误"),
+    FAILURE_CODE_7013(7013, "上传失败"),
+    FAILURE_CODE_7014(7014, "压缩包中文件不能为空"),
+    FAILURE_CODE_7015(7015, "仅支持.zip文件上传"),
+    FAILURE_CODE_7016(7016, "仅支持.mp4格式文件"),
+
 
 
 

+ 87 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ImageUtil.java

@@ -0,0 +1,87 @@
+package com.fdkankan.common.constant;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+/**
+ * <p>
+ * TODO
+ * </p>
+ *
+ * @author dengsixing
+ * @since 2022/4/8
+ **/
+public class ImageUtil {
+
+    public static final String TYPE_JPG = "jpg";
+    public static final String TYPE_GIF = "gif";
+    public static final String TYPE_PNG = "png";
+    public static final String TYPE_BMP = "bmp";
+    public static final String TYPE_UNKNOWN = "unknown";
+
+    public static boolean isImage(FileInputStream fis){
+        String picType = getPicType(fis);
+        if(TYPE_JPG.equals(picType)
+            || TYPE_GIF.equals(picType)
+            || TYPE_PNG.equals(picType)
+            || TYPE_BMP.equals(picType)){
+            return true;
+        }
+        return false;
+    }
+
+    public static String getPicType(FileInputStream fis) {
+        // 读取文件的前几个字节来判断图片格式
+        byte[] b = new byte[4];
+        try {
+            fis.read(b, 0, b.length);
+            String type = bytesToHexString(b).toUpperCase();
+            if (type.contains("FFD8FF")) {
+                return TYPE_JPG;
+            } else if (type.contains("89504E47")) {
+                return TYPE_PNG;
+            } else if (type.contains("47494638")) {
+                return TYPE_GIF;
+            } else if (type.contains("424D")) {
+                return TYPE_BMP;
+            } else {
+                return TYPE_UNKNOWN;
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            if (fis != null) {
+                try {
+                    fis.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return null;
+    }
+
+    public static String bytesToHexString(byte[] src) {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (src == null || src.length <= 0) {
+            return null;
+        }
+        for (int i = 0; i < src.length; i++) {
+            int v = src[i] & 0xFF;
+            String hv = Integer.toHexString(v);
+            if (hv.length() < 2) {
+                stringBuilder.append(0);
+            }
+            stringBuilder.append(hv);
+        }
+        return stringBuilder.toString();
+    }
+
+    public static void main(String[] args) throws Exception{
+        FileInputStream fis = new FileInputStream(new File("F:\\test\\1.png"));
+        boolean image = ImageUtil.isImage(fis);
+        System.out.println(image);
+    }
+
+}

+ 24 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/LogFormatConstant.java

@@ -0,0 +1,24 @@
+package com.fdkankan.common.constant;
+
+/**
+ * <p>
+ * 日志格式定义
+ * </p>
+ *
+ * @author dengsixing
+ * @since 2022/3/26
+ **/
+public class LogFormatConstant {
+
+    /**
+     * feign接口日志格式
+     */
+    public static String FEIGN_LOG_START =  "Feign调用开始 - Class[{}] - Method[{}] - Params[{}]";
+
+    public static String FEIGN_LOG_END=  "Feign调用结束 - Class[{}] - Method[{}] - Result[{}]";
+
+    public static String REQUEST_LOG_START = "Controller请求开始 - ip[{}] - url[{}] - Class[{}] - Method[{}] - Params[{}] - header[{}]";
+
+    public static String REQUEST_LOG_END = "Controller请求结束 - url[{}] - Class[{}] - Method[{}] - Result[{}] - consumeTime[{}]";
+
+}

+ 22 - 7
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/LoginType.java

@@ -2,17 +2,32 @@ package com.fdkankan.common.constant;
 
 public enum LoginType {
 
-    USER("User"),  MANAGER("Manager"), AGENT("Agent"), APP("App");
+    USER("User"),
+    MANAGER("Manager"),
+    AGENT("Agent"),
+    APP("App");
 
-    private String type;
+    private String code;
 
-    private LoginType(String type) {
-        this.type = type;
+    private LoginType(String code) {
+        this.code = code;
     }
 
-    @Override
-    public String toString() {
-        return this.type.toString();
+    public String code() {
+        return code;
     }
 
+    public static LoginType get(String code){
+        LoginType[] values = LoginType.values();
+        String enumValue = null;
+        for(LoginType eachValue : values){
+            enumValue = eachValue.code();
+            if(enumValue.equals(code)){
+                return eachValue;
+            }
+        }
+        return null;
+    }
+
+
 }

+ 39 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ModelingBuildStatus.java

@@ -0,0 +1,39 @@
+package com.fdkankan.common.constant;
+
+public enum ModelingBuildStatus {
+    OTHER(-10,"其他原因失败"),
+    REPEAT(-3,"重复计算"),
+    FAILED(-2,"计算失败"),
+    OVERTIME(-1,"计算超时"),
+    CALCULATING(0,"计算中"),
+    SUCCESS(1,"计算成功");
+
+    private Integer code;
+    private String message;
+
+    ModelingBuildStatus(Integer code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+
+    public Integer code() {
+        return code;
+    }
+
+    public String message() {
+        return message;
+    }
+
+    public static ModelingBuildStatus get(Integer code){
+        ModelingBuildStatus[] values = ModelingBuildStatus.values();
+        Integer enumValue = null;
+        for(ModelingBuildStatus eachValue : values){
+            enumValue = eachValue.code();
+            if(enumValue.equals(code)){
+                return eachValue;
+            }
+        }
+        return null;
+    }
+
+}

+ 41 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/SceneDownloadProgressStatus.java

@@ -0,0 +1,41 @@
+package com.fdkankan.common.constant;
+
+/**
+ * 场景下载进度码
+ */
+public enum SceneDownloadProgressStatus {
+
+    DOWNLOADING(1000, "文件正在下载"),
+    DOWNLOAD_COMPRESSING(1001, "文件正在压缩"),
+    DOWNLOAD_SUCCESS(1002, "文件压缩成功/下载处理成功"),
+    DOWNLOAD_FAILED(1003, "下载处理失败");
+
+    private Integer code;
+    private String message;
+
+    private SceneDownloadProgressStatus(Integer code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+
+    public Integer code() {
+        return code;
+    }
+
+    public String message() {
+        return message;
+    }
+
+    public static SceneDownloadProgressStatus get(Integer code){
+        SceneDownloadProgressStatus[] values = SceneDownloadProgressStatus.values();
+        Integer enumValue = null;
+        for(SceneDownloadProgressStatus eachValue : values){
+            enumValue = eachValue.code();
+            if(enumValue.equals(code)){
+                return eachValue;
+            }
+        }
+        return null;
+    }
+
+}

+ 9 - 5
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ServerCode.java

@@ -5,8 +5,9 @@ public enum ServerCode {
 	SUCCESS(0, "操作成功"),
 	SYSTEM_ERROR(-1, "服务器异常"),
 	PARAM_ERROR(-2, "解析请求参数出错"),
-	PARAM_REQUIRED(-3, "缺少必要参数"),
+	PARAM_REQUIRED(-3, "缺少必要参数:%s"),
 	FEIGN_REQUEST_FAILD(-4, "跨服务请求失败"),
+	SERVER_CLOSING(-5, "服务正在关闭!"),
 
 	AUTH_FAIL(3000, "鉴权失败!"),
 	NON_TOKEN(3001, "无token,请重新登录"),
@@ -14,9 +15,8 @@ public enum ServerCode {
 	TOKEN_NOT_FOUND(3003, "用户未登录"),
 
 
-	APP_ID_ILLEGAL(3100 , "非法的APP ID")
-	;
-	
+	APP_ID_ILLEGAL(3100, "非法的APP ID");
+
 	private Integer code;
 	private String message;
 
@@ -32,4 +32,8 @@ public enum ServerCode {
 	public String message() {
 		return message;
 	}
-}
+
+	public String formatMessage(Object... args) {
+		return String.format(message, args);
+	}
+}

+ 11 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/UploadFilePath.java

@@ -32,11 +32,22 @@ public class UploadFilePath {
     public static final String VIDEOS_EDIT_PATH =  "scene_edit_data/%s/videos/";
     public static final String VIDEOS_VIEW_PATH =  "scene_view_data/%s/videos/";
 
+    /**
+     * 场景音频
+     */
+    public static final String VOICE_EDIT_PATH =  "scene_edit_data/%s/voice/";
+    public static final String VOICE_VIEW_PATH =  "scene_view_data/%s/voice/";
+
     public static final String SCENE_NUM_PATH = "scene/%s";
     public static final String IMG_CACHES_PATH =  "scene/%s/caches/images/";
     public static final String VIDEOS_CACHES_PATH =  "scene/%s/caches/videos/";
 
     public static final String DOWNLOADS_QRCODE = "downloads/scene/%s/QRcode/";
 
+    /**
+     * 场景计算日志文件地址
+     */
+    public static final String BUILD_LOG_PATH = "build_log/%s/";
+
 
 }

+ 9 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/exception/BusinessException.java

@@ -2,6 +2,7 @@ package com.fdkankan.common.exception;
 
 import com.fdkankan.common.constant.CameraConstant;
 import com.fdkankan.common.constant.ErrorCode;
+import com.fdkankan.common.constant.ServerCode;
 import lombok.Data;
 
 /**
@@ -16,6 +17,10 @@ public class BusinessException extends RuntimeException {
         this.code = errorCode.code();
         this.message = errorCode.message();
     }
+    public BusinessException(ServerCode serverCode){
+        this.code = serverCode.code();
+        this.message = serverCode.message();
+    }
     public BusinessException(CameraConstant errorCode){
         this.code = errorCode.code();
         this.message = errorCode.message();
@@ -24,4 +29,8 @@ public class BusinessException extends RuntimeException {
         this.code = code;
         this.message = msg;
     }
+    public BusinessException(ServerCode serverCode, Object...args){
+        this.code = serverCode.code();
+        this.message = serverCode.formatMessage(args);
+    }
 }

+ 3 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/response/ResultData.java

@@ -53,6 +53,9 @@ public class ResultData<T> implements Serializable {
     public static ResultData error(int code, String msg, Object data) {
         return base(code, msg, data,false);
     }
+    public static ResultData error(ErrorCode errorCode, Object data) {
+        return base(errorCode.code(), errorCode.message(), data,false);
+    }
 
     public static ResultData error(ErrorCode errorCode) {
         return error(errorCode.code(), errorCode.message());

+ 25 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/util/ComputerUtil.java

@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.constant.ConstantFileName;
 import com.fdkankan.common.constant.ConstantFilePath;
+import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.UploadFilePath;
+import com.fdkankan.common.exception.BusinessException;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
@@ -604,4 +606,27 @@ public class ComputerUtil {
         log.info("pro大场景添加到队列:"+parametr);
         return parametr;
     }
+
+    /**
+     * 循环检测算法是否计算成功
+     * @param uploadJsonPath uploadjson路径
+     * @param maxCheckTimes 循环次数
+     * @param waitTime 每次检测间隔时间,毫秒
+     * @return boolean
+     * @throws Exception
+     */
+    public static boolean checkComputeCompleted(String uploadJsonPath, int maxCheckTimes, long waitTime) throws Exception{
+        int checkTimes = 1;
+        boolean exist = false;
+        do {
+            if(new File(uploadJsonPath).exists()){
+                exist = true;
+                break;
+            }
+            Thread.sleep(waitTime);
+            ++checkTimes;
+        }while (checkTimes <= maxCheckTimes);
+
+        return exist;
+    }
 }

+ 55 - 5
4dkankan-common-utils/src/main/java/com/fdkankan/common/util/CreateObjUtil.java

@@ -1,5 +1,6 @@
 package com.fdkankan.common.util;
 
+import cn.hutool.core.exceptions.ExceptionUtil;
 import com.fdkankan.common.constant.ConstantFileName;
 import com.fdkankan.common.constant.ConstantFilePath;
 import com.fdkankan.common.proto.BigSceneProto;
@@ -7,6 +8,16 @@ import com.fdkankan.common.proto.Common;
 import com.fdkankan.common.proto.Visionmodeldata;
 import com.fdkankan.common.proto.format.JsonFormat;
 import com.google.protobuf.TextFormat;
+import java.util.Arrays;
+import java.util.Base64;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import lombok.extern.slf4j.Slf4j;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.util.StopWatch;
@@ -15,9 +26,10 @@ import java.io.*;
 import java.util.HashMap;
 import java.util.Map;
 
+@Slf4j
 public class CreateObjUtil {
 
-	private static Logger log = LoggerFactory.getLogger(CreateObjUtil.class);
+//	private static Logger log = LoggerFactory.getLogger(CreateObjUtil.class);
 
 	public void saveuploadImgs(String folderName) throws IOException, Exception
 	{
@@ -289,8 +301,7 @@ public class CreateObjUtil {
 	
 	public static void convertTxtToVisionmodeldata(String srcpath,String despath)throws Exception
 	{
-		try
-		{
+		try{
 			Visionmodeldata.NavigationInfo.Builder builder = Visionmodeldata.NavigationInfo.newBuilder();
 			String jsonFormat = readTxtFileToJson(srcpath);
 			JsonFormat.merge(jsonFormat, builder);
@@ -310,8 +321,8 @@ public class CreateObjUtil {
 		catch(Exception e)
 		{
 			StringWriter trace=new StringWriter();
-	        e.printStackTrace(new PrintWriter(trace));
-	        log.error(trace.toString());
+			e.printStackTrace(new PrintWriter(trace));
+			log.error(trace.toString());
 		}
 	}
 
@@ -602,6 +613,45 @@ public class CreateObjUtil {
 
 	public static void main(String[] args) throws Exception{
 		CreateObjUtil.convertTxtToVisionmodeldata("F:\\visiontest\\vision.txt", "F:\\visiontest\\vision.modeldata");
+//		CreateObjUtil.convertTxtToDam("F:\\visiontest\\modeldata.txt", "F:\\visiontest\\dacf7dfa24ae47fab8fcebfe4dc41ab9_50k.dam");
+
+//		String text = "web:web";
+//		byte[] data = text.getBytes("UTF-8");
+//		String s = Base64.getEncoder().encodeToString(data);
+//		System.out.println(s);
+
+//		org.apache.commons.lang3.time.StopWatch stopWatch = new org.apache.commons.lang3.time.StopWatch();
+//		stopWatch.start();
+//		Thread.sleep(2000);
+//		stopWatch.stop();
+//		System.out.println(stopWatch.getTime(TimeUnit.SECONDS));
+//		ExecutorService executorService = Executors.newFixedThreadPool(1);
+//		Future<String> future = executorService.submit(()->{
+//			return CreateObjUtil.test();
+//		});
+//
+//		try {
+//			String s = future.get();
+//		}catch (Exception e){
+//
+//			System.out.println(ExceptionUtil.stacktraceToString(e));
+//		}
+
+
+
+	}
+
+	private static String test() throws Exception{
+		try {
+			String test = null;
+			test.equals("123");
+		}catch (Exception e){
+			throw e;
+		}finally {
+
+		}
+		return "123";
+
 	}
 
 }

+ 3 - 2
4dkankan-common-utils/src/main/java/com/fdkankan/common/util/FileUtil.java

@@ -7,6 +7,7 @@ import java.nio.ByteBuffer;
 import java.nio.MappedByteBuffer;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileChannel.MapMode;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.List;
@@ -295,7 +296,7 @@ public class FileUtil {
 		}
 		try(
 			//创建压缩文件对象
-			ZipFile zipFile = new ZipFile(srcFile)
+			ZipFile zipFile = new ZipFile(srcFile, Charset.forName("GBK"))
 		){
 			//开始解压
 			Enumeration<?> entries = zipFile.entries();
@@ -408,7 +409,7 @@ public class FileUtil {
 	public static void main(String[] args) throws Exception {
 
 
-		FileUtil.zip("F:\\test","F:\\test.zip", false);
+		FileUtil.unZip("F:\\test\\KJ-t-VJNe28ZImv_images_展厅全景图.zip", "F:\\test\\aaa");
 
 
 	}

+ 13 - 10
4dkankan-common-utils/src/main/java/com/fdkankan/common/util/FileUtils.java

@@ -3,6 +3,7 @@ package com.fdkankan.common.util;
 import com.alibaba.fastjson.JSONObject;
 import it.sauronsoftware.jave.*;
 import java.net.MalformedURLException;
+import java.nio.charset.Charset;
 import java.util.stream.Collectors;
 import org.apache.tools.zip.ZipEntry;
 import org.apache.tools.zip.ZipFile;
@@ -662,7 +663,7 @@ public class FileUtils {
 
         }
 
-        ZipFile zf = new ZipFile(file);
+        ZipFile zf = new ZipFile(file, "GBK");
 
         Enumeration entries = zf.getEntries();
 
@@ -1028,8 +1029,8 @@ public class FileUtils {
         }
     }
 
-    public static void main(String[] args) {
-        try{
+    public static void main(String[] args) throws Exception {
+//        try{
 //            String path = "H:\\test";
 //            InputStream is = null;
 //            String url = "https://file.api.weixin.qq.com/cgi-bin/media/get?access_token=41_veJ0V1PKdwBerxV6qcgty6opVroUYq5xgGG2uaK2f3PNBZNYttxNkTAHWyMt3AYb7iNn7cvpm87sXQhxBlhd6dBekczYR8-j49Hv85HMIV6HVsaMhjYE0QKtJ1C-HFfmsICMaSuvOBczkro5GDEeACAZWX&media_id=mXE_24SEX4-xfg0vB36KnfnkAHaFla5Fz4app1rgFiZDUtUJv04cQgJTOXHN32mm";
@@ -1079,15 +1080,17 @@ public class FileUtils {
 //            FileOutputStream out = new FileOutputStream(new File("F:\\texture1.jpg"));
 //            out.write(bytesFromUrl);
 
-            List<String> test = null;
-            List<String> collect = test.stream().map(t -> {
-                return t;
-            }).collect(Collectors.toList());
+//            List<String> test = null;
+//            List<String> collect = test.stream().map(t -> {
+//                return t;
+//            }).collect(Collectors.toList());
 
 
-        }catch (Exception e){
-            e.printStackTrace();
-        }
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }
+        FileUtils.decompress("F:\\test\\KJ-t-VJNe28ZImv_images_展厅全景图.zip", "F:\\test\\aaa");
+
     }
 
     public static List<String> list(File file) throws Exception{

+ 44 - 38
4dkankan-common-utils/src/main/java/com/fdkankan/common/util/LogoConfig.java

@@ -1,6 +1,7 @@
 package com.fdkankan.common.util;
 
 import cn.hutool.core.util.StrUtil;
+import java.io.InputStream;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.core.io.ClassPathResource;
 
@@ -10,6 +11,9 @@ import java.awt.geom.RoundRectangle2D;
 import java.awt.image.BufferedImage;
 import java.io.File;
 import java.io.IOException;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.core.io.support.ResourcePatternResolver;
 
 @Slf4j
 public class LogoConfig {
@@ -20,49 +24,51 @@ public class LogoConfig {
      * @throws IOException 
      * @author Administrator sangwenhao 
      */  
-     public BufferedImage LogoMatrix(BufferedImage matrixImage, String logoPath) throws IOException{
+     public BufferedImage LogoMatrix(BufferedImage matrixImage, boolean logo, String logoPath) throws IOException{
          /** 
           * 读取二维码图片,并构建绘图对象 
           */  
-         Graphics2D g2 = matrixImage.createGraphics();  
-           
-         int matrixWidth = matrixImage.getWidth();  
-         int matrixHeigh = matrixImage.getHeight();
-         /**
-          * 读取Logo图片
-          */
-         ClassPathResource classPathResource = null;
-         if(logoPath == null){
-//             logoPath = this.getClass().getResource("/static/img/logo.png").getPath();
-             classPathResource = new ClassPathResource("static/img/logo.jpg");
-//             logoPath  =classPathResource.getURL().getPath();
-         }
-         BufferedImage logo = null;
-         try {
-             if(StrUtil.isNotEmpty(logoPath)){
-                 logo = ImageIO.read(new File(logoPath));
-             }else{
-                 logo = ImageIO.read(classPathResource.getFile());
+         Graphics2D g2 = matrixImage.createGraphics();
+
+         if(logo){
+             int matrixWidth = matrixImage.getWidth();
+             int matrixHeigh = matrixImage.getHeight();
+             File file = null;
+             BufferedImage logoBuffer = null;
+             try {
+                 /**
+                  * 读取Logo图片
+                  */
+                     if(StrUtil.isEmpty(logoPath)){
+                         ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
+                         Resource[] resources = resolver.getResources("static/img/logo.jpg");
+                         Resource resource = resources[0];
+                         //获得文件流,因为在jar文件中,不能直接通过文件资源路径拿到文件,但是可以在jar包中拿到文件流
+                         InputStream inputStream = resource.getInputStream();
+                         logoBuffer = ImageIO.read(inputStream);
+                     }else {
+                         file = new File(logoPath);
+                         logoBuffer = ImageIO.read(file);
+                     }
+             }catch (IOException e){
+                log.info("读取图片流失败,path="+ logoPath, e);
              }
-         }catch (IOException e){
-            log.info("读取图片流失败,path="+ logoPath, e);
-         }
 
-         //开始绘制图片  
-         g2.drawImage(logo,matrixWidth/5*2,matrixHeigh/5*2, matrixWidth/5, matrixHeigh/5, null);//绘制       
-         BasicStroke stroke = new BasicStroke(5,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND);   
-         g2.setStroke(stroke);// 设置笔画对象  
-         //指定弧度的圆角矩形  
-         RoundRectangle2D.Float round = new RoundRectangle2D.Float(matrixWidth/5*2, matrixHeigh/5*2, matrixWidth/5, matrixHeigh/5,20,20);  
-         g2.setColor(Color.white);  
-         g2.draw(round);// 绘制圆弧矩形  
-           
-         //设置logo 有一道灰色边框  
-         BasicStroke stroke2 = new BasicStroke(1,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND);   
-         g2.setStroke(stroke2);// 设置笔画对象  
-         RoundRectangle2D.Float round2 = new RoundRectangle2D.Float(matrixWidth/5*2+2, matrixHeigh/5*2+2, matrixWidth/5-4, matrixHeigh/5-4,20,20);  
-         g2.setColor(new Color(128,128,128));  
-         g2.draw(round2);// 绘制圆弧矩形  
+             //开始绘制图片
+             g2.drawImage(logoBuffer,matrixWidth/5*2,matrixHeigh/5*2, matrixWidth/5, matrixHeigh/5, null);//绘制
+             BasicStroke stroke = new BasicStroke(5,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND);
+             g2.setStroke(stroke);// 设置笔画对象  44
+             //指定弧度的圆角矩形
+             RoundRectangle2D.Float round = new RoundRectangle2D.Float(matrixWidth/5*2, matrixHeigh/5*2, matrixWidth/5, matrixHeigh/5,20,20);
+             g2.setColor(Color.white);
+             g2.draw(round);// 绘制圆弧矩形
+             //设置logo 有一道灰色边框
+             BasicStroke stroke2 = new BasicStroke(1,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND);
+             g2.setStroke(stroke2);// 设置笔画对象
+             RoundRectangle2D.Float round2 = new RoundRectangle2D.Float(matrixWidth/5*2+2, matrixHeigh/5*2+2, matrixWidth/5-4, matrixHeigh/5-4,20,20);
+             g2.setColor(new Color(128,128,128));
+             g2.draw(round2);// 绘制圆弧矩形
+         }
            
          g2.dispose();  
          matrixImage.flush() ;  

+ 6 - 6
4dkankan-common-utils/src/main/java/com/fdkankan/common/util/MatrixToImageWriterUtil.java

@@ -35,11 +35,11 @@ public class MatrixToImageWriterUtil {
         return image;
     }
 
-    public static boolean writeToFile(BitMatrix matrix, String format, File file, String logoPath) throws IOException {
+    public static boolean writeToFile(BitMatrix matrix, String format, File file, boolean logo, String logoPath) throws IOException {
         BufferedImage image = toBufferedImage(matrix);
         //设置logo图标  
         LogoConfig logoConfig = new LogoConfig();
-        image = logoConfig.LogoMatrix(image, logoPath);
+        image = logoConfig.LogoMatrix(image, logo, logoPath);
 
         File parFile = new File(file.getParent() + File.separator);
         if (!parFile.exists()){
@@ -60,7 +60,7 @@ public class MatrixToImageWriterUtil {
         BufferedImage image = toBufferedImage(matrix);
         //设置logo图标  
         LogoConfig logoConfig = new LogoConfig();
-        image = logoConfig.LogoMatrix(image, null);
+        image = logoConfig.LogoMatrix(image, true,null);
 
         if (!ImageIO.write(image, format, stream)) {
             throw new IOException("Could not write an image of format " + format);
@@ -68,7 +68,7 @@ public class MatrixToImageWriterUtil {
     }
 
     //url
-    public static boolean createQRCode(String url, String outPath, String logoPath) throws Exception {
+    public static boolean createQRCode(String url, String outPath, boolean logo, String logoPath) throws Exception {
         // 生成二维码
 
         int width = 3000; // 二维码图片宽度 300
@@ -97,11 +97,11 @@ public class MatrixToImageWriterUtil {
         //File outputFile = new File("d:" + File.separator + "new-1.gif");//指定输出路径
         File outputFile = new File(outPath);//指定输出路径
         FileUtils.deleteFile(outPath);
-        return writeToFile(bitMatrix, format, outputFile, logoPath);
+        return writeToFile(bitMatrix, format, outputFile, logo, logoPath);
     }
 
     public static void main(String[] args) throws Exception{
-        MatrixToImageWriterUtil.createQRCode("https://www.4dkankan.com/spc.html?m=t-pnj0IJX", "F:/桌面/t-pnj0IJX.png", "G:\\javaProject\\4dkankan_v2-mini\\4dkankan-application\\target\\4dkankan_v2_mini\\WEB-INF\\classes\\static\\img\\logo.png");
+        MatrixToImageWriterUtil.createQRCode("https://www.4dkankan.com/spc.html?m=t-pnj0IJX", "F:\\test\\4Dkankan_share.png", true, "F:\\test\\8.jpg");
 //        MatrixToImageWriterUtil.createQRCode("https://www.4dkankan.com/spc.html?m=t-pnj0IJX&lang=en", "F:/桌面/t-pnj0IJX_en.png", null);
     }
 }

+ 9 - 1
4dkankan-common-utils/src/main/java/com/fdkankan/common/util/StrExtUtil.java

@@ -44,7 +44,15 @@ public class StrExtUtil extends StrUtil {
     }
 
     public static void main(String[] args) {
-        StrExtUtil.test();
+
+        String test = null;
+//        System.out.println(test.lastIndexOf("."));
+//        System.out.println(test.substring(test.lastIndexOf(".")));
+
+        System.out.println("123".equals(test));;
+
+
+
     }
 
 }

+ 9 - 0
4dkankan-utils-email/README.md

@@ -0,0 +1,9 @@
+### 注意
+发送html文件使用spring Thymeleaf 模板引擎
+### 配置例:
+spring.mail.host=smtp.exmail.qq.com
+spring.mail.port=465
+spring.mail.username=4Dkankan@4dage.com
+spring.mail.password=
+spring.mail.properties.mail.socketFactory.port=465
+spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory

+ 48 - 0
4dkankan-utils-email/pom.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>4dkankan-utils</artifactId>
+        <groupId>com.fdkankan</groupId>
+        <version>2.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <artifactId>4dkankan-utils-email</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-mail</artifactId>
+            <version>2.0.6.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-thymeleaf</artifactId>
+            <version>2.0.6.RELEASE</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 258 - 0
4dkankan-utils-email/src/main/java/com/fdkankan/email/MailService.java

@@ -0,0 +1,258 @@
+package com.fdkankan.email;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.mail.SimpleMailMessage;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.mail.javamail.MimeMessageHelper;
+import org.springframework.stereotype.Component;
+import org.thymeleaf.TemplateEngine;
+import org.thymeleaf.context.Context;
+
+import javax.mail.internet.MimeMessage;
+import java.io.File;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+import java.util.Map;
+
+@Component
+public class MailService {
+
+    // 邮箱
+    @Value("${spring.mail.username}")
+    private String username;
+
+    @Autowired
+    private JavaMailSender javaMailSender;
+
+    @Autowired
+    private TemplateEngine templateEngine;
+
+    /**
+     * 简单邮件
+     * * @param to 接收人
+     * * @param subject 主题
+     * * @param content 内容
+     * * @return
+     */
+    public String sendSimpleEmail(String to, String subject, String content) {
+        try {
+            SimpleMailMessage message = new SimpleMailMessage();
+            message.setFrom(username);
+            message.setTo(to);
+            // 接收地址
+            message.setSubject(subject);
+            // 标题
+            message.setText(content);
+            // 内容
+            javaMailSender.send(message);
+            return "发送成功";
+        } catch (Exception e) {
+            e.printStackTrace();
+            return e.getMessage();
+        }
+    }
+
+    /**
+     * html 邮件
+     * * @param to 接收人
+     * * @param subject 主题
+     * * @param html 内容
+     */
+    public String sendHtmlMail(String to, String subject, String html) {
+        try {
+            MimeMessage mimeMessage = javaMailSender.createMimeMessage();
+            // 设置utf-8编码,否则邮件会有乱码
+            MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true, "UTF-8");
+            messageHelper.setFrom(username);
+            messageHelper.setTo(to);
+            messageHelper.setSubject(subject);
+            messageHelper.setText(html, true);
+            javaMailSender.send(mimeMessage);
+            return "发送成功";
+        } catch (Exception e) {
+            e.printStackTrace();
+            return e.getMessage();
+        }
+    }
+
+    /**
+     * 带附件 邮件
+     * * @param to 接收人
+     * * @param subject 主题
+     * * @param content 内容
+     * * @param isHtml 是否是html 邮件 false:普通邮件,true:html邮件
+     * * @param fileName 文件名称
+     * * @param filePath 文件路径
+     * * @return
+     */
+    public String sendFileMail(String to, String subject, String content, boolean isHtml, String fileName, String filePath) {
+        try {
+            MimeMessage mimeMessage = javaMailSender.createMimeMessage();
+            // 设置utf-8编码,否则邮件会有乱码
+            MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true, "UTF-8");
+            messageHelper.setFrom(username);
+            messageHelper.setTo(to);
+            messageHelper.setSubject(subject);
+            messageHelper.setText(content, isHtml);
+            // 设置附件
+            FileSystemResource file = new FileSystemResource(new File(filePath));
+            if (StringUtils.isBlank(fileName)) { // 文件名为空时,取文件本身名称
+                fileName = file.getFilename();
+            }
+            messageHelper.addAttachment(fileName, file);
+            javaMailSender.send(mimeMessage);
+            return "发送成功";
+        } catch (Exception e) {
+            e.printStackTrace();
+            return e.getMessage();
+        }
+    }
+
+    /**
+     * 多附件 邮件
+     * * @param to 接收人
+     * * @param subject 主题
+     * * @param content 内容
+     * * @param isHtml 是否是html 邮件 false:普通邮件,true:html邮件
+     * * @param list 附件集合 filepath:附件路径,fileName:附件名
+     * * @return
+     */
+    public String sendFilesMail(String to, String subject, String content, boolean isHtml, List<Map<String, String>> list) {
+        try {
+            MimeMessage mimeMessage = javaMailSender.createMimeMessage();
+            // 设置utf-8编码,否则邮件会有乱码
+            MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true, "UTF-8");
+            messageHelper.setFrom(username);
+            messageHelper.setTo(to);
+            messageHelper.setSubject(subject);
+            messageHelper.setText(content, isHtml);
+            // 设置附件
+            for (Map<String, String> map : list) {
+                FileSystemResource file = new FileSystemResource(new File(map.get("filepath")));
+                String fileName = map.get("fileName");
+                if (StringUtils.isBlank(fileName)) {
+                    // 文件名为空时,取文件本身名称
+                     fileName = file.getFilename();
+                }
+                messageHelper.addAttachment(fileName, file);
+            }
+            javaMailSender.send(mimeMessage);
+            return "发送成功";
+        } catch (
+                Exception e) {
+            e.printStackTrace();
+            return e.getMessage();
+        }
+    }
+
+    /**
+     * 模板 邮件
+     * * @param to 接收人
+     * * @param subject 主题
+     * * @param tplStr 模板路径 默认路径为 resources/templates 这里传该路径下 之后的路径 mail/模板名称 例 email/templateMail 这里不用加后缀
+     * * @param map 绑定到模板的参数
+     * * @return
+     */
+    public String sendTemplateMail(String to, String subject, String tplStr, Map<String, Object> map) {
+        try {
+            MimeMessage mimeMessage = javaMailSender.createMimeMessage();
+            // 设置utf-8编码,否则邮件会有乱码
+            MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true, StandardCharsets.UTF_8.toString());
+            messageHelper.setFrom(username);
+            messageHelper.setTo(to);
+            messageHelper.setSubject(subject);
+            // 设置模板参数
+            Context context = new Context();
+            context.setVariables(map);
+            // 将参数 绑定到模板中
+            String tempContent = templateEngine.process(tplStr, context);
+            messageHelper.setText(tempContent, Boolean.TRUE);
+            javaMailSender.send(mimeMessage);
+            return "发送成功";
+        } catch (Exception e) {
+            e.printStackTrace();
+            return e.getMessage();
+        }
+    }
+
+    /**
+     * 带附件 模板 邮件
+     * * @param to 接收人
+     * * @param subject 主题
+     * * @param tplStr 模板路径 默认路径为 resources/templates 这里传该路径下 之后的路径 mail/模板名称 例 email/templateMail 这里不用加后缀
+     * * @param map 绑定到模板的参数
+     * * @param fileName 附件名
+     * * @param filePath 附件路径
+     * * @return
+     */
+    public String sendTemplateFileMail(String to, String subject, String tplStr, Map<String, Object> map, String fileName, String filePath) {
+        try {
+            MimeMessage mimeMessage = javaMailSender.createMimeMessage();
+            // 设置utf-8或GBK编码,否则邮件会有乱码
+            MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true, "UTF-8");
+            messageHelper.setFrom(username);
+            messageHelper.setTo(to);
+            messageHelper.setSubject(subject);
+            // 设置模板参数
+            Context context = new Context();
+            context.setVariables(map);
+            // 将参数 绑定到模板中
+            String tempContent = templateEngine.process(tplStr, context);
+            messageHelper.setText(tempContent, true);
+            // 设置附件
+            FileSystemResource file = new FileSystemResource(new File(filePath));
+            if (StringUtils.isBlank(fileName)) { // 文件名为空时,取文件本身名称
+                fileName = file.getFilename();
+            }
+            messageHelper.addAttachment(fileName, file);
+            javaMailSender.send(mimeMessage);
+            return "发送成功";
+        } catch (Exception e) {
+            e.printStackTrace();
+            return e.getMessage();
+        }
+    }
+
+    /**
+     * 多附件 模板 邮件
+     * * @param to 接收人
+     * * @param subject 主题
+     * * @param tplStr 模板路径 默认路径为 resources/templates 这里传该路径下 之后的路径 mail/模板名称 例 email/templateMail 这里不用加后缀
+     * * @param map 绑定到模板的参数
+     * * @param list 附件集合 filepath:附件路径,fileName:附件名
+     * * @return
+     */
+    public String sendTemplateFilesMail(String to, String subject, String tplStr, Map<String, Object> map, List<Map<String, String>> list) {
+        try {
+            MimeMessage mimeMessage = javaMailSender.createMimeMessage();
+            // 设置utf-8编码,否则邮件会有乱码
+            MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true, "UTF-8");
+            messageHelper.setFrom(username);
+            messageHelper.setTo(to);
+            messageHelper.setSubject(subject);
+            // 设置模板参数
+            Context context = new Context();
+            context.setVariables(map);
+            // 将参数 绑定到模板中
+            String tempContent = templateEngine.process(tplStr, context);
+            messageHelper.setText(tempContent, true);
+            // 设置附件
+            for (Map<String, String> fileMap : list) {
+                FileSystemResource file = new FileSystemResource(new File(fileMap.get("filepath")));
+                String fileName = fileMap.get("fileName");
+                if (StringUtils.isBlank(fileName)) { // 文件名为空时,取文件本身名称
+                    fileName = file.getFilename();
+                }
+                messageHelper.addAttachment(fileName, file);
+            }
+            javaMailSender.send(mimeMessage);
+            return "发送成功";
+        } catch (Exception e) {
+            e.printStackTrace();
+            return e.getMessage();
+        }
+    }
+}

+ 23 - 2
4dkankan-utils-fyun/src/main/java/com/fdkankan/fyun/oss/UploadToOssUtil.java

@@ -734,8 +734,29 @@ public class UploadToOssUtil {
 	 * @param sourcePath
 	 * @param targetPath
 	 **/
-	public void copyFilesFromAws(String sourcePath, String targetPath) throws IOException {
-		// TODO: 2022/1/21
+	public void copyFilesFromAws(String sourcePath, String targetPath){
+
+		try {
+			List<String> sourceKeyList = this.listKeysFromAws(sourcePath);
+			/**
+			 * 创建s3对象
+			 */
+			BasicAWSCredentials awsCreds = new BasicAWSCredentials(s3key, s3secrey);
+			AmazonS3 s3 = AmazonS3ClientBuilder.standard()
+				.withCredentials(new AWSStaticCredentialsProvider(awsCreds))
+				.withRegion(Regions.EU_WEST_2)//s3 地区位置
+				.build();
+
+			// 复制文件
+			sourceKeyList.parallelStream().forEach(key -> {
+				log.info("开始复制:" + key);
+				s3.copyObject(this.bucket, key, this.bucket, key.replace(sourcePath, targetPath));
+				log.info("复制成功:" + key);
+			});
+			s3.shutdown();
+		} catch (Exception ase) {
+			log.error("amazonS拷贝异常 " + ase.getMessage(), ase);
+		}
 	}
 
 	/**

+ 2 - 2
4dkankan-utils-mq/src/main/java/com/fdkankan/mq/message/BuildSceneResultMqMessage.java

@@ -20,8 +20,6 @@ public class BuildSceneResultMqMessage {
 
     private Integer payStatus;
 
-    private String videosJson;
-
     private Long computeTime;
 
     private String fileId;
@@ -37,4 +35,6 @@ public class BuildSceneResultMqMessage {
     private String pushToken;
 
     private String prefix;
+
+    private Integer videoVersion;
 }

+ 12 - 1
4dkankan-utils-redis/src/main/java/com/fdkankan/redis/constant/RedisKey.java

@@ -61,14 +61,20 @@ public class RedisKey {
     public static String FDKANKAN_SCENE_NUMS = "4dkankan:scene:nums";
 
 
-    public static final String SCENE_BUILDING = SYSTEM_PREFIX+":scene:building:";
+    public static final String SCENE_BUILDING = SYSTEM_PREFIX+":scene:building:%s";
 
     /**
      * 场景下载进度
      */
+    // TODO: 2022/3/29  这个是V3版本使用的key,V4版本稳定后,这个要删除
     public static final String PREFIX_DOWNLOAD_PROGRESS="downloads:progress:%s";
 
     /**
+     * 场景下载进度
+     */
+    public static final String PREFIX_DOWNLOAD_PROGRESS_V4="downloads:progress:v4:%s";
+
+    /**
      * 即将要下载场景的场景码列表
      */
     public static final String DOWNLOAD_TASK="downloads:task";
@@ -93,6 +99,11 @@ public class RedisKey {
      */
     public static final String SCENE_HOT_ICONS = "scene:hoticons:num:%s";
 
+    /**
+     * 场景下载任务列表
+     */
+    public static final String SCENE_DOWNLOADS_TASK_V4 = "scene:downloads:task:v4";
+
 
 
 

+ 10 - 0
4dkankan-utils-redis/src/main/java/com/fdkankan/redis/constant/RedisLockKey.java

@@ -78,6 +78,16 @@ public class RedisLockKey {
      */
     public static String LOCK_HOT_JSON = "lock:hot:json:num:%s";
 
+    /**
+     * 批量生成场景码锁
+     */
+    public static String LOCK_BATCH_CREATE_NUM = "lock:batch:create:num";
+
+    /**
+     * 加载场景中断下载列表锁
+     */
+    public static String LOCK_SCENE_DOWNLOAD_ING = "lock:scene:downloads:ing";
+
 
 
 }

+ 1 - 0
pom.xml

@@ -13,6 +13,7 @@
         <module>4dkankan-utils-app-push</module>
         <module>4dkankan-utils-dingtalk</module>
         <module>4dkankan-utils-mongodb</module>
+        <module>4dkankan-utils-email</module>
     </modules>
 
     <groupId>com.fdkankan</groupId>