Browse Source

Merge branch 'test' into local-kj

# Conflicts:
#	src/main/java/com/fdkankan/ucenter/UserCenterApplication.java
#	src/main/java/com/fdkankan/ucenter/common/constants/NacosProperty.java
#	src/main/java/com/fdkankan/ucenter/config/WebAppConfig.java
#	src/main/java/com/fdkankan/ucenter/controller/inner/InnerController.java
#	src/main/java/com/fdkankan/ucenter/generate/AutoGenerate.java
#	src/main/java/com/fdkankan/ucenter/httpClient/service/LaserService.java
#	src/main/java/com/fdkankan/ucenter/service/impl/AppSceneService.java
#	src/main/java/com/fdkankan/ucenter/service/impl/CameraServiceImpl.java
#	src/main/java/com/fdkankan/ucenter/service/impl/InnerServiceImpl.java
#	src/main/java/com/fdkankan/ucenter/service/impl/SceneApiService.java
#	src/main/java/com/fdkankan/ucenter/service/impl/ScenePlusServiceImpl.java
#	src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java
#	src/main/resources/bootstrap-prod-eur.yml
lyhzzz 1 năm trước cách đây
mục cha
commit
3faa7acc03
100 tập tin đã thay đổi với 2376 bổ sung292 xóa
  1. 9 26
      pom.xml
  2. 3 0
      src/main/java/com/fdkankan/ucenter/UserCenterApplication.java
  3. 6 0
      src/main/java/com/fdkankan/ucenter/bean/SceneJsonBean.java
  4. 57 1
      src/main/java/com/fdkankan/ucenter/common/BaseController.java
  5. 2 1
      src/main/java/com/fdkankan/ucenter/common/CameraTypeEnum.java
  6. 16 0
      src/main/java/com/fdkankan/ucenter/common/EnLang.java
  7. 2 0
      src/main/java/com/fdkankan/ucenter/common/OssPath.java
  8. 1 0
      src/main/java/com/fdkankan/ucenter/common/constants/NacosProperty.java
  9. 18 0
      src/main/java/com/fdkankan/ucenter/common/constants/ResultCode.java
  10. 7 0
      src/main/java/com/fdkankan/ucenter/common/constants/UploadFilePath.java
  11. 22 22
      src/main/java/com/fdkankan/ucenter/config/MybatisPlusPageConfig.java
  12. 2 1
      src/main/java/com/fdkankan/ucenter/config/WebAppConfig.java
  13. 10 0
      src/main/java/com/fdkankan/ucenter/constant/ErrorConstant.java
  14. 2 0
      src/main/java/com/fdkankan/ucenter/constant/LoginConstant.java
  15. 3 0
      src/main/java/com/fdkankan/ucenter/constant/OrderConstant.java
  16. 3 0
      src/main/java/com/fdkankan/ucenter/constant/QrCodeFilePath.java
  17. 27 5
      src/main/java/com/fdkankan/ucenter/controller/ArticleController.java
  18. 228 22
      src/main/java/com/fdkankan/ucenter/controller/CameraController.java
  19. 21 0
      src/main/java/com/fdkankan/ucenter/controller/CameraTypeController.java
  20. 8 7
      src/main/java/com/fdkankan/ucenter/controller/CartController.java
  21. 1 1
      src/main/java/com/fdkankan/ucenter/controller/DeviceSceneController.java
  22. 12 12
      src/main/java/com/fdkankan/ucenter/controller/FolderController.java
  23. 19 11
      src/main/java/com/fdkankan/ucenter/controller/IncrementController.java
  24. 8 7
      src/main/java/com/fdkankan/ucenter/controller/LoginController.java
  25. 21 0
      src/main/java/com/fdkankan/ucenter/controller/MailTemplateController.java
  26. 18 11
      src/main/java/com/fdkankan/ucenter/controller/OrderController.java
  27. 39 25
      src/main/java/com/fdkankan/ucenter/controller/SceneController.java
  28. 16 11
      src/main/java/com/fdkankan/ucenter/controller/SceneCooperationController.java
  29. 21 0
      src/main/java/com/fdkankan/ucenter/controller/SceneDelLogController.java
  30. 95 11
      src/main/java/com/fdkankan/ucenter/controller/TestController.java
  31. 21 19
      src/main/java/com/fdkankan/ucenter/controller/UserController.java
  32. 10 9
      src/main/java/com/fdkankan/ucenter/controller/VirtualOrderController.java
  33. 2 2
      src/main/java/com/fdkankan/ucenter/controller/api/FusionController.java
  34. 14 9
      src/main/java/com/fdkankan/ucenter/controller/api/LaserController.java
  35. 5 5
      src/main/java/com/fdkankan/ucenter/controller/api/MangeApiController.java
  36. 6 6
      src/main/java/com/fdkankan/ucenter/controller/api/VoidController.java
  37. 18 3
      src/main/java/com/fdkankan/ucenter/controller/app/AppCameraController.java
  38. 4 3
      src/main/java/com/fdkankan/ucenter/controller/app/AppController.java
  39. 6 2
      src/main/java/com/fdkankan/ucenter/controller/app/AppSceneController.java
  40. 3 0
      src/main/java/com/fdkankan/ucenter/controller/app/AppUserController.java
  41. 2 2
      src/main/java/com/fdkankan/ucenter/controller/app/InvoiceController.java
  42. 8 6
      src/main/java/com/fdkankan/ucenter/controller/app/SceneApiController.java
  43. 11 4
      src/main/java/com/fdkankan/ucenter/controller/fire/FdUserCameraController.java
  44. 39 4
      src/main/java/com/fdkankan/ucenter/controller/fire/FdUserSceneController.java
  45. 2 1
      src/main/java/com/fdkankan/ucenter/controller/inner/InnerController.java
  46. 2 0
      src/main/java/com/fdkankan/ucenter/entity/CameraDetail.java
  47. 63 0
      src/main/java/com/fdkankan/ucenter/entity/CameraIncrementLog.java
  48. 66 0
      src/main/java/com/fdkankan/ucenter/entity/CameraType.java
  49. 108 0
      src/main/java/com/fdkankan/ucenter/entity/Case.java
  50. 1 1
      src/main/java/com/fdkankan/ucenter/entity/CommerceOrder.java
  51. 110 0
      src/main/java/com/fdkankan/ucenter/entity/Company.java
  52. 6 1
      src/main/java/com/fdkankan/ucenter/entity/DownloadOrder.java
  53. 77 0
      src/main/java/com/fdkankan/ucenter/entity/ExceedSpaceScene.java
  54. 1 1
      src/main/java/com/fdkankan/ucenter/entity/ExpansionOrder.java
  55. 5 0
      src/main/java/com/fdkankan/ucenter/entity/Goods.java
  56. 7 1
      src/main/java/com/fdkankan/ucenter/entity/IncrementOrder.java
  57. 72 6
      src/main/java/com/fdkankan/ucenter/entity/IncrementType.java
  58. 90 0
      src/main/java/com/fdkankan/ucenter/entity/MailTemplate.java
  59. 1 1
      src/main/java/com/fdkankan/ucenter/entity/Order.java
  60. 64 0
      src/main/java/com/fdkankan/ucenter/entity/SceneDelLog.java
  61. 37 0
      src/main/java/com/fdkankan/ucenter/entity/SceneEditControls.java
  62. 18 0
      src/main/java/com/fdkankan/ucenter/entity/SceneEditInfoExt.java
  63. 6 0
      src/main/java/com/fdkankan/ucenter/entity/ScenePlus.java
  64. 7 0
      src/main/java/com/fdkankan/ucenter/entity/ScenePlusExt.java
  65. 11 1
      src/main/java/com/fdkankan/ucenter/entity/User.java
  66. 20 0
      src/main/java/com/fdkankan/ucenter/httpClient/address/PayAddressSource.java
  67. 23 1
      src/main/java/com/fdkankan/ucenter/httpClient/client/LaserClient.java
  68. 35 0
      src/main/java/com/fdkankan/ucenter/httpClient/client/PayClient.java
  69. 35 0
      src/main/java/com/fdkankan/ucenter/httpClient/param/PayGoods.java
  70. 24 0
      src/main/java/com/fdkankan/ucenter/httpClient/param/PayOrderParam.java
  71. 8 0
      src/main/java/com/fdkankan/ucenter/httpClient/param/SSDownSceneParam.java
  72. 13 0
      src/main/java/com/fdkankan/ucenter/httpClient/param/SsBindParam.java
  73. 129 8
      src/main/java/com/fdkankan/ucenter/httpClient/service/LaserService.java
  74. 47 0
      src/main/java/com/fdkankan/ucenter/httpClient/service/PayService.java
  75. 63 0
      src/main/java/com/fdkankan/ucenter/httpClient/vo/PayOrderVo.java
  76. 10 0
      src/main/java/com/fdkankan/ucenter/httpClient/vo/SSDownSceneVo.java
  77. 2 2
      src/main/java/com/fdkankan/ucenter/interceptor/ControllerAopInterceptor.java
  78. 3 0
      src/main/java/com/fdkankan/ucenter/mapper/ICameraDetailMapper.java
  79. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/ICameraIncrementLogMapper.java
  80. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/ICameraTypeMapper.java
  81. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/ICaseMapper.java
  82. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/ICompanyMapper.java
  83. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/IExceedSpaceSceneMapper.java
  84. 1 1
      src/main/java/com/fdkankan/ucenter/mapper/IIncrementTypeMapper.java
  85. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/IMailTemplateMapper.java
  86. 18 0
      src/main/java/com/fdkankan/ucenter/mapper/ISceneDelLogMapper.java
  87. 2 0
      src/main/java/com/fdkankan/ucenter/mapper/IScenePlusMapper.java
  88. 2 0
      src/main/java/com/fdkankan/ucenter/mapper/ISceneProMapper.java
  89. 85 0
      src/main/java/com/fdkankan/ucenter/mq/consumer/OrderDownConsumer.java
  90. 62 0
      src/main/java/com/fdkankan/ucenter/mq/consumer/ScenePayStatusConsumer.java
  91. 13 0
      src/main/java/com/fdkankan/ucenter/mq/vo/ScenePayStatusVo.java
  92. 9 4
      src/main/java/com/fdkankan/ucenter/pay/factory/impl/down/PaypalDownload.java
  93. 30 1
      src/main/java/com/fdkankan/ucenter/pay/factory/impl/increment/PaypalIncrement.java
  94. 4 4
      src/main/java/com/fdkankan/ucenter/pay/paypal/PayPalDefaultConfig.java
  95. 24 4
      src/main/java/com/fdkankan/ucenter/pay/strategy/impl/DownloadOrderImpl.java
  96. 1 1
      src/main/java/com/fdkankan/ucenter/pay/strategy/impl/EntityOrderImpl.java
  97. 2 2
      src/main/java/com/fdkankan/ucenter/pay/strategy/impl/ExpansionOrderImpl.java
  98. 2 2
      src/main/java/com/fdkankan/ucenter/pay/strategy/impl/IncrementOrderImpl.java
  99. 1 1
      src/main/java/com/fdkankan/ucenter/pay/strategy/impl/RechargeOrderImpl.java
  100. 0 0
      src/main/java/com/fdkankan/ucenter/service/ICameraDetailService.java

+ 9 - 26
pom.xml

@@ -21,6 +21,12 @@
 
         <dependency>
             <groupId>com.fdkankan</groupId>
+            <artifactId>4dkankan-utils-model</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fdkankan</groupId>
             <artifactId>4dkankan-utils-fyun-oss</artifactId>
             <version>3.0.0-SNAPSHOT</version>
         </dependency>
@@ -42,35 +48,12 @@
             <version>3.0.0-SNAPSHOT</version>
         </dependency>
 
-
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>8.0.25</version>
-            <scope>runtime</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-boot-starter</artifactId>
-            <scope>compile</scope>
-            <version>3.4.3.4</version>
-        </dependency>
-
-        <!--mybatis-plus代码生成器-->
         <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-generator</artifactId>
-            <scope>compile</scope>
-            <version>3.5.1</version>
+            <groupId>com.fdkankan</groupId>
+            <artifactId>4dkankan-utils-db</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
         </dependency>
 
-        <!--velocity模板-->
-        <dependency>
-            <groupId>org.apache.velocity</groupId>
-            <artifactId>velocity-engine-core</artifactId>
-            <version>2.3</version>
-        </dependency>
 
         <dependency>
             <groupId>com.fdkankan</groupId>

+ 3 - 0
src/main/java/com/fdkankan/ucenter/UserCenterApplication.java

@@ -28,6 +28,8 @@ public class UserCenterApplication implements CommandLineRunner {
     private String mainUrl;
     @Value("${logging.path}")
     private String logPath;
+    @Value("${spring.profiles.active}")
+    private String activeFile;
 
     public static void main(String[] args) {
         SpringApplication.run(UserCenterApplication.class, args);
@@ -38,6 +40,7 @@ public class UserCenterApplication implements CommandLineRunner {
         NacosProperty.bucket = bucket;
         NacosProperty.uploadType = uploadType;
         NacosProperty.logPath = logPath;
+        NacosProperty.activeFile = activeFile;
         NacosProperty.setMainUrl(mainUrl);
     }
 }

+ 6 - 0
src/main/java/com/fdkankan/ucenter/bean/SceneJsonBean.java

@@ -123,6 +123,12 @@ public class SceneJsonBean {
     private String sceneKind;
 
     /**
+     * 算法模型类型(dam,3dtiles)
+     */
+    private String modelKind;
+
+
+    /**
      * 空间视频数据
      */
     private String boxVideos;

+ 57 - 1
src/main/java/com/fdkankan/ucenter/common/BaseController.java

@@ -1,6 +1,16 @@
 package com.fdkankan.ucenter.common;
 
+import cn.hutool.core.map.TolerantMap;
+import com.fdkankan.common.constant.ErrorCode;
+import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.DateEditor;
+import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.ucenter.common.constants.NacosProperty;
+import com.fdkankan.ucenter.constant.LoginConstant;
+import com.fdkankan.ucenter.entity.User;
+import com.fdkankan.ucenter.service.IUserService;
+import com.fdkankan.ucenter.util.DateUserUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.propertyeditors.StringTrimmerEditor;
 import org.springframework.data.domain.PageRequest;
@@ -15,6 +25,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.util.Date;
 
+@Slf4j
 public class BaseController {
 
     @Autowired
@@ -23,6 +34,9 @@ public class BaseController {
     @Autowired
     protected HttpServletResponse response;
 
+    @Autowired
+    IUserService userService;
+
     @InitBinder
     protected void initBinder(WebDataBinder webDataBinder) {
         webDataBinder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
@@ -81,7 +95,49 @@ public class BaseController {
     }
 
     protected String getToken(){
-        return request.getHeader("token");
+        String token = request.getHeader("token");
+        if(StringUtils.isEmpty(token)){
+            throw new BusinessException(ErrorCode.FAILURE_CODE_3004);
+        }
+        return token;
+    }
+    protected Long getUserId(){
+        String token = request.getHeader("token");
+        if(StringUtils.isEmpty(token)){
+            return null;
+        }
+        String username = JwtUtil.getUsername(token);
+        User user = userService.getByUserName(username);
+        if(user == null){
+            return null;
+        }
+        return user.getId();
+    }
+    protected String getLang(){
+        return StringUtils.isEmpty(request.getHeader("lang")) ? "en":request.getHeader("lang");
+    }
+    protected String getSign(){
+        return request.getHeader("sign");
+    }
+
+    protected Integer getTimeZone(){
+        Integer minute = 0;
+        String timeZone = request.getHeader("timeZone");
+        try {
+            if(!StringUtils.isEmpty(timeZone)){
+                minute = Integer.parseInt(timeZone);
+            }
+        }catch (Exception e){
+            log.error("getClientTime-error:requestHeaderTimeZone:{}",timeZone,e);
+        }
+        if(!NacosProperty.activeFile.contains("eur")){
+            minute += 480;
+        }
+        return minute;
+    }
+    protected String getClientTime(){
+        return DateUserUtil.AddMinute(new Date(),getTimeZone());
+
     }
 
 }

+ 2 - 1
src/main/java/com/fdkankan/ucenter/common/CameraTypeEnum.java

@@ -9,7 +9,8 @@ public enum CameraTypeEnum {
     FDKK_LITE(2,"KK-","4DKKLITE_","四维看看lite"),
     ZHIHOUSE_REDHOUSE(5,"KK-","4DKKLITE_","指房宝小红屋相机"),
     DOUBLE_EYE_TURN(9,"KJ-","4DKKLITE_","双目转台"),
-    LASER_TURN(10,"SS-","4DKKLA_","激光转台");
+    LASER_TURN(10,"SS-","4DSS_","激光转台"),
+    SG_TURN(11,"SG-","4DSG_","激光转台");
 
 
     private int type;

+ 16 - 0
src/main/java/com/fdkankan/ucenter/common/EnLang.java

@@ -0,0 +1,16 @@
+package com.fdkankan.ucenter.common;
+
+public class EnLang {
+    public  static  String  senior_en = "Senior";
+    public  static  String  premium_en  = "Premium";
+    public  static  String  year_en  = "/Year";
+    public  static  String  month_en  = "/Month";
+    public  static  String  senior_cn = "高级会员";
+    public  static  String  premium_cn  = "专业会员";
+    public  static  String  year_cn  = "/年";
+    public  static  String  month_cn  = "/月";
+    public  static  String  Scene_Download_en  = "Scene Download";
+    public  static  String  Scene_Download_cn  = "场景下载";
+    public  static  String  next_en  = "/per order";
+    public  static  String  next_cn  = "/次";
+}

+ 2 - 0
src/main/java/com/fdkankan/ucenter/common/OssPath.java

@@ -4,6 +4,8 @@ public class OssPath {
 
     public final static String houseTypePath = "scene_edit_data/%s/user/houseType.json";
     public final static String v3_statusPath = "data/data%s/status.json";
+    public final static String v3_scenePath = "data/data%s/scene.json";
     public final static String v4_statusPath = "scene_view_data/%s/data/status.json";
+    public final static String v4_scenePath = "scene_view_data/%s/data/scene.json";
     public final static String localStatusPath = System.getProperty("java.io.tmpdir") +"status.json";   //获取临时文件目录
 }

+ 1 - 0
src/main/java/com/fdkankan/ucenter/common/constants/NacosProperty.java

@@ -10,6 +10,7 @@ public class NacosProperty {
     public static String bucket;
     public static String uploadType;
     public static String logPath;
+    public static String activeFile;
     private static String mainUrl;
 
     public static String getMainUrl() {

+ 18 - 0
src/main/java/com/fdkankan/ucenter/common/constants/ResultCode.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.common.constants;
+
+import com.fdkankan.common.constant.CameraConstant;
+
+public class ResultCode {
+    public static final int FAILURE_CODE_400001 = 400001;
+    public static final String FAILURE_MSG_400001 = "场景码池为空";
+    public static final int FAILURE_CODE_400002 = 400002;
+    public static final String FAILURE_MSG_400002 = "场景码不存在";
+    public static final int FAILURE_CODE_400003 = 400003;
+    public static final String FAILURE_MSG_400003 = "获取深时下载状态失败";
+    public static final int FAILURE_CODE_400004 = 400004;
+    public static final String FAILURE_MSG_400004 = "获取深时下载链接失败";
+    public static final int FAILURE_CODE_400005 = 400005;
+    public static final String FAILURE_MSG_400005 = "获取邮件模板错误";
+    public static final int FAILURE_CODE_400006  = 400006 ;
+    public static final String FAILURE_MSG_400006  = "复制失败,场景资源文件不对" ;
+}

+ 7 - 0
src/main/java/com/fdkankan/ucenter/common/constants/UploadFilePath.java

@@ -16,6 +16,13 @@ public class UploadFilePath {
 
     public static final String DOWNLOADS_QRCODE = "downloads/scene/%s/QRcode/";
 
+    public static final String IMG_VIEW_PATH =  "scene_view_data/%s/images/";
+
+    /**
+     * 场景计算结果数据存放路径
+     */
+    public static final String SCENE_RESULT_DATA_PATH = "scene_result_data/%s/";
+
 
 
 }

+ 22 - 22
src/main/java/com/fdkankan/ucenter/config/MybatisPlusPageConfig.java

@@ -1,22 +1,22 @@
-package com.fdkankan.ucenter.config;
-
-import com.baomidou.mybatisplus.annotation.DbType;
-import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
-import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-
-@Configuration
-public class MybatisPlusPageConfig {
-
-    /**
-     * mybatisPlus配置分页插件
-     */
-    @Bean
-    public MybatisPlusInterceptor mybatisPlusInterceptor() {
-        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
-        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
-        return interceptor;
-    }
-}
+//package com.fdkankan.ucenter.config;
+//
+//import com.baomidou.mybatisplus.annotation.DbType;
+//import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+//import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//
+//
+////@Configuration
+//public class MybatisPlusPageConfig {
+//
+//    /**
+//     * mybatisPlus配置分页插件
+//     */
+//    @Bean
+//    public MybatisPlusInterceptor mybatisPlusInterceptor() {
+//        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+//        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+//        return interceptor;
+//    }
+//}

+ 2 - 1
src/main/java/com/fdkankan/ucenter/config/WebAppConfig.java

@@ -38,7 +38,8 @@ public class WebAppConfig implements WebMvcConfigurer {
 						"/**/agentAduit/**",
 						"/**/laser/**",
 						"/**/vaild/cameras/**",
-						"/**/hot/shop/**"
+						"/**/hot/shop/**",
+						"/**/getIncrementType/**"
 				);
 
 		registry.addInterceptor(appInterceptor).addPathPatterns("/**/app/**")

+ 10 - 0
src/main/java/com/fdkankan/ucenter/constant/ErrorConstant.java

@@ -0,0 +1,10 @@
+package com.fdkankan.ucenter.constant;
+
+public class ErrorConstant {
+
+    public static final int FAILURE_CODE_5050 = 5050;
+    public static final String FAILURE_MSG_5050 = "文件夹为空";
+
+    public static final int FAILURE_CODE_5051 = 5051;
+    public static final String FAILURE_MSG_5051 = "无法将上级目录移动到下级目录";
+}

+ 2 - 0
src/main/java/com/fdkankan/ucenter/constant/LoginConstant.java

@@ -118,4 +118,6 @@ public class LoginConstant {
     public static final int FAILURE_CODE_3036 = 3036;
     public static final String FAILURE_MSG_3036= "文本超过长度限制";
 
+    public static final int FAILURE_CODE_3037 = 3037;
+    public static final String FAILURE_MSG_3037 = "场景原始数据已过期,无法使用该功能!";
 }

+ 3 - 0
src/main/java/com/fdkankan/ucenter/constant/OrderConstant.java

@@ -15,4 +15,7 @@ public class OrderConstant {
 
     public static final int FAILURE_CODE_8004 = 8004;
     public static final String FAILURE_MSG_8004 = "支付方式异常";
+
+    public static final int FAILURE_CODE_8005 = 8005;
+    public static final String FAILURE_MSG_8005= "下单失败";
 }

+ 3 - 0
src/main/java/com/fdkankan/ucenter/constant/QrCodeFilePath.java

@@ -9,4 +9,7 @@ public class QrCodeFilePath {
     public static final String LOGIN_QR_CODE_PATH = "/mnt/4Dkankan/login/qrcode/";
     public static final String ALI_QRCODE_FOLDER = "/mnt/4Dkankan/alicode/";
     public static final String WEIXIN_QRCODE_FOLDER = "/mnt/4Dkankan/weixincode/";
+
+    public static final String LOGO_IMAGE_LOCAL = "/mnt/4Dkankan/login/qrcode/logo.jpg";
+    public static final String LOGO_IMAGE_OSS = "ucenter/image/logo.jpg";
 }

+ 27 - 5
src/main/java/com/fdkankan/ucenter/controller/ArticleController.java

@@ -1,9 +1,14 @@
 package com.fdkankan.ucenter.controller;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.entity.Article;
+import com.fdkankan.ucenter.entity.Case;
 import com.fdkankan.ucenter.service.IArticleService;
+import com.fdkankan.ucenter.service.ICaseService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.ObjectUtils;
 import org.springframework.web.bind.annotation.*;
@@ -18,19 +23,36 @@ import org.springframework.web.bind.annotation.*;
  */
 @RestController
 @RequestMapping("/ucenter/article")
-public class ArticleController {
+public class ArticleController extends BaseController {
 
     @Autowired
-    IArticleService articleService;
+    ICaseService caseService;
     /**
      * 行业解决方案-案例展示
      */
     @PostMapping("/detail")
-    public Result detail(@RequestBody Article article) throws Exception {
-        if(ObjectUtils.isEmpty(article.getId())){
+    public Result detail(@RequestBody Case caseEntity) throws Exception {
+        if(ObjectUtils.isEmpty(caseEntity.getId())){
             return Result.success();
         }
-        return Result.success(articleService.getById(article.getId()));
+        return Result.success(caseService.getById(caseEntity.getId()));
+    }
+
+    @PostMapping("/allList")
+    public Result allList(@RequestBody Case caseEntity) throws Exception {
+        String lang = getLang();
+        if("zh".equals(lang)){
+            lang = "cn";
+        }
+        LambdaQueryWrapper<Case> wrapper = new LambdaQueryWrapper<>();
+        if(StringUtils.isNotBlank(caseEntity.getTypeId())){
+            wrapper.eq(Case::getTypeId,caseEntity.getTypeId());
+        }
+        wrapper.eq(Case::getLanguage,lang);
+        wrapper.eq(Case::getIsPublic,1);
+        wrapper.orderByAsc(Case::getSort);
+        wrapper.orderByAsc(Case::getId);
+        return Result.success(caseService.list(wrapper));
     }
 }
 

+ 228 - 22
src/main/java/com/fdkankan/ucenter/controller/CameraController.java

@@ -1,5 +1,6 @@
 package com.fdkankan.ucenter.controller;
 
+import cn.hutool.core.date.DateUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fdkankan.common.exception.BusinessException;
@@ -10,16 +11,26 @@ import com.fdkankan.ucenter.common.ResultData;
 import com.fdkankan.ucenter.constant.LoginConstant;
 import com.fdkankan.ucenter.entity.Camera;
 import com.fdkankan.ucenter.entity.CameraDetail;
+import com.fdkankan.ucenter.entity.ScenePro;
 import com.fdkankan.ucenter.entity.User;
-import com.fdkankan.ucenter.service.ICameraDetailService;
-import com.fdkankan.ucenter.service.ICameraService;
-import com.fdkankan.ucenter.service.ISceneResourceService;
-import com.fdkankan.ucenter.service.IUserService;
+import com.fdkankan.ucenter.service.*;
+import com.fdkankan.ucenter.util.DateUserUtil;
 import com.fdkankan.ucenter.vo.request.CameraParam;
+import com.fdkankan.ucenter.vo.request.ExportCameraParam;
+import com.fdkankan.ucenter.vo.response.CameraAppVo;
+import com.fdkankan.ucenter.vo.response.CameraExcelVo;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -35,13 +46,15 @@ public class CameraController extends BaseController {
     ISceneResourceService sceneResourceService;
     @Autowired
     IUserService userService;
+    @Autowired
+    ISceneProService sceneProService;
 
     /**
      * 获取设备到期数量
      */
     @PostMapping("/deadlineNumber")
-    public Result deadlineNumber(@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result deadlineNumber(){
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(cameraDetailService.deadlineNumber(username));
     }
 
@@ -49,8 +62,8 @@ public class CameraController extends BaseController {
      * 分页列表
      */
     @PostMapping("/listNew")
-    public Result listNew(@RequestBody CameraParam param ,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result listNew(@RequestBody CameraParam param){
+        String username = JwtUtil.getUsername(getToken());
         param.setUserName(username);
         return Result.success(cameraService.pageList(param));
     }
@@ -59,8 +72,8 @@ public class CameraController extends BaseController {
      * 获取用户设备到期信息
      */
     @PostMapping("/deadline")
-    public Result deadline(@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result deadline(){
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(cameraService.deadline(username));
     }
 
@@ -68,8 +81,8 @@ public class CameraController extends BaseController {
      * 用户解绑设备
      */
     @PostMapping("/unbind")
-    public Result unbind(@RequestBody JSONObject jsonObject,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result unbind(@RequestBody JSONObject jsonObject){
+        String username = JwtUtil.getUsername(getToken());
         cameraService.unbind(jsonObject.getLong("cameraId"),jsonObject.getString("ids"),username);
         return Result.success();
     }
@@ -78,8 +91,8 @@ public class CameraController extends BaseController {
      *用户绑定设备
      */
     @PostMapping("/add")
-    public Result add(@RequestBody JSONObject jsonObject,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result add(@RequestBody JSONObject jsonObject){
+        String username = JwtUtil.getUsername(getToken());
         cameraService.bind(jsonObject.getInteger("cameraType"),jsonObject.getString("snCode"),username);
         return Result.success();
     }
@@ -88,13 +101,13 @@ public class CameraController extends BaseController {
      * 添加相机协作用户
      */
     @PostMapping("/saveCooperationUser")
-    public Result saveCooperationUser(@RequestBody JSONObject jsonObject,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result saveCooperationUser(@RequestBody JSONObject jsonObject){
+        String username = JwtUtil.getUsername(getToken());
         if(jsonObject.getString("userName").equals(username)){
             throw new BusinessException(LoginConstant.FAILURE_CODE_3025, LoginConstant.FAILURE_MSG_3025);
         }
         cameraService.saveCooperationUser(jsonObject.getString("ids"),
-                jsonObject.getLong("cameraId"),jsonObject.getString("resourceIds"),jsonObject.getString("userName"));
+                jsonObject.getLong("cameraId"),jsonObject.getString("resourceIds"),jsonObject.getString("userName"), getLang());
         return Result.success();
     }
 
@@ -122,22 +135,22 @@ public class CameraController extends BaseController {
      * 获取用户设备--新(根据sn返回全部不分页)
      */
     @PostMapping("/listNewAll")
-    public Result listNewAll(@RequestBody JSONObject jsonObject,@RequestHeader String token){
+    public Result listNewAll(@RequestBody JSONObject jsonObject){
         if(jsonObject.get("childName") == null){
             throw new BusinessException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
         }
-        return Result.success(cameraService.getAllList(jsonObject.getString("childName"),token));
+        return Result.success(cameraService.getAllList(jsonObject.getString("childName"),getToken()));
     }
 
     /**
      * 获取协作相机sn码集合
      */
     @PostMapping(value = "/getCooperationSnCodes")
-    public Result getCooperationSnCodes(@RequestHeader String token) throws Exception {
-        User user = userService.getByToken(token);
+    public Result getCooperationSnCodes() throws Exception {
+        User user = userService.getByToken(getToken());
         LambdaQueryWrapper<CameraDetail> condition = new LambdaQueryWrapper<>();
         condition.eq(CameraDetail::getCooperationUser,user.getId());
-        condition.eq(CameraDetail::getGoodsId,10);
+        condition.eq(CameraDetail::getType,10);
         List<CameraDetail> list = cameraDetailService.list(condition);
         if(CollectionUtils.isEmpty(list)){
             return Result.success();
@@ -159,4 +172,197 @@ public class CameraController extends BaseController {
         }
         return Result.success(userService.findCameraDetailByChildName(getToken(), jsonObject.getString("childName")));
     }
+
+    /**
+     * 获取四维看看PRO - 我的相机列表 并到处execl
+     * @return
+     */
+    @RequestMapping(value = "/export", method = RequestMethod.POST)
+    public HSSFWorkbook export(@RequestBody ExportCameraParam param) throws Exception {
+
+        String fileName = "我的相机";
+        User user = userService.getByToken(getToken());
+        List<CameraExcelVo> responseCameraList = cameraDetailService.getListByUserAndTypeEx(user.getId());
+        List<Long> cameraIdList = responseCameraList.stream().map(CameraExcelVo::getCameraId).collect(Collectors.toList());
+
+        List<ScenePro> sceneEntityList = new ArrayList<>();
+        LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
+        if(cameraIdList.size() >0){
+            wrapper.in(ScenePro::getCameraId,cameraIdList);
+            sceneEntityList = sceneProService.list(wrapper);
+        }
+
+        HashMap<Long,List<ScenePro>> sceneProMap = new HashMap<>();
+        for (ScenePro scenePro : sceneEntityList) {
+            if(sceneProMap.get(scenePro.getCameraId()) == null){
+                List<ScenePro> proList = new ArrayList<>();
+                proList.add(scenePro);
+                sceneProMap.put(scenePro.getCameraId(),proList);
+            }else {
+                sceneProMap.get(scenePro.getCameraId()).add(scenePro);
+            }
+
+        }
+
+        HSSFWorkbook wb = new HSSFWorkbook();
+        if (responseCameraList != null) {
+            HSSFSheet sheet = wb.createSheet("camera");
+            //在sheet里创建第一行,这里即是表头
+            HSSFRow rowTitle = sheet.createRow(0);
+            rowTitle.createCell(0).setCellValue("S/N码");
+            rowTitle.createCell(1).setCellValue("云容量");
+            rowTitle.createCell(2).setCellValue("到期时间");
+            rowTitle.createCell(3).setCellValue("协作者");
+            rowTitle.createCell(4).setCellValue("拍摄场景数量");
+            rowTitle.createCell(5).setCellValue("最后拍摄时间");
+
+            int i = 1;
+            String rl = "";
+            String UsedSpaceStr = "";
+            String TotalSpaceStr = "";
+            for (CameraExcelVo rc : responseCameraList) {
+                HSSFRow rowData = sheet.createRow(i);
+                rowData.createCell(0).setCellValue(rc.getSnCode());
+
+
+                if(rc.getUsedSpaceStr() == null || StringUtils.isEmpty(rc.getUsedSpaceStr())){
+                    UsedSpaceStr = "0GB";
+                }else {
+                    UsedSpaceStr = rc.getUsedSpaceStr();
+                }
+
+                if(rc.getTotalSpaceStr() == null || StringUtils.isEmpty(rc.getTotalSpaceStr())){
+                    TotalSpaceStr = "0GB";
+                }else {
+                    TotalSpaceStr = rc.getTotalSpaceStr();
+                }
+
+                if(rc.getSpaceEndStr() == null){
+                    rowData.createCell(1).setCellValue(UsedSpaceStr + " / " + TotalSpaceStr);
+                }else {
+                    if(rc.getIsExpired() == null || rc.getIsExpired() == 1){
+                        rowData.createCell(1).setCellValue(UsedSpaceStr + " / " + TotalSpaceStr);
+                    }else{
+                        rowData.createCell(1).setCellValue(UsedSpaceStr);
+                    }
+                }
+
+                if(rc.getSpaceEndStr() == null ){
+                    rowData.createCell(2).setCellValue("");
+                }else{
+                    rowData.createCell(2).setCellValue(rc.getSpaceEndStr());
+                }
+
+                if(rc.getCooperationUser() == null ){
+                    rowData.createCell(3).setCellValue("");
+                }else{
+                    rowData.createCell(3).setCellValue(rc.getCooperationUser());
+                }
+                List<ScenePro> proList = sceneProMap.get(rc.getCameraId());
+                if(proList == null || proList.size() <=0){
+                    rowData.createCell(4).setCellValue("");
+                    rowData.createCell(5).setCellValue("");
+                }else {
+                    rowData.createCell(4).setCellValue(proList.size());
+                    String lastTime = null;
+                    for (ScenePro scenePro : proList) {
+                        if(lastTime == null){
+                            lastTime = scenePro.getCreateTime();
+                        }else {
+                            Date date1 = DateUserUtil.getDate(lastTime);
+                            Date date2 = DateUserUtil.getDate(scenePro.getCreateTime());
+                            if(date2.getTime() >date1.getTime()){
+                                lastTime = scenePro.getCreateTime();
+                            }
+                        }
+
+                    }
+                    rowData.createCell(5).setCellValue(lastTime);
+                }
+                i++;
+            }
+
+        }
+
+        if(sceneEntityList.size() >0){
+            if(StringUtils.isNotBlank(param.getStartTime())){
+                wrapper.ge(ScenePro::getCreateTime,param.getStartTime());
+            }
+            if(StringUtils.isNotBlank(param.getEndTime())){
+                String date = DateUserUtil.getLastZeroTime(param.getEndTime());
+                wrapper.le(ScenePro::getCreateTime,date);
+            }
+            if(StringUtils.isNotBlank(param.getStartTime()) || StringUtils.isNotBlank(param.getEndTime())){
+                sceneEntityList = sceneProService.list(wrapper);
+            }
+        }
+
+        HashMap<Long, Camera> cameraMap = cameraService.getByIds(cameraIdList);
+        HashMap<Long, Integer> cameraSnCodeCountMap = new HashMap<>();
+        for (ScenePro sceneProEntity : sceneEntityList) {
+            if(cameraSnCodeCountMap.get(sceneProEntity.getCameraId()) ==null){
+                cameraSnCodeCountMap.put(sceneProEntity.getCameraId(),1);
+                continue;
+            }
+            Integer totalNum = 1 + cameraSnCodeCountMap.get(sceneProEntity.getCameraId()) ;
+            cameraSnCodeCountMap.put(sceneProEntity.getCameraId(),totalNum);
+        }
+
+        HSSFSheet sheet = wb.createSheet("scene");
+        //在sheet里创建第一行,这里即是表头
+        HSSFRow rowTitle = sheet.createRow(0);
+        rowTitle.createCell(0).setCellValue("S/N码");
+        rowTitle.createCell(1).setCellValue("开始时间");
+        rowTitle.createCell(2).setCellValue("结束时间");
+        rowTitle.createCell(3).setCellValue("场景数量");
+        int i = 1;
+        for (Long  cameraId : cameraMap.keySet()) {
+            HSSFRow rowData = sheet.createRow(i);
+            i++;
+            rowData.createCell(0).setCellValue(cameraMap.get(cameraId) == null ? "" : cameraMap.get(cameraId).getSnCode());
+            rowData.createCell(1).setCellValue(param.getStartTime() == null ? "" : param.getStartTime());
+            rowData.createCell(2).setCellValue(param.getEndTime() == null ? "" : param.getEndTime());
+            if(cameraSnCodeCountMap.get(cameraId) == null){
+                rowData.createCell(3).setCellValue("");
+                continue;
+            }
+            rowData.createCell(3).setCellValue(cameraSnCodeCountMap.get(cameraId));
+        }
+
+
+        HSSFSheet sheet2 = wb.createSheet("info");
+        //在sheet里创建第一行,这里即是表头
+        HSSFRow rowTitle2 = sheet2.createRow(0);
+        rowTitle2.createCell(0).setCellValue("S/N码");
+        rowTitle2.createCell(1).setCellValue("场景码");
+        rowTitle2.createCell(2).setCellValue("场景名称");
+        rowTitle2.createCell(3).setCellValue("场景链接");
+        rowTitle2.createCell(4).setCellValue("创建时间");
+
+        int k = 1;
+        for (ScenePro sceneProEntity : sceneEntityList) {
+            HSSFRow rowData = sheet2.createRow(k);
+            k++;
+            if(cameraMap.get(sceneProEntity.getCameraId()) == null){
+                rowData.createCell(0).setCellValue("");
+            }else {
+                rowData.createCell(0).setCellValue(cameraMap.get(sceneProEntity.getCameraId()).getSnCode());
+            }
+            rowData.createCell(1).setCellValue(sceneProEntity.getNum() == null ? "" :sceneProEntity.getNum());
+            rowData.createCell(2).setCellValue(sceneProEntity.getSceneName() == null ? "" :sceneProEntity.getSceneName());
+            rowData.createCell(3).setCellValue(sceneProEntity.getWebSite() == null ? "" :sceneProEntity.getWebSite());
+            rowData.createCell(4).setCellValue(sceneProEntity.getCreateTime() == null ? "" : sceneProEntity.getCreateTime());
+        }
+
+        //输出Excel文件
+        OutputStream output = response.getOutputStream();
+        response.reset();
+        //中文名称要进行编码处理
+        response.setHeader("Content-disposition", "attachment; filename=" + new String(fileName.getBytes("GB2312"), "ISO8859-1") + ".xls");
+        response.setContentType("application/msexcel");
+        wb.write(output);
+        output.close();
+
+        return wb;
+    }
 }

+ 21 - 0
src/main/java/com/fdkankan/ucenter/controller/CameraTypeController.java

@@ -0,0 +1,21 @@
+package com.fdkankan.ucenter.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-12
+ */
+@RestController
+@RequestMapping("/ucenter/cameraType")
+public class CameraTypeController {
+
+}
+

+ 8 - 7
src/main/java/com/fdkankan/ucenter/controller/CartController.java

@@ -2,6 +2,7 @@ package com.fdkankan.ucenter.controller;
 
 
 import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.service.ICartService;
 import com.fdkankan.ucenter.vo.request.CartParam;
@@ -17,7 +18,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/ucenter/user/cart")
-public class CartController {
+public class CartController extends BaseController {
 
     @Autowired
     ICartService cartService;
@@ -26,8 +27,8 @@ public class CartController {
      * 添加购物车
      */
     @PostMapping("/add")
-    public Result add(@RequestBody CartParam param, @RequestHeader String token){
-        param.setUserName(JwtUtil.getUsername(token));
+    public Result add(@RequestBody CartParam param){
+        param.setUserName(JwtUtil.getUsername(getToken()));
         cartService.add(param);
         return Result.success();
     }
@@ -37,8 +38,8 @@ public class CartController {
      * 购物车商品减或移除
      */
     @PostMapping(value = "/remove")
-    public Result remove(@RequestBody CartParam param, @RequestHeader String token){
-        param.setUserName(JwtUtil.getUsername(token));
+    public Result remove(@RequestBody CartParam param){
+        param.setUserName(JwtUtil.getUsername(getToken()));
         cartService.delete(param);
         return Result.success();
     }
@@ -48,8 +49,8 @@ public class CartController {
      *
      */
     @PostMapping(value = "/list")
-    public Result list(@RequestHeader String token) throws Exception {
-        String username = JwtUtil.getUsername(token);
+    public Result list() throws Exception {
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(cartService.listByUser(username));
     }
 

+ 1 - 1
src/main/java/com/fdkankan/ucenter/controller/DeviceSceneController.java

@@ -55,7 +55,7 @@ public class DeviceSceneController extends BaseController {
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     public Result deleteScene(@RequestBody AppSceneParam param) throws Exception {
         param.setCameraType(null);
-        sceneProService.delete(param.getSceneNum());
+        sceneProService.delete(param.getSceneNum(),getUserId());
         return Result.success();
     }
 

+ 12 - 12
src/main/java/com/fdkankan/ucenter/controller/FolderController.java

@@ -42,8 +42,8 @@ public class FolderController extends BaseController {
      * parentId   上层文件夹id
      */
     @PostMapping("/save")
-    public Result save(@RequestBody FolderParam param, @RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result save(@RequestBody FolderParam param){
+        String username = JwtUtil.getUsername(getToken());
         param.setUserName(username);
         folderService.add(param);
         return Result.success();
@@ -53,8 +53,8 @@ public class FolderController extends BaseController {
      * 修改文件夹
      */
     @PostMapping("/update")
-    public Result update(@RequestBody FolderParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result update(@RequestBody FolderParam param){
+        String username = JwtUtil.getUsername(getToken());
         param.setUserName(username);
         folderService.updateByParam(param,username);
         return Result.success();
@@ -64,8 +64,8 @@ public class FolderController extends BaseController {
      * 删除文件夹
      */
     @PostMapping("/delete")
-    public Result delete(@RequestBody FolderParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result delete(@RequestBody FolderParam param){
+        String username = JwtUtil.getUsername(getToken());
         folderService.delete(param.getId(),username);
         return Result.success();
     }
@@ -75,17 +75,17 @@ public class FolderController extends BaseController {
      * type   文件夹类型,0我的场景,1协作场景
      */
     @PostMapping("/findListTree")
-    public Result findListTree(@RequestBody FolderParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
-        return Result.success(folderService.findListTree(param.getType(),username));
+    public Result findListTree(@RequestBody FolderParam param){
+        String username = JwtUtil.getUsername(getToken());
+        return Result.success(folderService.findListTree(param.getFolderIds(),param.getType(),username));
     }
 
     /**
      * 移动文件夹或场景
      */
     @PostMapping("/move")
-    public Result move(@RequestBody FolderParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result move(@RequestBody FolderParam param){
+        String username = JwtUtil.getUsername(getToken());
         folderService.move(param,username);
         return Result.success();
     }
@@ -104,7 +104,7 @@ public class FolderController extends BaseController {
             throw new BusinessException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
         }
 
-        List<Folder> list = folderService.findByUserIdAndType(user.getId(), param.getType(), param.getName());
+        List<Folder> list = folderService.findByUserIdAndType(user.getId(), param.getType(), param.getName(),param.getFolderIds());
 
         return Result.success(list);
     }

+ 19 - 11
src/main/java/com/fdkankan/ucenter/controller/IncrementController.java

@@ -2,7 +2,10 @@ package com.fdkankan.ucenter.controller;
 
 import com.fdkankan.common.util.DateUtil;
 import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
+import com.fdkankan.ucenter.common.constants.NacosProperty;
+import com.fdkankan.ucenter.entity.IncrementType;
 import com.fdkankan.ucenter.entity.UserIncrement;
 import com.fdkankan.ucenter.service.IIncrementTypeService;
 import com.fdkankan.ucenter.service.IUserIncrementService;
@@ -14,9 +17,11 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+
 @RestController
 @RequestMapping("/ucenter/user/increment")
-public class IncrementController {
+public class IncrementController extends BaseController {
 
     @Autowired
     IUserIncrementService userIncrementService;
@@ -24,16 +29,19 @@ public class IncrementController {
     IIncrementTypeService incrementTypeService;
 
     @GetMapping("/getIncrementType")
-    public Result getIncrementType(@RequestParam (required = false) String type){
-        if(StringUtils.isEmpty(type)){
-            type = "cn";
+    public Result getIncrementType(){
+        List<IncrementType> list = incrementTypeService.list();
+        if("aws".equals(NacosProperty.uploadType)){
+            for (IncrementType incrementType : list) {
+                incrementType.setCameraCapacity(incrementType.getCameraSpace());
+            }
         }
-        return Result.success(incrementTypeService.getByType(type));
+        return Result.success(list);
     }
 
     @PostMapping("/findIncrementList")
-    public Result findIncrementList(@RequestBody IncrementParam param, @RequestHeader String token){
-        param.setUserName(JwtUtil.getUsername(token));
+    public Result findIncrementList(@RequestBody IncrementParam param){
+        param.setUserName(JwtUtil.getUsername(getToken()));
         return Result.success(userIncrementService.pageList(param));
     }
 
@@ -41,8 +49,8 @@ public class IncrementController {
      * 绑定权益包
      */
     @PostMapping("/bindCamera")
-    public Result bindCamera(@RequestBody IncrementParam param, @RequestHeader String token){
-        param.setUserName(JwtUtil.getUsername(token));
+    public Result bindCamera(@RequestBody IncrementParam param){
+        param.setUserName(JwtUtil.getUsername(getToken()));
         userIncrementService.bindCamera(param);
         return Result.success();
     }
@@ -50,8 +58,8 @@ public class IncrementController {
      * 解绑权益包
      */
     @PostMapping("/unbindCamera")
-    public Result unbindCamera(@RequestBody IncrementParam param, @RequestHeader String token){
-        param.setUserName(JwtUtil.getUsername(token));
+    public Result unbindCamera(@RequestBody IncrementParam param){
+        param.setUserName(JwtUtil.getUsername(getToken()));
         userIncrementService.unbindCamera(param);
         return Result.success();
     }

+ 8 - 7
src/main/java/com/fdkankan/ucenter/controller/LoginController.java

@@ -3,6 +3,7 @@ package com.fdkankan.ucenter.controller;
 import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.util.JwtUtil;
 import com.fdkankan.redis.util.RedisUtil;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.RedisKeyUtil;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.service.impl.LoginService;
@@ -18,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
  */
 @RestController
 @RequestMapping("/ucenter/sso/user")
-public class LoginController {
+public class LoginController extends BaseController {
 
     @Autowired
     LoginService loginService;
@@ -66,8 +67,8 @@ public class LoginController {
      * 登出
      */
     @PostMapping("/logout")
-    public Result logout(@RequestHeader String token){
-        loginService.logout(token);
+    public Result logout(){
+        loginService.logout(getToken());
         return Result.success();
     }
 
@@ -125,8 +126,8 @@ public class LoginController {
      * 检验token是否过期
      */
     @PostMapping(value = "/checkToken")
-    public Result checkToken(@RequestHeader String token){
-        loginService.loginCheck(token);
+    public Result checkToken(){
+        loginService.loginCheck(getToken());
         return Result.success();
     }
 
@@ -134,8 +135,8 @@ public class LoginController {
      * 检验验证码是否有效
      */
     @PostMapping(value = "/checkSms")
-    public Result checkSms(@RequestBody RegisterParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result checkSms(@RequestBody RegisterParam param){
+        String username = JwtUtil.getUsername(getToken());
         loginService.checkSms(param.getMsgAuthCode(),username,false);
         return Result.success();
     }

+ 21 - 0
src/main/java/com/fdkankan/ucenter/controller/MailTemplateController.java

@@ -0,0 +1,21 @@
+package com.fdkankan.ucenter.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-01-10
+ */
+@RestController
+@RequestMapping("/ucenter/mailTemplate")
+public class MailTemplateController {
+
+}
+

+ 18 - 11
src/main/java/com/fdkankan/ucenter/controller/OrderController.java

@@ -2,21 +2,25 @@ package com.fdkankan.ucenter.controller;
 
 
 import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.service.IOrderService;
+import com.fdkankan.ucenter.util.DateUserUtil;
 import com.fdkankan.ucenter.vo.request.DownNumParam;
 import com.fdkankan.ucenter.vo.request.OrderParam;
 import com.fdkankan.ucenter.vo.request.PlaceOrderParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Date;
+
 /**
  * 订单
  *
  */
 @RestController
 @RequestMapping("/ucenter/user/order")
-public class OrderController {
+public class OrderController extends BaseController {
 
     @Autowired
     IOrderService orderService;
@@ -25,8 +29,8 @@ public class OrderController {
      * 获取用户订单
      */
     @PostMapping("/list")
-    public Result list(@RequestBody OrderParam param, @RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result list(@RequestBody OrderParam param){
+        String username = JwtUtil.getUsername(getToken());
         param.setUserName(username);
         return Result.success(orderService.pageList(param));
     }
@@ -53,8 +57,9 @@ public class OrderController {
      * 确认订单
      */
     @PostMapping("/placeOrder")
-    public Result placeOrder(@RequestBody PlaceOrderParam param, @RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result placeOrder(@RequestBody PlaceOrderParam param){
+        String username = JwtUtil.getUsername(getToken());
+        param.setLang(getLang());
         param.setUserName(username);
         return Result.success(orderService.placeOrder(param));
     }
@@ -71,8 +76,8 @@ public class OrderController {
      * 获取增值权益或场景下载价格
      */
     @PostMapping("/getIncrementOrDownloadPrice")
-    public Result getIncrementOrDownloadPrice(@RequestBody OrderParam param, @RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result getIncrementOrDownloadPrice(@RequestBody OrderParam param){
+        String username = JwtUtil.getUsername(getToken());
         param.setUserName(username);
         return Result.success(orderService.getIncrementOrDownloadPrice(param));
     }
@@ -81,9 +86,10 @@ public class OrderController {
      * 下载场景提交订单
      */
     @PostMapping("/downloadOrder")
-    public Result downloadOrder(@RequestBody DownNumParam param, @RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result downloadOrder(@RequestBody DownNumParam param){
+        String username = JwtUtil.getUsername(getToken());
         param.setUserName(username);
+        param.setTimeZoneOff(getTimeZone());
         return Result.success(orderService.downloadOrder(param));
     }
 
@@ -91,9 +97,10 @@ public class OrderController {
      * 增值权益提交订单
      */
     @PostMapping("/incrementOrder")
-    public Result incrementOrder(@RequestBody DownNumParam param, @RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result incrementOrder(@RequestBody DownNumParam param){
+        String username = JwtUtil.getUsername(getToken());
         param.setUserName(username);
+        param.setTimeZoneOff(getTimeZone());
         return Result.success(orderService.incrementOrder(param));
     }
 

+ 39 - 25
src/main/java/com/fdkankan/ucenter/controller/SceneController.java

@@ -16,13 +16,7 @@ import com.fdkankan.ucenter.vo.request.SceneParam;
 import com.fdkankan.ucenter.vo.response.DownloadProcessVo;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -50,34 +44,36 @@ public class SceneController extends BaseController {
     ISceneCooperationService sceneCooperationService;
     @Autowired
     ISceneService sceneService;
+    @Autowired
+    IScenePlusService scenePlusService;
 
     @PostMapping("/findSceneNumber")
-    public Result findSceneNumber(@RequestHeader String token){
-        return Result.success(sceneProService.findSceneNumber(token));
+    public Result findSceneNumber(){
+        return Result.success(sceneProService.findSceneNumber(getToken()));
     }
 
     @PostMapping("/getOldSceneList")
-    public Result getOldSceneList(@RequestBody SceneParam param,@RequestHeader String token){
-        User user = userService.getByToken(token);
+    public Result getOldSceneList(@RequestBody SceneParam param){
+        User user = userService.getByToken(getToken());
         param.setUserId(user.getId());
         return Result.success(sceneService.pageList(param));
     }
     @PostMapping(value = "/list")
-    public Result getScenes(@RequestBody RequestScene param, @RequestHeader String token) throws Exception {
-        String username = JwtUtil.getUsername(token);
+    public Result getScenes(@RequestBody RequestScene param) throws Exception {
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(sceneProService.getScenes(username, param));
 
     }
 
     @PostMapping("/newList")
-    public Result newList(@RequestBody SceneParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result newList(@RequestBody SceneParam param){
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(sceneProService.newList(param,username));
     }
 
     @PostMapping("/getOnlySceneList")
-    public Result getOnlySceneList(@RequestBody SceneParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result getOnlySceneList(@RequestBody SceneParam param){
+        String username = JwtUtil.getUsername(getToken());
         param.setHasFolder(0);
         JSONObject jsonObject = sceneProService.newList(param, username);
         JSONObject pageInfo = jsonObject.getJSONObject("pageInfo");
@@ -100,14 +96,14 @@ public class SceneController extends BaseController {
     }
 
     @PostMapping("/copyScene")
-    public Result copyScene(@RequestBody SceneParam param,@RequestHeader String token) throws Exception {
-        String username = JwtUtil.getUsername(token);
+    public Result copyScene(@RequestBody SceneParam param) throws Exception {
+        String username = JwtUtil.getUsername(getToken());
         sceneProService.copyScene(param.getSceneNum(),username);
         return Result.success();
     }
     @PostMapping("/delete")
     public Result delete(@RequestBody SceneParam param) throws Exception {
-        sceneProService.delete(param.getSceneNum());
+        sceneProService.delete(param.getSceneNum(),getUserId());
         return Result.success();
     }
 
@@ -116,7 +112,7 @@ public class SceneController extends BaseController {
      */
     @PostMapping("/checkDownload")
     public Result checkDownload(@RequestBody SceneParam param) throws Exception {
-        return Result.success( downService.checkDownLoad(param.getSceneNum()) );
+        return Result.success( downService.checkDownLoad(param.getSceneNum(),param.getIsObj()) );
     }
     /**
      * 校验该场景有无下载资格
@@ -124,9 +120,9 @@ public class SceneController extends BaseController {
      * @return
      */
     @PostMapping("/downloadScene")
-    public Result downloadScene(@RequestBody SceneParam param,@RequestHeader String token) throws Exception{
-        String username = JwtUtil.getUsername(token);
-        return Result.success(downService.down(param.getSceneNum(),username));
+    public Result downloadScene(@RequestBody SceneParam param) throws Exception{
+        String username = JwtUtil.getUsername(getToken());
+        return Result.success(downService.down(param.getSceneNum(),username,param.getIsObj()));
     }
 
     /**
@@ -137,7 +133,7 @@ public class SceneController extends BaseController {
     @PostMapping("/downloadProcess")
     public Result downloadProcess(@RequestBody SceneParam param) throws Exception{
         User user = userService.getByUserName(JwtUtil.getUsername(this.getToken()));
-        DownloadProcessVo downloadProcessVo = downService.downloadProcess(user.getId(), param.getSceneNum());
+        DownloadProcessVo downloadProcessVo = downService.downloadProcess(user.getId(), param.getSceneNum(),param.getIsObj());
         if(downloadProcessVo.getStatus() == DownloadStatusEnum.DOWNLOAD_FAILED_CODE){
             return Result.failure("下载失败!");
         }
@@ -163,6 +159,24 @@ public class SceneController extends BaseController {
         return sceneUpgradeToV4Service.getUpgradeToV4Progress(num);
     }
 
+    /**
+     *
+     * 分页查询存在houseType文件的场景
+     */
+    @PostMapping("/pageSceneWithHouseType")
+    public Result pageSceneWithHouseType(@RequestBody RequestScene param){
+        return scenePlusService.pageSceneWithHouseType(param,this.getToken());
+    }
+
+    /**
+     *
+     * 根据场景码返回ar路径
+     */
+    @GetMapping("/getArPathByNum")
+    public Result getArPathByNum(@RequestParam(value = "num") String num){
+        return scenePlusService.getArPathByNum(num);
+    }
+
 
 
 }

+ 16 - 11
src/main/java/com/fdkankan/ucenter/controller/SceneCooperationController.java

@@ -2,17 +2,19 @@ package com.fdkankan.ucenter.controller;
 
 import com.dtflys.forest.annotation.Post;
 import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.entity.SceneCooperation;
 import com.fdkankan.ucenter.service.ISceneCooperationService;
 import com.fdkankan.ucenter.vo.request.SceneCooperationParam;
 import com.fdkankan.ucenter.vo.request.SceneParam;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 @RestController
 @RequestMapping("/ucenter/user/scene/cooperation")
-public class SceneCooperationController {
+public class SceneCooperationController extends BaseController {
 
     @Autowired
     ISceneCooperationService sceneCooperationService;
@@ -23,14 +25,14 @@ public class SceneCooperationController {
     }
 
     @PostMapping("/cooperationSceneListNew")
-    public Result cooperationSceneListNew(@RequestBody SceneParam param,@RequestHeader  String token){
-        String username = JwtUtil.getUsername(token);
+    public Result cooperationSceneListNew(@RequestBody SceneParam param){
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(sceneCooperationService.cooperationSceneListNew(param,username));
     }
 
     @PostMapping("/cooperationSceneList")
-    public Result cooperationSceneList(@RequestBody SceneParam param,@RequestHeader  String token){
-        String username = JwtUtil.getUsername(token);
+    public Result cooperationSceneList(@RequestBody SceneParam param){
+        String username = JwtUtil.getUsername(getToken());
         if(username == null){
             return Result.success();
         }
@@ -38,8 +40,8 @@ public class SceneCooperationController {
     }
 
     @PostMapping("/onlyCooperationSceneList")
-    public Result onlyCooperationSceneList(@RequestBody SceneParam param,@RequestHeader  String token){
-        String username = JwtUtil.getUsername(token);
+    public Result onlyCooperationSceneList(@RequestBody SceneParam param){
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(sceneCooperationService.cooperationSceneListNew(param,username));
     }
 
@@ -50,8 +52,11 @@ public class SceneCooperationController {
      * resourceIds      场景资源id集合,逗号隔开
      */
     @PostMapping("/save")
-    public Result save(@RequestBody SceneCooperationParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result save(@RequestBody SceneCooperationParam param){
+        String username = JwtUtil.getUsername(getToken());
+        if(StringUtils.isNotBlank(getLang())){
+            param.setLang(getLang());
+        }
         sceneCooperationService.saveCooperation(param,username);
         return Result.success();
     }
@@ -60,8 +65,8 @@ public class SceneCooperationController {
      * sceneNum         场景码
      */
     @PostMapping("/delete")
-    public Result delete(@RequestBody SceneCooperationParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result delete(@RequestBody SceneCooperationParam param){
+        String username = JwtUtil.getUsername(getToken());
         sceneCooperationService.deleteCooperation(param,username);
         return Result.success();
     }

+ 21 - 0
src/main/java/com/fdkankan/ucenter/controller/SceneDelLogController.java

@@ -0,0 +1,21 @@
+package com.fdkankan.ucenter.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-03-15
+ */
+@RestController
+@RequestMapping("/ucenter/sceneDelLog")
+public class SceneDelLogController {
+
+}
+

+ 95 - 11
src/main/java/com/fdkankan/ucenter/controller/TestController.java

@@ -3,34 +3,38 @@ package com.fdkankan.ucenter.controller;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.common.util.SecurityUtil;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.util.RedisUtil;
-import com.fdkankan.ucenter.common.OssPath;
-import com.fdkankan.ucenter.common.RedisKeyUtil;
-import com.fdkankan.ucenter.common.Result;
-import com.fdkankan.ucenter.entity.ScenePlus;
-import com.fdkankan.ucenter.entity.ScenePlusExt;
-import com.fdkankan.ucenter.entity.ScenePro;
-import com.fdkankan.ucenter.entity.SceneProRe;
+import com.fdkankan.sms.SmsService;
+import com.fdkankan.ucenter.common.*;
+import com.fdkankan.ucenter.entity.*;
 import com.fdkankan.ucenter.service.*;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import javax.servlet.http.HttpSession;
+import java.io.File;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
+import java.util.*;
 
 @RestController
+@Slf4j
 @RequestMapping("/ucenter/test")
-public class TestController {
+public class TestController extends BaseController {
     @Autowired
     private IFolderSceneService folderSceneService;
     @Autowired
@@ -43,6 +47,8 @@ public class TestController {
     IScenePlusExtService scenePlusExtService;
     @Autowired
     ISceneProReService sceneProReService;
+    @Autowired
+    IUserIncrementService userIncrementService;
 
     @RequestMapping("/_updateViewCount_test")
     public Result updateViewCount() throws Exception {
@@ -62,4 +68,82 @@ public class TestController {
         return Result.success( );
     }
 
+    @GetMapping("checkIncrement")
+    public Result checkIncrement() throws Exception {
+        List<UserIncrement> list = userIncrementService.list();
+        userIncrementService.lockScene(list);
+        return Result.success();
+    }
+
+
+        @RequestMapping("/sendMail")
+    public Result sendMail() throws Exception {
+        return Result.success( );
+    }
+    @Autowired
+    IMailTemplateService mailTemplateService;
+
+    @GetMapping("/sendMail1")
+    public Result sendMail1(@RequestParam(required = false)String userName) throws Exception {
+        //luomin@cgaii.com
+        Integer[] days ={-1,0,30};
+        for (Integer day : days) {
+            if(day == null || day<0){
+                mailTemplateService.sendPeExMail(userName);
+                continue;
+            }
+            if(day > 0){
+                mailTemplateService.sendPeNoExMail(userName,day);
+                continue;
+            }
+            mailTemplateService.sendPeTodayExMail(userName);
+        }
+        return Result.success( );
+    }
+
+    @GetMapping("/sendMail2")
+    public Result sendMail2(@RequestParam(required = false)String userName) throws Exception {
+        //luomin@cgaii.com
+        mailTemplateService.sendCodeMail(userName,"123456","en");
+        mailTemplateService.sendCodeMail(userName,"123456","zh");
+        return Result.success( );
+    }
+    @Autowired
+    SmsService smsService;
+    @GetMapping("/sendMail3")
+    public Result sendMail3(@RequestParam(required = false)String userName) throws Exception {
+        //luomin@cgaii.com
+        String cnCode = "SMS_216275556";
+        String expireCode = "SMS_216425565";
+        smsService.sendSms(userName, "{\"time\":\"" + 1 + "\"}", expireCode);
+        smsService.sendSms(userName, "{\"time\":\"" + 1 + "\"}", cnCode);
+        return Result.success( );
+    }
+    @GetMapping("/test1")
+    public Result test1(@RequestParam(required = false)String userName) throws Exception {
+        //luomin@cgaii.com
+        String path = "/mnt/4Dkankan/scene/images/imagest-eur-09XfNdBCB";
+        if(path.contains("images")){
+            String panPath = path +"/panorama";
+            File file = new File(panPath);
+            if(file.exists()){
+                File[] files = file.listFiles();
+                if(files == null || files.length == 0){
+                    return Result.success( );
+                }
+                for (File file1 : files) {
+                    String linkPath =file1.getPath() + "/capture";
+                    log.info("delLink--filePath:{},exists:{}",linkPath,new File(linkPath).exists());
+                    org.apache.commons.io.FileUtils.deleteQuietly(new File(linkPath));
+                        //FileUtil.del(linkPath);
+                }
+            }
+        }
+        return Result.success( );
+    }
+
+    public static void main(String[] args) {
+        System.out.println(SecurityUtil.MD5("EFG?\u0015\u001A\u001F\u0015\u001A"));
+    }
+
 }

+ 21 - 19
src/main/java/com/fdkankan/ucenter/controller/UserController.java

@@ -2,6 +2,8 @@ package com.fdkankan.ucenter.controller;
 
 import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.common.util.SecurityUtil;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.service.IUserService;
 import com.fdkankan.ucenter.service.impl.LoginService;
@@ -17,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
  */
 @RestController
 @RequestMapping("/ucenter/user")
-public class UserController {
+public class UserController extends BaseController {
 
     @Autowired
     private IUserService userService;
@@ -34,8 +36,8 @@ public class UserController {
      * 获取用户信息
      */
     @RequestMapping(value = "/getUserInfo", method = RequestMethod.POST)
-    public Result getUserInfo( @RequestHeader String token) throws Exception {
-        String username = JwtUtil.getUsername(token);
+    public Result getUserInfo() {
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(userService.getUserInfo(username));
     }
 
@@ -53,8 +55,8 @@ public class UserController {
      * imgdata 图片的base64码
      */
     @RequestMapping(value = "/uploadHead", method = RequestMethod.POST)
-    public Result uploadHead(@RequestBody JSONObject jsonObject, @RequestHeader String token) throws Exception {
-        String username = JwtUtil.getUsername(token);
+    public Result uploadHead(@RequestBody JSONObject jsonObject) throws Exception {
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(userService.uploadHead(jsonObject.getString("imgdata"),username));
     }
 
@@ -68,8 +70,8 @@ public class UserController {
      * shipMobile       收货人手机
      */
     @RequestMapping(value = "/insertAddress", method = RequestMethod.POST)
-    public Result insertAddress(@RequestBody ShipAddressParam param, @RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result insertAddress(@RequestBody ShipAddressParam param){
+        String username = JwtUtil.getUsername(getToken());
         userService.insertAddress(param,username);
         return Result.success();
     }
@@ -87,8 +89,8 @@ public class UserController {
      */
     @RequestMapping(value = "/updateAddress", method = RequestMethod.POST)
 
-    public Result updateAddress(@RequestBody ShipAddressParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result updateAddress(@RequestBody ShipAddressParam param){
+        String username = JwtUtil.getUsername(getToken());
         userService.updateAddress(param,username);
         return Result.success();
     }
@@ -106,8 +108,8 @@ public class UserController {
      * email        邮箱地址
      */
     @RequestMapping(value = "/updateEmail", method = RequestMethod.POST)
-    public Result updateEmail(@RequestBody UserParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result updateEmail(@RequestBody UserParam param){
+        String username = JwtUtil.getUsername(getToken());
         userService.updateEmail(param.getEmail(),username);
         return Result.success();
     }
@@ -116,8 +118,8 @@ public class UserController {
      * 获取用户默认收货信息
      */
     @RequestMapping(value = "/getReceiverInfo", method = RequestMethod.POST)
-    public Result getReceiverInfo(@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result getReceiverInfo(){
+        String username = JwtUtil.getUsername(getToken());
         return  Result.success(userService.getReceiverInfo(username));
     }
 
@@ -125,8 +127,8 @@ public class UserController {
      * 获取用户收货信息列表
      */
     @RequestMapping(value = "/getReceiverList", method = RequestMethod.POST)
-    public Result getReceiverList(@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result getReceiverList(){
+        String username = JwtUtil.getUsername(getToken());
         return Result.success(userService.getReceiverList(username));
     }
 
@@ -135,8 +137,8 @@ public class UserController {
      * nickName     用户昵称
      */
     @RequestMapping(value = "/updateNickName", method = RequestMethod.POST)
-    public Result updateNickName(@RequestBody UserParam param,@RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result updateNickName(@RequestBody UserParam param){
+        String username = JwtUtil.getUsername(getToken());
         userService.updateNickName(param.getNickName(),username);
         return Result.success();
     }
@@ -147,8 +149,8 @@ public class UserController {
      * isNotice     isNotice
      */
     @RequestMapping(value = "/updateUserDetail", method = RequestMethod.POST)
-    public Result updateUserDetail(@RequestBody UserParam param, @RequestHeader String token){
-        String username = JwtUtil.getUsername(token);
+    public Result updateUserDetail(@RequestBody UserParam param){
+        String username = JwtUtil.getUsername(getToken());
         userService.updateUserDetail(param,username);
         return Result.success();
     }

+ 10 - 9
src/main/java/com/fdkankan/ucenter/controller/VirtualOrderController.java

@@ -3,6 +3,7 @@ package com.fdkankan.ucenter.controller;
 
 import com.dtflys.forest.annotation.Post;
 import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.service.IDownloadOrderService;
 import com.fdkankan.ucenter.service.IExpansionOrderService;
@@ -23,7 +24,7 @@ import org.springframework.web.bind.annotation.*;
  */
 @RestController
 @RequestMapping("/ucenter/user/virtualOrder")
-public class VirtualOrderController {
+public class VirtualOrderController extends BaseController {
 
     @Autowired
     IIncrementOrderService incrementOrderService;
@@ -39,8 +40,8 @@ public class VirtualOrderController {
      * 获取会员权益记录
      */
     @PostMapping("/incrementOrderList")
-    public Result incrementOrderList(@RequestBody IncrementOrderParam param, @RequestHeader String token){
-        param.setUserName(JwtUtil.getUsername(token));
+    public Result incrementOrderList(@RequestBody IncrementOrderParam param){
+        param.setUserName(JwtUtil.getUsername(getToken()));
         return Result.success(incrementOrderService.pageList(param));
     }
 
@@ -48,8 +49,8 @@ public class VirtualOrderController {
      * 获取用户下载订单
      */
     @PostMapping("/downloadOrderList")
-    public Result downloadOrderList(@RequestBody IncrementOrderParam param, @RequestHeader String token){
-        param.setUserName(JwtUtil.getUsername(token));
+    public Result downloadOrderList(@RequestBody IncrementOrderParam param){
+        param.setUserName(JwtUtil.getUsername(getToken()));
         return Result.success(downloadOrderService.pageList(param));
     }
 
@@ -57,8 +58,8 @@ public class VirtualOrderController {
      * 获取用户充值记录
      */
     @PostMapping("/chargeList")
-    public Result chargeList(@RequestBody VirtualOrderParam param, @RequestHeader String token){
-        param.setUserName(JwtUtil.getUsername(token));
+    public Result chargeList(@RequestBody VirtualOrderParam param){
+        param.setUserName(JwtUtil.getUsername(getToken()));
         return Result.success(virtualOrderService.pageList(param));
     }
 
@@ -66,8 +67,8 @@ public class VirtualOrderController {
      * 获取用户扩容记录
      */
     @PostMapping("/expansionList")
-    public Result expansionList(@RequestBody VirtualOrderParam param, @RequestHeader String token){
-        param.setUserName(JwtUtil.getUsername(token));
+    public Result expansionList(@RequestBody VirtualOrderParam param){
+        param.setUserName(JwtUtil.getUsername(getToken()));
         return Result.success(expansionOrderService.pageList(param));
     }
 

+ 2 - 2
src/main/java/com/fdkankan/ucenter/controller/api/FusionController.java

@@ -24,8 +24,8 @@ public class FusionController extends BaseController {
      */
     @PostMapping("/scene/list")
     public Result sceneList(@RequestBody SceneParam param){
-
-        return Result.success(fusionService.scenePageOnlyV4List(param,getToken()));
+        String token = request.getHeader("token");
+        return Result.success(fusionService.scenePageOnlyV4List(param,token));
     }
 
 

+ 14 - 9
src/main/java/com/fdkankan/ucenter/controller/api/LaserController.java

@@ -15,10 +15,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -43,7 +40,8 @@ public class LaserController extends BaseController {
      * 根据手机号码获取 相机 sncode
      */
     @RequestMapping(value = "/getSnCodeByPhone",method = RequestMethod.GET)
-    public Result getSnCodeByUserName(@RequestParam(required = false)String phone) throws Exception {
+    public Result getSnCodeByUserName(@RequestParam(required = false)String phone,
+                                      @RequestParam(required = false,defaultValue = "4")Integer sceneSource) throws Exception {
         List<Long> userIds = userService.getLikeUserName(phone);
         HashMap<String,Object> map = new HashMap<>();
         Set<String> snCodeSet = new HashSet<>();
@@ -52,10 +50,17 @@ public class LaserController extends BaseController {
         if(userIds.size() <=0){
             return Result.success(map);
         }
-
-        List<CameraAppVo> camera = cameraDetailService.getListByUserIdsAndType(userIds, 10);
-        snCodeSet = camera.stream().map(CameraAppVo::getSnCode).collect(Collectors.toSet());
-        map.put("snCodes",snCodeSet);
+        List<CameraAppVo> camera = new ArrayList<>();
+        if(sceneSource == 4){
+            camera = cameraDetailService.getListByUserIdsAndType(userIds, 10);
+        }
+        if(sceneSource == 5){
+            camera = cameraDetailService.getListByUserIdsAndType(userIds, 11);
+        }
+        if(camera.size() >0){
+            snCodeSet = camera.stream().map(CameraAppVo::getSnCode).collect(Collectors.toSet());
+            map.put("snCodes",snCodeSet);
+        }
         return Result.success(map);
     }
 

+ 5 - 5
src/main/java/com/fdkankan/ucenter/controller/api/MangeApiController.java

@@ -1,5 +1,7 @@
 package com.fdkankan.ucenter.controller.api;
 
+import com.fdkankan.common.util.SecurityUtil;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.ResultData;
 import com.fdkankan.ucenter.service.ISceneProService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -7,16 +9,14 @@ import org.springframework.web.bind.annotation.*;
 
 @RestController
 @RequestMapping("/ucenter/_manage")
-public class MangeApiController {
+public class MangeApiController extends BaseController {
 
     @Autowired
     ISceneProService sceneProService;
 
     @GetMapping("/_copy_scene")
-    public ResultData copyScene(@RequestParam(required = false) String num,
-                                @RequestHeader String sign) throws Exception {
-
-        if(!sign.equals("m_a_n_a_g_e")){
+    public ResultData copyScene(@RequestParam(required = false) String num) throws Exception {
+        if(!"m_a_n_a_g_e".equals(getSign())){
             return ResultData.error(-1,"无权过问");
         }
         sceneProService.copySceneNoCheck(num);

+ 6 - 6
src/main/java/com/fdkankan/ucenter/controller/api/VoidController.java

@@ -1,6 +1,7 @@
 package com.fdkankan.ucenter.controller.api;
 
 import com.alibaba.fastjson.JSONObject;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.service.IScenePlusVoidService;
 import com.fdkankan.ucenter.vo.request.SceneParam;
@@ -16,7 +17,7 @@ import java.util.List;
 
 @RestController
 @RequestMapping("/ucenter/void")
-public class VoidController {
+public class VoidController extends BaseController {
 
     @Autowired
     IScenePlusVoidService scenePlusVoidService;
@@ -28,10 +29,9 @@ public class VoidController {
      */
     @GetMapping("/scene/status")
     public Result setStatus(@RequestParam(required = false) String  num,
-                            @RequestParam(required = false) Integer type,
-                            @RequestHeader String token){
+                            @RequestParam(required = false) Integer type){
 
-        scenePlusVoidService.setStatus(num,type,token);
+        scenePlusVoidService.setStatus(num,type,getToken());
         return Result.success();
     }
 
@@ -39,8 +39,8 @@ public class VoidController {
      * 只需获取v4场景数据,无需文件夹
      */
     @PostMapping("/scene/list")
-    public Result sceneList(@RequestBody SceneParam param, @RequestHeader String token){
-        List<ScenePlusVo> scenePlusVos = scenePlusVoidService.scenePageList(param, token);
+    public Result sceneList(@RequestBody SceneParam param){
+        List<ScenePlusVo> scenePlusVos = scenePlusVoidService.scenePageList(param,getToken() );
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("list",scenePlusVos);
         return Result.success(jsonObject);

+ 18 - 3
src/main/java/com/fdkankan/ucenter/controller/app/AppCameraController.java

@@ -2,8 +2,10 @@ package com.fdkankan.ucenter.controller.app;
 
 import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.ucenter.common.Result;
+import com.fdkankan.ucenter.common.ResultData;
 import com.fdkankan.ucenter.constant.LoginConstant;
 import com.fdkankan.ucenter.service.impl.AppCameraService;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.ObjectUtils;
 import org.springframework.web.bind.annotation.*;
@@ -13,6 +15,7 @@ import java.util.concurrent.CompletableFuture;
 
 @RestController
 @RequestMapping("/ucenter/app/camera")
+@Slf4j
 public class AppCameraController {
 
     @Autowired
@@ -22,7 +25,9 @@ public class AppCameraController {
     public Result getCamerasForUser(@RequestBody JSONObject param ){
         String userName = param.get("userName") == null ? null : param.getString("userName");
         Integer cameraType = param.get("cameraType") == null ? 4 : param.getInteger("cameraType");
-
+        if(cameraType == 4){
+            cameraType = 1;
+        }
         return Result.success(appCameraService.getCameraForUser(userName,cameraType));
     }
 
@@ -65,10 +70,20 @@ public class AppCameraController {
                 || !param.containsKey("appVersion")) {
             return Result.failure(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
         }
-        CompletableFuture.runAsync(() -> {
+        try {
             appCameraService.uploadUserCameraInfo(param.get("snCode"),param.get("cameraVersion"),param.get("appVersion"));
-        });
+        }catch ( Exception e){
+            log.error("uploadUserCameraInfo--snCode:{},cameraVersion:{},appVersion:{},error:{}",
+                    param.get("snCode"),param.get("cameraVersion"),param.get("appVersion"),e);
+        }
+
         return Result.success();
     }
 
+    @GetMapping("/checkCameraSpace")
+    public Result checkCameraSpace(@RequestParam(required = false) String snCode,
+                                   @RequestParam(required = false) String unicode){
+
+        return Result.success( appCameraService.checkCameraSpace(snCode,unicode));
+    }
 }

+ 4 - 3
src/main/java/com/fdkankan/ucenter/controller/app/AppController.java

@@ -2,6 +2,7 @@ package com.fdkankan.ucenter.controller.app;
 
 import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.service.impl.AppService;
 import com.fdkankan.ucenter.service.impl.LoginService;
@@ -14,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
 
 @RestController
 @RequestMapping("/ucenter/sso/app")
-public class AppController {
+public class AppController extends BaseController {
 
     @Autowired
     private AppService appService;
@@ -77,8 +78,8 @@ public class AppController {
      * 登出
      */
     @RequestMapping(value = "/logout", method = RequestMethod.POST)
-    public Result logout(@RequestHeader String token) {
-        appService.logout(token);
+    public Result logout() {
+        appService.logout(getToken());
         return Result.success();
     }
 

+ 6 - 2
src/main/java/com/fdkankan/ucenter/controller/app/AppSceneController.java

@@ -1,6 +1,7 @@
 package com.fdkankan.ucenter.controller.app;
 
 import com.alibaba.fastjson.JSONObject;
+import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.service.ISceneProService;
 import com.fdkankan.ucenter.service.impl.AppSceneService;
@@ -14,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 @RestController
 @RequestMapping("/ucenter/app/scene")
-public class AppSceneController {
+public class AppSceneController extends BaseController {
 
     @Autowired
     AppSceneService appSceneService;
@@ -24,6 +25,9 @@ public class AppSceneController {
      */
     @PostMapping("/getAppAllSceneByPage")
     public Result getAppAllSceneByPage(@RequestBody AppSceneParam param){
+        if(param.getCameraType() == 4){
+            param.setCameraType(1);
+        }
         return Result.success( appSceneService.pageList(param));
     }
 
@@ -60,7 +64,7 @@ public class AppSceneController {
     public Result deleteForCameraName(@RequestBody JSONObject param){
         Long cameraId = param.get("cameraId") == null ? null : param.getLong("cameraId");
         String sceneNum = param.get("sceneNum") == null ? null : param.getString("sceneNum");
-        appSceneService.deleteForCameraName(cameraId,sceneNum);
+        appSceneService.deleteForCameraName(cameraId,sceneNum,getUserId());
         return Result.success();
     }
 }

+ 3 - 0
src/main/java/com/fdkankan/ucenter/controller/app/AppUserController.java

@@ -28,6 +28,9 @@ public class AppUserController {
     public Result getUserInfo(@RequestBody JSONObject param){
         String phoneNum = param.get("phoneNum") == null ? null : param.getString("phoneNum");
         Integer cameraType = param.get("cameraType") == null ? 4 : param.getInteger("cameraType");
+        if(cameraType == 4){
+            cameraType = 1;
+        }
         return Result.success( appUserService.getUserInfo(phoneNum,cameraType));
     }
 

+ 2 - 2
src/main/java/com/fdkankan/ucenter/controller/app/InvoiceController.java

@@ -93,8 +93,8 @@ public class InvoiceController extends BaseController {
      * @return
      */
     @RequestMapping(value = "/open", method = RequestMethod.POST)
-    public Result open(@RequestBody InvoiceParam param, @RequestHeader String token) throws Exception {
-        return Result.success(invoiceService.openInvoice( param,token));
+    public Result open(@RequestBody InvoiceParam param) throws Exception {
+        return Result.success(invoiceService.openInvoice( param,getToken()));
     }
 
 }

+ 8 - 6
src/main/java/com/fdkankan/ucenter/controller/app/SceneApiController.java

@@ -31,6 +31,7 @@ import com.fdkankan.ucenter.vo.response.LoginVo;
 import com.fdkankan.ucenter.vo.response.SceneInfoVo;
 import com.fdkankan.ucenter.vo.response.UserVo;
 import java.io.File;
+import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.*;
 import javax.servlet.http.HttpServletRequest;
@@ -109,8 +110,9 @@ public class SceneApiController extends BaseController {
         String childName = request.getParameter("childName");
         String lang = request.getParameter("lang");
         String vlog = request.getParameter("vlog");
-        log.info("goEditScenePage---param--phoneNum:{},password:{},sceneNum:{},childName:{},lang:{},vlog:{}",
-                phoneNum,password,sceneNum,childName,lang,vlog);
+        String pad = request.getParameter("pad");
+        log.info("goEditScenePage---param--phoneNum:{},password:{},sceneNum:{},childName:{},lang:{},vlog:{},pad:{}",
+                phoneNum,password,sceneNum,childName,lang,vlog,pad);
 
         ScenePro scene = sceneProService.getByNum(sceneNum);
         ScenePlus scenePlus = null;
@@ -141,7 +143,7 @@ public class SceneApiController extends BaseController {
                     BeanUtils.copyProperties(dbUser,user);
                 }
 
-                sendResponse(user,webSite, request,response,sceneNum,lang,vlog);
+                sendResponse(user,webSite, request,response,sceneNum,lang,vlog, pad);
             }
         }
 
@@ -175,12 +177,12 @@ public class SceneApiController extends BaseController {
         if(!SecurityUtil.MD5(password).equals(ssoUser.getPassword())) {
             throw new BusinessException(LoginConstant.FAILURE_CODE_3015, LoginConstant.FAILURE_MSG_3015);
         }
-        sendResponse(ssoUser,webSite, request,response,sceneNum,lang,vlog);
+        sendResponse(ssoUser,webSite, request,response,sceneNum,lang,vlog, pad);
 
     }
 
     private void sendResponse(UserVo user, String webSite, HttpServletRequest request,
-                              HttpServletResponse response, String sceneNum, String lang, String vlog) {
+                              HttpServletResponse response, String sceneNum, String lang, String vlog, String pad) {
         String token = loginService.redisLogin(user.getUserName(),JSONObject.toJSONString(user),"user");
         //登录成功
         String mainUrl = NacosProperty.getMainUrl();
@@ -199,7 +201,7 @@ public class SceneApiController extends BaseController {
             if(webSite.contains(sceneProV4Url)){
                  redirect = mainUrl + sceneProV4Url.replace("s", "e") +
                         sceneNum + "&t=" +System.currentTimeMillis() + "&token=" + token + "&app" +
-                        (lang == null ? "" : "&lang=" + lang) + (vlog == null ? "" : "&vlog=" + vlog);
+                        (lang == null ? "" : "&lang=" + lang) + (vlog == null ? "" : "&vlog=" + vlog) + (StrUtil.isEmpty(pad) ? "" : "&pad");
             }
 
             if(webSite.contains(sceneProNewUrl)) {

+ 11 - 4
src/main/java/com/fdkankan/ucenter/controller/fire/FdUserCameraController.java

@@ -50,6 +50,10 @@ public class FdUserCameraController extends BaseController {
             throw new BusinessException(-1,"缺少必要参数");
         }
         String snCode = param.getString("snCode");
+        String userName = param.getString("userName");
+        if(StringUtils.isEmpty(userName)){
+            userName = JwtUtil.getUsername(getToken());
+        }
         Camera cameraEntity = cameraService.getBySnCode(snCode);
         if(ObjectUtils.isEmpty(cameraEntity)){
             throw new BusinessException(CameraConstant.FAILURE_CODE_6020,CameraConstant.FAILURE_MSG_6020);
@@ -58,16 +62,16 @@ public class FdUserCameraController extends BaseController {
         if(ObjectUtils.isEmpty(cameraDetailEntity)){
             throw new BusinessException(CameraConstant.FAILURE_CODE_6020,CameraConstant.FAILURE_MSG_6020);
         }
-        if (ObjectUtils.isEmpty(cameraDetailEntity.getCompanyId())) {
-            throw new BusinessException(CameraConstant.FAILURE_CODE_6005, CameraConstant.FAILURE_MSG_6005);
-        }
+//        if (ObjectUtils.isEmpty(cameraDetailEntity.getCompanyId())) {
+//            throw new BusinessException(CameraConstant.FAILURE_CODE_6005, CameraConstant.FAILURE_MSG_6005);
+//        }
 
         if(cameraDetailEntity.getUserId() != null){
             throw new BusinessException(AppConstant.FAILURE_CODE_4011, AppConstant.FAILURE_MSG_4011);
         }
 
         // 绑定相机
-        cameraService.bind(cameraDetailEntity.getType(),cameraEntity.getSnCode(), JwtUtil.getUsername(getToken()));
+        cameraService.bind(cameraDetailEntity.getType(),cameraEntity.getSnCode(), userName);
 
         return Result.success();
     }
@@ -87,6 +91,9 @@ public class FdUserCameraController extends BaseController {
         List<CameraVo> list = new ArrayList<>();
         for (String childName : param.getChildNames()) {
             CameraVo vo = userService.findCameraDetailByChildName(getToken(), childName);
+            if(vo == null){
+                continue;
+            }
             vo.setUsedSpace(null);
             vo.setTotalSpace(null);
             list.add(vo);

+ 39 - 4
src/main/java/com/fdkankan/ucenter/controller/fire/FdUserSceneController.java

@@ -4,18 +4,22 @@ import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.JwtUtil;
 import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
+import com.fdkankan.ucenter.common.ResultData;
+import com.fdkankan.ucenter.constant.LoginConstant;
+import com.fdkankan.ucenter.entity.ScenePlus;
+import com.fdkankan.ucenter.entity.ScenePro;
+import com.fdkankan.ucenter.entity.User;
+import com.fdkankan.ucenter.service.IScenePlusService;
 import com.fdkankan.ucenter.service.ISceneProService;
 import com.fdkankan.ucenter.service.ISceneService;
 import com.fdkankan.ucenter.service.IUserService;
+import com.fdkankan.ucenter.service.impl.LoginService;
 import com.fdkankan.ucenter.vo.ResponseScene;
 import lombok.extern.log4j.Log4j2;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -28,6 +32,12 @@ public class FdUserSceneController extends BaseController {
 
     @Autowired
     private ISceneProService sceneProService;
+    @Autowired
+    private IScenePlusService scenePlusService;
+    @Autowired
+    private LoginService loginService;
+    @Autowired
+    private IUserService userService;
 
     /**
      * 获取场景详情
@@ -48,4 +58,29 @@ public class FdUserSceneController extends BaseController {
         log.info("火调返回数据:{}",sceneDetailList);
         return Result.success(sceneDetailList);
     }
+
+    @GetMapping("/getTokenByNum")
+    public ResultData getTokenByNum(@RequestParam(required = false) String num ){
+        if(StringUtils.isEmpty(num)){
+            throw new BusinessException(-1,"参数为空");
+        }
+        Long userId = null;
+        ScenePlus scenePlus = scenePlusService.getByNum(num);
+        if(scenePlus != null){
+            userId = scenePlus.getUserId();
+        }else {
+            ScenePro scenePro = sceneProService.getByNum(num);
+            if(scenePro != null){
+                userId = scenePro.getUserId();
+            }
+        }
+        if(userId == null){
+            throw new BusinessException(-1,"场景为空");
+        }
+        User user = userService.getById(userId);
+        if(user == null){
+            throw new BusinessException(LoginConstant.FAILURE_CODE_3015, LoginConstant.FAILURE_MSG_3015);
+        }
+        return ResultData.ok(loginService.login(user));
+    }
 }

+ 2 - 1
src/main/java/com/fdkankan/ucenter/controller/inner/InnerController.java

@@ -1,6 +1,7 @@
 package com.fdkankan.ucenter.controller.inner;
 
 import com.fdkankan.common.constant.ErrorCode;
+import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.ucenter.annotation.CheckInnerApiPermit;
 import com.fdkankan.ucenter.common.BaseController;
 import com.fdkankan.ucenter.common.Result;
@@ -89,7 +90,7 @@ public class InnerController extends BaseController {
     @GetMapping("/_getSceneNumVersion")
     public Result getSceneNumVersion(@RequestParam(required = false) String num){
         if(StringUtils.isBlank(num)){
-            throw new com.fdkankan.common.exception.BusinessException(ErrorCode.MISSING_REQUIRED_PARAMETERS);
+            throw new BusinessException(ErrorCode.MISSING_REQUIRED_PARAMETERS);
         }
         return Result.success(innerService.getSceneInfo(num));
     }

+ 2 - 0
src/main/java/com/fdkankan/ucenter/entity/CameraDetail.java

@@ -146,5 +146,7 @@ public class CameraDetail implements Serializable {
     @TableField("last_request_time")
     private Date lastRequestTime;
 
+    @TableField("unit")
+    private String unit;
 
 }

+ 63 - 0
src/main/java/com/fdkankan/ucenter/entity/CameraIncrementLog.java

@@ -0,0 +1,63 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2023-02-01
+ */
+@Getter
+@Setter
+@TableName("t_camera_increment_log")
+public class CameraIncrementLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 相机Id
+     */
+    @TableField("camera_id")
+    private Long cameraId;
+
+    /**
+     * 0 授权权益,1解除权益,2绑定相机,3解绑相机
+     */
+    @TableField("operation_type")
+    private Integer operationType;
+
+    /**
+     * 操作userId
+     */
+    @TableField("operation_user")
+    private Long operationUser;
+
+    /**
+     * 权益Id
+     */
+    @TableField("increment_id")
+    private Long incrementId;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 66 - 0
src/main/java/com/fdkankan/ucenter/entity/CameraType.java

@@ -0,0 +1,66 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-12
+ */
+@Getter
+@Setter
+@TableName("t_camera_type")
+public class CameraType implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 相机类型表
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 0 旧双目相机,1思维看看pro八目相机(看看),2看看lite,5指房宝,9双目转台(看见),10激光转台(深时),11激光转台(深光)
+     */
+    @TableField("camera_type")
+    private Integer cameraType;
+
+    /**
+     * 场景码前缀
+     */
+    @TableField("scene_prefix")
+    private String scenePrefix;
+
+    /**
+     * 相机WiFiname前缀
+     */
+    @TableField("wifi_name_prefix")
+    private String wifiNamePrefix;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("remark")
+    private String remark;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 108 - 0
src/main/java/com/fdkankan/ucenter/entity/Case.java

@@ -0,0 +1,108 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2023-08-11
+ */
+@Getter
+@Setter
+@TableName("t_case")
+public class Case implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 案例标题
+     */
+    @TableField("title")
+    private String title;
+
+    /**
+     * 案例文案
+     */
+    @TableField("sub_title")
+    private String subTitle;
+
+    @TableField("type_id")
+    private String typeId;
+
+    @TableField("icon_ids")
+    private String iconIds;
+
+    /**
+     * 排序字段
+     */
+    @TableField("sort")
+    private Integer sort;
+
+    /**
+     * 案例logo	
+     */
+    @TableField("logo")
+    private String logo;
+
+    /**
+     * 详情内容
+     */
+    @TableField("detail_content")
+    private String detailContent;
+
+    /**
+     * 详情图片
+     */
+    @TableField("cover_image_url")
+    private String coverImageUrl;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+    /**
+     * 是否发布,0否,1是
+     */
+    @TableField("is_public")
+    private Integer isPublic;
+
+    /**
+     * 发布时间
+     */
+    @TableField("public_time")
+    private Date publicTime;
+
+    @TableField("language")
+    private String language;
+
+    /**
+     * 是否显示,0否,1是
+     */
+    @TableField("is_show")
+    private Integer isShow;
+
+    @TableField("sys_user_id")
+    private Integer sysUserId;
+
+
+}

+ 1 - 1
src/main/java/com/fdkankan/ucenter/entity/CommerceOrder.java

@@ -63,7 +63,7 @@ public class CommerceOrder implements Serializable {
      * 交易时间
      */
     @TableField("trade_time")
-    private Date tradeTime;
+    private String tradeTime;
 
     /**
      * 用户表t_user的id

+ 110 - 0
src/main/java/com/fdkankan/ucenter/entity/Company.java

@@ -0,0 +1,110 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 客户企业logo信息
+ * </p>
+ *
+ * @author 
+ * @since 2021-12-24
+ */
+@Getter
+@Setter
+@ToString
+@TableName("t_company")
+public class Company implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 公司名称
+     */
+    @TableField("company_name")
+    private String companyName;
+
+    /**
+     * 顶部logo
+     */
+    @TableField("top_logo")
+    private String topLogo;
+
+    /**
+     * 地面logo
+     */
+    @TableField("floor_logo")
+    private String floorLogo;
+
+    /**
+     * 地面点位logo
+     */
+    @TableField("marker_logo")
+    private String markerLogo;
+
+    /**
+     * 二维码logo
+     */
+    @TableField("qr_logo")
+    private String qrLogo;
+
+    /**
+     * 是否显示初始logo,0隐藏,1显示
+     */
+    @TableField("show_logo")
+    private Integer showLogo;
+
+    /**
+     * 新增的相机是否注册,0否,1删
+     */
+    @TableField("camera_delete")
+    private Integer cameraDelete;
+
+    /**
+     * 数据同步类型
+     */
+    @TableField("data_sync")
+    private String dataSync;
+
+//    /**
+//     * 数据同步方式
+//     */
+//    @TableField("data_sync_action")
+//    private Integer dataSyncAction;
+
+    @TableField("calculate_flexibility")
+    private Boolean calculateFlexibility;
+
+    /**
+     * 创建时间
+     */
+    @TableField("create_time")
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    @TableField("update_time")
+    private Date updateTime;
+
+
+    @TableField("scene_version")
+    private String sceneVersion;
+
+    /**
+     * A正常,I删除
+     */
+    @TableField("rec_status")
+    @TableLogic("A")
+    private String recStatus;
+
+}

+ 6 - 1
src/main/java/com/fdkankan/ucenter/entity/DownloadOrder.java

@@ -69,7 +69,7 @@ public class DownloadOrder implements Serializable {
      * 交易时间
      */
     @TableField("trade_time")
-    private Date tradeTime;
+    private String tradeTime;
 
     /**
      * 用户表t_user的id
@@ -120,5 +120,10 @@ public class DownloadOrder implements Serializable {
     @TableField("scene_name")
     private String sceneName;
 
+    /**
+     * 下单时区差 ,单位分钟
+     */
+    @TableField("time_zone_off")
+    private Integer timeZoneOff;
 
 }

+ 77 - 0
src/main/java/com/fdkankan/ucenter/entity/ExceedSpaceScene.java

@@ -0,0 +1,77 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 超出容量场景码表
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-30
+ */
+@Getter
+@Setter
+@TableName("t_exceed_space_scene")
+public class ExceedSpaceScene implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 场景码
+     */
+    @TableField("num")
+    private String num;
+
+    /**
+     * 初次上传用户id
+     */
+    @TableField("user_id")
+    private Long userId;
+
+    /**
+     * 相机id
+     */
+    @TableField("camera_id")
+    private Long cameraId;
+
+    @TableField("file_id")
+    private String fileId;
+
+    @TableField("unicode")
+    private String unicode;
+
+
+    /**
+     * 创建时间
+     */
+    @TableField("create_time")
+    private Date createTime;
+
+    /**
+     * 修改时间
+     */
+    @TableField("update_time")
+    private Date updateTime;
+
+    /**
+     * A-有效,I-无效
+     */
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("version")
+    private String version;
+}

+ 1 - 1
src/main/java/com/fdkankan/ucenter/entity/ExpansionOrder.java

@@ -69,7 +69,7 @@ public class ExpansionOrder implements Serializable {
      * 交易时间
      */
     @TableField("trade_time")
-    private Date tradeTime;
+    private String tradeTime;
 
     /**
      * 用户表t_user的id

+ 5 - 0
src/main/java/com/fdkankan/ucenter/entity/Goods.java

@@ -34,6 +34,11 @@ public class Goods implements Serializable {
      */
     @TableField("name")
     private String name;
+    /**
+     * 商品名称
+     */
+    @TableField("name_en")
+    private String nameEn;
 
     /**
      * 商品描述

+ 7 - 1
src/main/java/com/fdkankan/ucenter/entity/IncrementOrder.java

@@ -69,7 +69,7 @@ public class IncrementOrder implements Serializable {
      * 交易时间
      */
     @TableField("trade_time")
-    private Date tradeTime;
+    private String tradeTime;
 
     /**
      * 用户表t_user的id
@@ -123,5 +123,11 @@ public class IncrementOrder implements Serializable {
     @TableField("member_levels")
     private String memberLevels;
 
+    /**
+     * 下单时区差 ,单位分钟
+     */
+    @TableField("time_zone_off")
+    private Integer timeZoneOff;
+
 
 }

+ 72 - 6
src/main/java/com/fdkankan/ucenter/entity/IncrementType.java

@@ -17,7 +17,7 @@ import lombok.Setter;
  * </p>
  *
  * @author 
- * @since 2022-08-01
+ * @since 2023-06-19
  */
 @Getter
 @Setter
@@ -35,6 +35,9 @@ public class IncrementType implements Serializable {
     @TableField("name")
     private String name;
 
+    /**
+     * member会员,freeMember免费会员
+     */
     @TableField("type")
     private String type;
 
@@ -43,8 +46,9 @@ public class IncrementType implements Serializable {
      */
     @TableField("download_num")
     private Integer downloadNum;
+
     /**
-     * 下载次数,-1代表无限次
+     * 下载价格
      */
     @TableField("download_price")
     private BigDecimal downloadPrice;
@@ -56,6 +60,12 @@ public class IncrementType implements Serializable {
     private Integer cameraCapacity;
 
     /**
+     * 相机容量单位
+     */
+    @TableField("camera_space")
+    private Integer cameraSpace;
+
+    /**
      * 购买之后,有效期天数,-1代表无限制
      */
     @TableField("valid_time")
@@ -79,15 +89,71 @@ public class IncrementType implements Serializable {
     @TableField("symbol")
     private String symbol;
 
-    @TableField("create_time")
-    private String createTime;
+    /**
+     * 自定义logo
+     */
+    @TableField("custom_logo")
+    private Boolean customLogo;
 
-    @TableField("update_time")
-    private String updateTime;
+    /**
+     * 自定义热点样式
+     */
+    @TableField("custom_style")
+    private Boolean customStyle;
+    /**
+     * 带看
+     */
+    @TableField("custom_take_look")
+    private Boolean customTakeLook;
+
+    /**
+     * 空间贴图
+     */
+    @TableField("custom_image")
+    private Boolean customImage;
+
+    /**
+     * 三维模型
+     */
+    @TableField("custom_model")
+    private Boolean customModel;
+
+    /**
+     * 场景美化调节
+     */
+    @TableField("custom_scene")
+    private Boolean customScene;
+
+    /**
+     * 场景复制
+     */
+    @TableField("custom_copy")
+    private Boolean customCopy;
+
+    /**
+     * 场景计算
+     */
+    @TableField("custom_modeling")
+    private Integer customModeling;
+
+    /**
+     * 场景下载
+     */
+    @TableField("custom_down")
+    private Integer customDown;
 
     @TableField("rec_status")
     @TableLogic(value = "A",delval = "I")
     private String recStatus;
 
+    @TableField("create_time")
+    private Date createTime;
+
+    /**
+     * 权益价格
+     */
+    @TableField("update_time")
+    private Date updateTime;
+
 
 }

+ 90 - 0
src/main/java/com/fdkankan/ucenter/entity/MailTemplate.java

@@ -0,0 +1,90 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2023-01-10
+ */
+@Getter
+@Setter
+@TableName("t_mail_template")
+public class MailTemplate implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 发件人邮箱
+     */
+    @TableField("send_mail")
+    private String sendMail;
+
+    /**
+     * 发件人邮箱密码
+     */
+    @TableField("send_password")
+    private String sendPassword;
+
+    /**
+     * 发件人主机
+     */
+    @TableField("send_host")
+    private String sendHost;
+
+    /**
+     * 收件主题
+     */
+    @TableField("subject")
+    private String subject;
+
+    /**
+     * 邮件内容
+     */
+    @TableField("msg")
+    private String msg;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+    /**
+     * 备注
+     */
+    @TableField("remark")
+    private String remark;
+
+    /**
+     * 0订单发票,1深时演示场景,2验证码,3权益会员过期
+     */
+    @TableField("type")
+    private Integer type;
+
+    /**
+     * zh 中文,en英文
+     */
+    @TableField("lang")
+    private String lang;
+
+
+}

+ 1 - 1
src/main/java/com/fdkankan/ucenter/entity/Order.java

@@ -39,7 +39,7 @@ public class Order implements Serializable {
      * 下单时间
      */
     @TableField("order_time")
-    private Date orderTime;
+    private String orderTime;
 
     /**
      * 交易号

+ 64 - 0
src/main/java/com/fdkankan/ucenter/entity/SceneDelLog.java

@@ -0,0 +1,64 @@
+package com.fdkankan.ucenter.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2023-03-15
+ */
+@Getter
+@Setter
+@TableName("t_scene_del_log")
+public class SceneDelLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 场景删除日志
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 文件夹Id
+     */
+    @TableField("folder_id")
+    private Integer folderId;
+
+    /**
+     * 场景码
+     */
+    @TableField("num")
+    private String num;
+
+    /**
+     * 操作人Id
+     */
+    @TableField("user_id")
+    private Long userId;
+
+    /**
+     * 操作人Id
+     */
+    @TableField("sys_user_id")
+    private Long sysUserId;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 37 - 0
src/main/java/com/fdkankan/ucenter/entity/SceneEditControls.java

@@ -88,6 +88,31 @@ public class SceneEditControls implements Serializable {
     @TableField("show_rule")
     private Integer showRule;
 
+
+    /**
+     * 是否展示标尺(0-不需要,1-需要)
+     */
+    @TableField("show_scale")
+    private Integer showScale;
+
+    /**
+     * 是否展示分享场景(0-不需要,1-需要)
+     */
+    @TableField("show_share")
+    private Integer showShare;
+
+    /**
+     * 是否展示分享热点(0-不需要,1-需要)
+     */
+    @TableField("show_tagshare")
+    private Integer showTagshare;
+
+    /**
+     * 是否展示合照开关(0-不需要,1-需要)
+     */
+    @TableField("show_capture")
+    private Integer showCapture;
+
     /**
      * 创建时间
      */
@@ -107,4 +132,16 @@ public class SceneEditControls implements Serializable {
     @TableField("rec_status")
     @TableLogic(value = "A",delval = "I")
     private String recStatus;
+
+    @TableField("show_tag_title")
+    private Integer showTagTitle;
+
+    @TableField("show_billboard_title")
+    private Integer showBillboardTitle;
+
+    @TableField("show_camera_title")
+    private Integer showCameraTitle;
+
+    @TableField("show_link_title")
+    private Integer showLinkTitle;
 }

+ 18 - 0
src/main/java/com/fdkankan/ucenter/entity/SceneEditInfoExt.java

@@ -65,11 +65,24 @@ public class SceneEditInfoExt implements Serializable {
     private String mosaics;
 
     /**
+     * 是否有马赛克
+     */
+    @TableField("mosaic")
+    private Integer mosaic;
+
+    /**
      * 是否有场景关联(0-否,1-是)
      */
     @TableField("links")
     private Integer links;
 
+
+    /**
+     * 分享二维码logo
+     */
+    @TableField("share_logo_img")
+    private String shareLogoImg;
+
     /**
      * 创建时间
      */
@@ -100,4 +113,9 @@ public class SceneEditInfoExt implements Serializable {
     @TableLogic(value = "A",delval = "I")
     private String recStatus;
 
+    @TableField("billboards")
+    private Integer billboards;
+
+    @TableField("sns_info")
+    private String snsInfo;
 }

+ 6 - 0
src/main/java/com/fdkankan/ucenter/entity/ScenePlus.java

@@ -92,6 +92,12 @@ public class ScenePlus implements Serializable {
     private Integer recommend;
 
     /**
+     * 是否有housetype文件(0-否,1-是)
+     */
+    @TableField("house_type")
+    private Integer houseType;
+
+    /**
      * 创建时间
      */
     @TableField("create_time")

+ 7 - 0
src/main/java/com/fdkankan/ucenter/entity/ScenePlusExt.java

@@ -124,6 +124,13 @@ public class ScenePlusExt implements Serializable {
     private String sceneKind;
 
     /**
+     * 算法模型类型(dam,3dtiles)
+     */
+    @TableField("model_kind")
+    private String modelKind;
+
+
+    /**
      * 点位视频
      */
     @TableField("videos")

+ 11 - 1
src/main/java/com/fdkankan/ucenter/entity/User.java

@@ -117,6 +117,17 @@ public class User implements Serializable {
      */
     @TableField("download_num")
     private Integer downloadNum;
+    /**
+     * 深时可下载场景总数
+     */
+    @TableField("ss_download_num_total")
+    private Integer ssDownloadNumTotal;
+
+    /**
+     * 深时已下载场景总数
+     */
+    @TableField("ss_download_num")
+    private Integer ssDownloadNum;
 
     /**
      * 创建时间
@@ -137,5 +148,4 @@ public class User implements Serializable {
     @TableField("update_time")
     private String updateTime;
 
-
 }

+ 20 - 0
src/main/java/com/fdkankan/ucenter/httpClient/address/PayAddressSource.java

@@ -0,0 +1,20 @@
+package com.fdkankan.ucenter.httpClient.address;
+
+import com.dtflys.forest.callback.AddressSource;
+import com.dtflys.forest.http.ForestAddress;
+import com.dtflys.forest.http.ForestRequest;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+@Component
+public class PayAddressSource implements AddressSource {
+
+    @Value("${4dkk.payService.basePath}")
+    private String basePath;
+
+
+    @Override
+    public ForestAddress getAddress(ForestRequest forestRequest) {
+        return new ForestAddress("","",null,basePath);
+    }
+}

+ 23 - 1
src/main/java/com/fdkankan/ucenter/httpClient/client/LaserClient.java

@@ -3,6 +3,8 @@ package com.fdkankan.ucenter.httpClient.client;
 import com.dtflys.forest.annotation.*;
 import com.fdkankan.ucenter.common.Result;
 import com.fdkankan.ucenter.httpClient.address.LaserAddressSource;
+import com.fdkankan.ucenter.httpClient.param.SSDownSceneParam;
+import com.fdkankan.ucenter.httpClient.param.SsBindParam;
 
 import java.util.List;
 import java.util.Map;
@@ -17,7 +19,7 @@ public interface LaserClient {
      * 根据用户获取激光相机数量
      */
     @Post("/laser/4dage/getSceneNum")
-    Result getSceneNum(@Header("fdToken") String token);
+    Result getSceneNum(@Header("fdToken") String token,@JSONBody Map<String, Object> param);
     /**
      * 获取相机场景数
      * @param param
@@ -50,4 +52,24 @@ public interface LaserClient {
      */
     @Post("/laser/4dage/scene/getScenesBySnCode")
     Result getScenesBySnCode(@JSONBody Map<String, String> param, @Header("fdToken") String token) ;
+
+    /**
+     * 下载深时场景
+     * status :0:正在生成 1,初次生成  2,已经生成直接下载 3,重新生成
+     */
+    @Post("/laser/4dage/downOfflineScene")
+    Result downOfflineScene(@JSONBody SSDownSceneParam param) ;
+    /**
+     * 检测深时场景是否需要重新生成
+     *
+     * status :离线包状态是否需要重新生成 0未生成,1 不需要 2需要
+     */
+    @Post("/laser/4dage/downOfflineSceneStatus")
+    Result downOfflineSceneStatus(@JSONBody SSDownSceneParam param) ;
+
+    /**
+     *解绑相机、绑定相机
+     */
+    @Post("/laser/4dage/scene/camera/toBind")
+    Result toBind(@JSONBody SsBindParam param) ;
 }

+ 35 - 0
src/main/java/com/fdkankan/ucenter/httpClient/client/PayClient.java

@@ -0,0 +1,35 @@
+package com.fdkankan.ucenter.httpClient.client;
+
+import com.dtflys.forest.annotation.*;
+import com.fdkankan.ucenter.common.Result;
+import com.fdkankan.ucenter.common.ResultData;
+import com.fdkankan.ucenter.httpClient.address.LaserAddressSource;
+import com.fdkankan.ucenter.httpClient.address.PayAddressSource;
+import com.fdkankan.ucenter.httpClient.param.PayOrderParam;
+import com.fdkankan.ucenter.httpClient.param.SSDownSceneParam;
+import com.fdkankan.ucenter.httpClient.param.SsBindParam;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 获取,支付中心
+ */
+@Address(source = PayAddressSource.class)
+public interface PayClient {
+
+    /**
+     * 下单
+     */
+    @Post("/service/pay/order/down")
+    ResultData downOrder(@JSONBody PayOrderParam param);
+
+
+    /**
+     * 查询订单状态
+     */
+    @Get("/service/pay/order/info/{orderSn}")
+    ResultData queryOrder(@Var("orderSn")String orderSn);
+
+
+}

+ 35 - 0
src/main/java/com/fdkankan/ucenter/httpClient/param/PayGoods.java

@@ -0,0 +1,35 @@
+package com.fdkankan.ucenter.httpClient.param;
+
+import lombok.Data;
+
+@Data
+public class PayGoods {
+    private String name;
+    private Integer count;
+    private String sceneNum;
+    private Integer type;   //0专业会员,1高级会员,2下载,3配件
+    private Integer goodsId;
+    private Integer monthQy = 1;
+    private String nameEn;
+
+    public PayGoods(String name, String nameEn,Integer count,Integer type) {
+        this.name = name;
+        this.nameEn = nameEn;
+        this.count = count;
+        this.type = type;
+    }
+
+    public PayGoods(String name, Integer count,Integer type,Integer monthQy) {
+        this.name = name;
+        this.count = count;
+        this.type = type;
+        this.monthQy = monthQy;
+    }
+
+    public PayGoods(String name, Integer count,String sceneNum,Integer type) {
+        this.name = name;
+        this.count = count;
+        this.sceneNum = sceneNum;
+        this.type = type;
+    }
+}

+ 24 - 0
src/main/java/com/fdkankan/ucenter/httpClient/param/PayOrderParam.java

@@ -0,0 +1,24 @@
+package com.fdkankan.ucenter.httpClient.param;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class PayOrderParam {
+    private String serveName = "ucenter";
+    private BigDecimal orderMoney;
+    private String orderType;
+    private String userName;
+    private String nickName;
+    private List<PayGoods> goodsInfo;
+
+    public PayOrderParam(BigDecimal orderMoney, String orderType, String userName, String nickName, List<PayGoods> goodsInfo) {
+        this.orderMoney = orderMoney;
+        this.orderType = orderType;
+        this.userName = userName;
+        this.nickName = nickName;
+        this.goodsInfo = goodsInfo;
+    }
+}

+ 8 - 0
src/main/java/com/fdkankan/ucenter/httpClient/param/SSDownSceneParam.java

@@ -0,0 +1,8 @@
+package com.fdkankan.ucenter.httpClient.param;
+
+import lombok.Data;
+
+@Data
+public class SSDownSceneParam {
+    private String sceneCode;
+}

+ 13 - 0
src/main/java/com/fdkankan/ucenter/httpClient/param/SsBindParam.java

@@ -0,0 +1,13 @@
+package com.fdkankan.ucenter.httpClient.param;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class SsBindParam {
+    private Boolean bind;
+    private String phone;
+    private List<String> snCode;
+    private Long userId;
+}

+ 129 - 8
src/main/java/com/fdkankan/ucenter/httpClient/service/LaserService.java

@@ -2,21 +2,30 @@ package com.fdkankan.ucenter.httpClient.service;
 
 import cn.hutool.core.io.FileUtil;
 import com.alibaba.fastjson.JSONObject;
+import com.alibaba.nacos.common.http.client.NacosAsyncRestTemplate;
 import com.fdkankan.common.util.FileUtils;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
+import com.fdkankan.rabbitmq.util.RabbitMqProducer;
 import com.fdkankan.ucenter.common.CameraTypeEnum;
 import com.fdkankan.ucenter.common.Result;
+import com.fdkankan.ucenter.common.constants.NacosProperty;
 import com.fdkankan.ucenter.common.utils.ShellUtil;
 import com.fdkankan.ucenter.entity.Camera;
 import com.fdkankan.ucenter.entity.CameraDetail;
 import com.fdkankan.ucenter.entity.User;
 import com.fdkankan.ucenter.httpClient.client.LaserClient;
+import com.fdkankan.ucenter.httpClient.param.SSDownSceneParam;
+import com.fdkankan.ucenter.httpClient.param.SsBindParam;
+import com.fdkankan.ucenter.httpClient.vo.SSDownSceneVo;
 import com.fdkankan.ucenter.service.ICameraService;
 import com.fdkankan.ucenter.service.IUserService;
 import com.fdkankan.ucenter.vo.SceneBySnCodeVo;
 import com.fdkankan.ucenter.vo.response.SceneNumVo;
+import com.google.common.collect.Lists;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
@@ -45,10 +54,12 @@ public class LaserService {
      * 根据用户获取激光相机数量
      * @param token
      */
-    public SceneNumVo getLaserSceneNumByUser(String token) {
+    public SceneNumVo getLaserSceneNumByUser(String token,Integer sceneSource) {
         SceneNumVo sceneNumVo = new SceneNumVo();
         try {
-            Result sceneNum = laserClient.getSceneNum(token);
+            HashMap<String,Object> param = new HashMap<>();
+            param.put("sceneSource",sceneSource);
+            Result sceneNum = laserClient.getSceneNum(token,param);
             if(sceneNum != null && sceneNum.getCode() == 200){
                 sceneNumVo = JSONObject.parseObject(JSONObject.toJSONString(sceneNum.getData()), SceneNumVo.class);
                 sceneNumVo.setTotalNum(sceneNumVo.getSceneNum() + sceneNumVo.getCooperationSceneNum());
@@ -94,7 +105,7 @@ public class LaserService {
             HashMap<Long, User> userMap = userService.getByIds(userIds);
             for (Long cameraId : detailMap.keySet()) {
                 CameraDetail cameraDetail = detailMap.get(cameraId);
-                if (cameraDetail.getType() == CameraTypeEnum.LASER_TURN.getType()) {
+                if (cameraDetail.getType() == CameraTypeEnum.LASER_TURN.getType() || cameraDetail.getType() == CameraTypeEnum.SG_TURN.getType()) {
                     Camera cameraEntity = cameraMap.get(cameraId);
                     Map<String, String> param = new HashMap<>();
                     param.put("snCode", cameraEntity.getSnCode());
@@ -110,7 +121,7 @@ public class LaserService {
         List<Map<String, String>> laserParams = new ArrayList<>();
             for (Long cameraId : detailMap.keySet()) {
                 CameraDetail cameraDetail = detailMap.get(cameraId);
-                if (cameraDetail.getType() == CameraTypeEnum.LASER_TURN.getType()) {
+                if (cameraDetail.getType() == CameraTypeEnum.LASER_TURN.getType() || cameraDetail.getType() == CameraTypeEnum.SG_TURN.getType()) {
                     Camera cameraEntity = cameraMap.get(cameraId);
                     Map<String, String> param = new HashMap<>();
                     param.put("snCode", cameraEntity.getSnCode());
@@ -166,8 +177,9 @@ public class LaserService {
     }
 
 
-    public void copy(Long camaraId, String createTime, String oldNum,String newNum, Integer status,
-                     String  path, String sceneKey, String sceneName, Long userId,String version){
+    public void copy(String oldNum ,Long camaraId, String createTime, String newNum, Integer status,
+                     String  path, String sceneKey, String sceneName, Long userId,String version,Integer isObj,
+                     Integer sceneSource,String algorithmTime){
         String phone = null;
         String snCode = null;
         if(userId != null){
@@ -178,20 +190,30 @@ public class LaserService {
             Camera camera = cameraService.getById(camaraId);
             snCode = camera == null ? null :camera.getSnCode();
         }
+//        JSONObject sceneInfo = this.getSceneByNum(oldNum);
+//        if(sceneInfo != null){
+//            sceneName = sceneInfo.getString("title") +"(copy)";
+//        }
         Map<String,Object> params = new HashMap<>();
         params.put("childName",snCode);
         params.put("createTime", createTime);
         params.put("phone", phone);
-        params.put("oldSceneCode", oldNum);
         params.put("sceneCode", newNum);
+        params.put("oldSceneCode", oldNum);
         params.put("snCode",snCode);
         params.put("status", status);
         params.put("password", sceneKey);
-       // params.put("title", sceneName);
+        //params.put("title", sceneName);
         params.put("userId", userId);
         params.put("isCopy", true);
         params.put("path",path);
         params.put("version",version);
+        params.put("sceneSource",sceneSource);
+        params.put("algorithmTime",algorithmTime);
+        if(isObj == 1){
+            params.put("buildObjStatus",isObj);
+
+        }
         Result result = laserClient.saveOrEdit(newNum, params);
         if( result.getCode() != HttpStatus.OK.value()){
             log.error("激光场景状态同步失败!");
@@ -214,5 +236,104 @@ public class LaserService {
         }
         return sceneVo ;
     }
+    public SSDownSceneVo downOfflineSceneStatus(String num) {
+        try {
+            SSDownSceneVo vo ;
+            SSDownSceneParam param = new SSDownSceneParam();
+            param.setSceneCode(num);
+            Result responseEntity = laserClient.downOfflineSceneStatus(param);
+            if( responseEntity.getCode() != HttpStatus.OK.value()){
+                log.error("downOfflineSceneStatus-根据场景码获取激光转台下载状态失败:{}",responseEntity);
+                return null;
+            }
+            vo = JSONObject.parseObject(JSONObject.toJSONString(responseEntity.getData()), SSDownSceneVo.class);
+            return vo;
+
+        }catch (Exception e){
+            log.error("downOfflineSceneStatus-根据场景码获取激光转台下载状态失败!",e);
+        }
+        return null ;
+    }
+
+    public SSDownSceneVo downOfflineScene(String num) {
+        try {
+            SSDownSceneVo vo ;
+            SSDownSceneParam param = new SSDownSceneParam();
+            param.setSceneCode(num);
+            Result responseEntity = laserClient.downOfflineScene(param);
+            if( responseEntity.getCode() != HttpStatus.OK.value()){
+                log.error("downOfflineScene-根据场景码获取激光转台下载失败:{}",responseEntity);
+                return null;
+            }
+            vo = JSONObject.parseObject(JSONObject.toJSONString(responseEntity.getData()), SSDownSceneVo.class);
+            return vo ;
+        }catch (Exception e){
+            log.error("downOfflineScene-根据场景码获取激光转台下载状态失败!",e);
+        }
+        return null ;
+    }
+
+    public void delete(String num) {
+        try {
+            Map<String,Object> params = new HashMap<>();
+            params.put("sceneCode", num);
+            params.put("status", -1);
+            Result result = laserClient.saveOrEdit(num, params);
+            if(result.getCode() != HttpStatus.OK.value()){
+                log.error("激光场景状态同步失败!");
+            }
+        }catch (Exception e){
+            log.error("激光场景状态同步失败!",e);
+        }
+
+    }
+
+
+    @Autowired
+    private FYunFileServiceInterface fYunFileService;
+    @Autowired
+    private RabbitMqProducer rabbitMqProducer;
+
+    @Value("${4dkk.laserService.cloud-point-fyun-path:testdata/%s/data/bundle_%s/building/}")
+    private String cloudPointFyunPath;
+    @Value("${4dkk.laserService.bucket:laser-data}")
+    private String bucket;
+    @Value("${queue.application.laser.cloud-point-build:laser-cloud-point-build}")
+    private String cloudPointBuild;
+
+
+
+    public void cloudPointBuild(String oldSceneCode,String sceneCode) {
+        if (!fYunFileService.fileExist(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) +"vision_edit.txt")){
+            return;
+        }
+        log.info("开始同步点云编辑文件");
+        // 上传点云编辑文件,并通知激光系统
+        fYunFileService.copyFileBetweenBucket(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) + "vision_edit.txt",
+                bucket,String.format(cloudPointFyunPath,sceneCode,sceneCode) + "vision_edit.txt");
+
+        fYunFileService.copyFileBetweenBucket(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) + "uuidcloud",
+                bucket,String.format(cloudPointFyunPath,sceneCode,sceneCode) + "uuidcloud");
+
+        Map<String, Object> params = new HashMap<>();
+        params.put("sceneNum", sceneCode);
+        params.put("businessType", 0);
+        rabbitMqProducer.sendByWorkQueue(cloudPointBuild, params);
+    }
 
+    public void toBind(Boolean bind,String snCode,String userName,Long userId) {
+        try {
+            SsBindParam param = new SsBindParam();
+            param.setBind(bind);
+            param.setSnCode(Lists.newArrayList(snCode));
+            param.setPhone(userName);
+            param.setUserId(userId);
+            Result responseEntity = laserClient.toBind(param);
+            if( responseEntity.getCode() != HttpStatus.OK.value()){
+                log.error("解绑用户激光转台下载失败:{}",responseEntity);
+            }
+        }catch (Exception e){
+            log.error("解绑用户获取激光转台下载状态失败!",e);
+        }
+    }
 }

+ 47 - 0
src/main/java/com/fdkankan/ucenter/httpClient/service/PayService.java

@@ -0,0 +1,47 @@
+package com.fdkankan.ucenter.httpClient.service;
+
+import com.alibaba.fastjson.JSONObject;
+import com.dtflys.forest.annotation.Get;
+import com.dtflys.forest.annotation.JSONBody;
+import com.dtflys.forest.annotation.Post;
+import com.dtflys.forest.annotation.Var;
+import com.fdkankan.ucenter.common.ResultData;
+import com.fdkankan.ucenter.httpClient.client.PayClient;
+import com.fdkankan.ucenter.httpClient.param.PayGoods;
+import com.fdkankan.ucenter.httpClient.param.PayOrderParam;
+import com.fdkankan.ucenter.httpClient.vo.PayOrderVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@Service
+public class PayService {
+
+    @Autowired
+    PayClient payClient;
+
+    public PayOrderVo downOrder(BigDecimal money, String type, String userName, String nickName, List<PayGoods> goodsInfo){
+        PayOrderParam param = new PayOrderParam(money,type,userName,nickName,goodsInfo);
+        ResultData resultData = payClient.downOrder(param);
+        if(resultData.getCode() == 200 ){
+            String orderStr = JSONObject.toJSONString(resultData.getData());
+            return JSONObject.parseObject(orderStr,PayOrderVo.class);
+        }
+        return null;
+    }
+
+
+    /**
+     * 查询订单状态
+     */
+    public PayOrderVo queryOrder(String orderSn){
+        ResultData resultData = payClient.queryOrder(orderSn);
+        if(resultData.getCode() == 200 ){
+            String orderStr = JSONObject.toJSONString(resultData.getData());
+            return JSONObject.parseObject(orderStr,PayOrderVo.class);
+        }
+        return null;
+    }
+}

+ 63 - 0
src/main/java/com/fdkankan/ucenter/httpClient/vo/PayOrderVo.java

@@ -0,0 +1,63 @@
+package com.fdkankan.ucenter.httpClient.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class PayOrderVo {
+
+    /**
+     * 订单表
+     */
+    private Integer orderId;
+
+    /**
+     * 服务名称
+     */
+    private String serveName;
+    /**
+     * 服务名称
+     */
+    private Integer serveId;
+
+    /**
+     * 订单编号
+     */
+    private String orderSn;
+
+    /**
+     * 订单类型
+     */
+    private String orderType;
+
+    /**
+     * 订单金额
+     */
+    private BigDecimal orderMoney;
+
+    /**
+     * 0微信h5,1微信jsapi,2,微信扫码支付,3支付宝扫码,4支付宝h5
+     */
+    private Integer payType;
+
+    /**
+     * 支付状态,0未支付,1支付成功,2支付失败
+     */
+    private Integer payStatus;
+
+    private String openId;
+
+    private String tradeNo;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    private Date payTime;
+
+}

+ 10 - 0
src/main/java/com/fdkankan/ucenter/httpClient/vo/SSDownSceneVo.java

@@ -0,0 +1,10 @@
+package com.fdkankan.ucenter.httpClient.vo;
+
+import lombok.Data;
+
+@Data
+public class SSDownSceneVo {
+                                //离线包状态是否需要重新生成 1 不需要 2需要
+    private Integer status;     //0:正在生成 1,初次生成  2,已经生成直接下载 3,重新生成
+    private String url;         //下载地址
+}

+ 2 - 2
src/main/java/com/fdkankan/ucenter/interceptor/ControllerAopInterceptor.java

@@ -65,12 +65,12 @@ public class ControllerAopInterceptor {
 		// 记录开始时间
 		long start = System.currentTimeMillis();
 
-		log.info("请求| ip:{} , 请求接口:{} ,请求时间:{}, 参数:{} , 请求token:{} ",
+		log.warn("请求| ip:{} , 请求接口:{} ,请求时间:{}, 参数:{} , 请求token:{} ",
 				ip, requestURL, start,paramsBuf.toString(), request.getHeader("token"));
 		// 执行目标方法
 		result = pjp.proceed();
 		// 获取执行完的时间 打印返回报文
-		log.info("返回| 请求接口:{} , 请求时间:{} , 处理时间:{} 毫秒 , 返回结果 :{}",
+		log.warn("返回| 请求接口:{} , 请求时间:{} , 处理时间:{} 毫秒 , 返回结果 :{}",
 				requestURL, start, (System.currentTimeMillis() - start), result);
 		return result;
 	}

+ 3 - 0
src/main/java/com/fdkankan/ucenter/mapper/ICameraDetailMapper.java

@@ -3,6 +3,7 @@ package com.fdkankan.ucenter.mapper;
 import com.fdkankan.ucenter.entity.CameraDetail;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.fdkankan.ucenter.vo.response.CameraAppVo;
+import com.fdkankan.ucenter.vo.response.CameraExcelVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -21,4 +22,6 @@ public interface ICameraDetailMapper extends BaseMapper<CameraDetail> {
 
     List<CameraAppVo> getListByUserAndType(@Param("userId") Long userId, @Param("cameraType") Integer cameraType);
     List<CameraAppVo> getListByUserIdsAndType(@Param("userIds") List<Long> userId, @Param("cameraType") Integer cameraType);
+
+    List<CameraExcelVo> getListByUserAndTypeEx(@Param("userId") Long userId);
 }

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/ICameraIncrementLogMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.fdkankan.ucenter.entity.CameraIncrementLog;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-02-01
+ */
+@Mapper
+public interface ICameraIncrementLogMapper extends BaseMapper<CameraIncrementLog> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/ICameraTypeMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.fdkankan.ucenter.entity.CameraType;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-12
+ */
+@Mapper
+public interface ICameraTypeMapper extends BaseMapper<CameraType> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/ICaseMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.fdkankan.ucenter.entity.Case;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-08-11
+ */
+@Mapper
+public interface ICaseMapper extends BaseMapper<Case> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/ICompanyMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fdkankan.ucenter.entity.Company;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * 客户企业logo信息 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2021-12-24
+ */
+@Mapper
+public interface ICompanyMapper extends BaseMapper<Company> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/IExceedSpaceSceneMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.fdkankan.ucenter.entity.ExceedSpaceScene;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * 超出容量场景码表 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-30
+ */
+@Mapper
+public interface IExceedSpaceSceneMapper extends BaseMapper<ExceedSpaceScene> {
+
+}

+ 1 - 1
src/main/java/com/fdkankan/ucenter/mapper/IIncrementTypeMapper.java

@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
  * </p>
  *
  * @author 
- * @since 2022-08-01
+ * @since 2023-06-19
  */
 @Mapper
 public interface IIncrementTypeMapper extends BaseMapper<IncrementType> {

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/IMailTemplateMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.fdkankan.ucenter.entity.MailTemplate;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-01-10
+ */
+@Mapper
+public interface IMailTemplateMapper extends BaseMapper<MailTemplate> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/ucenter/mapper/ISceneDelLogMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.ucenter.mapper;
+
+import com.fdkankan.ucenter.entity.SceneDelLog;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-03-15
+ */
+@Mapper
+public interface ISceneDelLogMapper extends BaseMapper<SceneDelLog> {
+
+}

+ 2 - 0
src/main/java/com/fdkankan/ucenter/mapper/IScenePlusMapper.java

@@ -22,4 +22,6 @@ public interface IScenePlusMapper extends BaseMapper<ScenePlus> {
     Page<AppSceneVo> pageList(Page<AppSceneVo> page, AppSceneParam param);
 
     Long getCountByUserId(@Param("userId") Long userId, @Param("cameraType") Integer cameraType);
+
+    Long getSpaceSumByCameraId(@Param("cameraId") Long cameraId);
 }

+ 2 - 0
src/main/java/com/fdkankan/ucenter/mapper/ISceneProMapper.java

@@ -29,4 +29,6 @@ public interface ISceneProMapper extends BaseMapper<ScenePro> {
     Page<SceneVo> pageListAndFolder(Page<SceneVo>page,SceneParam param);
 
     Long getCountByUserId(@Param("userId") Long userId, @Param("cameraType") Integer cameraType);
+
+    Long getSpaceSumByCameraId(@Param("cameraId") Long cameraId);
 }

+ 85 - 0
src/main/java/com/fdkankan/ucenter/mq/consumer/OrderDownConsumer.java

@@ -0,0 +1,85 @@
+package com.fdkankan.ucenter.mq.consumer;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fdkankan.rabbitmq.util.RabbitMqProducer;
+import com.fdkankan.ucenter.entity.DownloadOrder;
+import com.fdkankan.ucenter.httpClient.vo.PayOrderVo;
+import com.fdkankan.ucenter.pay.strategy.impl.DownloadOrderImpl;
+import com.fdkankan.ucenter.pay.strategy.impl.EntityOrderImpl;
+import com.fdkankan.ucenter.pay.strategy.impl.IncrementOrderImpl;
+import com.fdkankan.ucenter.service.IIncrementOrderService;
+import com.rabbitmq.client.Channel;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.amqp.core.ExchangeTypes;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.rabbit.annotation.Exchange;
+import org.springframework.amqp.rabbit.annotation.Queue;
+import org.springframework.amqp.rabbit.annotation.QueueBinding;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+import sun.rmi.runtime.Log;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+
+@Slf4j
+@Component
+public class OrderDownConsumer {
+
+
+    @Autowired
+    IncrementOrderImpl incrementOrder;
+    @Autowired
+    DownloadOrderImpl downloadOrder;
+    @Autowired
+    EntityOrderImpl entityOrder;
+
+
+    @RabbitListener(
+            queuesToDeclare = @Queue("${queue.orderPay.order-payResult:order-payResult}")
+    )
+    public void consumerQueue(Channel channel, Message message)  {
+        try {
+            String messageId = message.getMessageProperties().getMessageId();
+            String msg = new String(message.getBody(), StandardCharsets.UTF_8);
+            log.info("接受下单结果mq--messageId:{},msg:{}",messageId,msg);
+
+            channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
+            msg = msg.substring(1, msg.length() - 1);
+
+            msg = StringEscapeUtils.unescapeJava(msg);
+
+            PayOrderVo order = JSONObject.parseObject(msg, PayOrderVo.class);
+            if(order == null){
+                return;
+            }
+            //更新订单状态
+            Integer payType = 3;
+            //付款方式,0表示微信,1表示支付宝,2表示paypal,3表示其他
+            switch (order.getPayType()){
+                case 0 : case 1: case 2: payType = 0;break;
+                case 3 : case 4:  payType = 1;break;
+                case 5 :   payType = 2;break;
+            }
+            if("incrementOrder".equals(order.getOrderType())){
+                incrementOrder.handleOrder(order.getOrderSn(),order.getTradeNo(),order.getOpenId(),payType,null);
+            }
+            if("downOrder".equals(order.getOrderType())){
+                downloadOrder.handleOrder(order.getOrderSn(),order.getTradeNo(),order.getOpenId(),payType,null);
+            }
+            if("partOrder".equals(order.getOrderType())){
+                entityOrder.handleOrder(order.getOrderSn(),order.getTradeNo(),order.getOpenId(),payType,null);
+            }
+        }catch (Exception e){
+            log.error("order-payResult----消费失败",e);
+        }finally {
+
+        }
+
+    }
+
+}

+ 62 - 0
src/main/java/com/fdkankan/ucenter/mq/consumer/ScenePayStatusConsumer.java

@@ -0,0 +1,62 @@
+package com.fdkankan.ucenter.mq.consumer;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fdkankan.ucenter.httpClient.vo.PayOrderVo;
+import com.fdkankan.ucenter.mq.vo.ScenePayStatusVo;
+import com.fdkankan.ucenter.pay.strategy.impl.DownloadOrderImpl;
+import com.fdkankan.ucenter.pay.strategy.impl.EntityOrderImpl;
+import com.fdkankan.ucenter.pay.strategy.impl.IncrementOrderImpl;
+import com.fdkankan.ucenter.service.ISceneProService;
+import com.rabbitmq.client.Channel;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringEscapeUtils;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.rabbit.annotation.Queue;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+
+/**
+ * 场景封存解封 mq
+ */
+@Slf4j
+@Component
+public class ScenePayStatusConsumer {
+
+
+    @Autowired
+    ISceneProService sceneProService;
+
+    @RabbitListener(
+            queuesToDeclare = @Queue("${queue.scene.pay-status:scene-pay-status}")
+    )
+    public void consumerQueue(Channel channel, Message message)  {
+        try {
+            String messageId = message.getMessageProperties().getMessageId();
+            String msg = new String(message.getBody(), StandardCharsets.UTF_8);
+            log.info("scene-pay-status-mq--messageId:{},msg:{}",messageId,msg);
+
+            channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
+
+            ScenePayStatusVo vo = JSONObject.parseObject(msg, ScenePayStatusVo.class);
+            if(vo == null){
+                return;
+            }
+            if(vo.getSceneId() != null && vo.getPayStatus() != null){
+                sceneProService.lockOrUnLockScenes(Arrays.asList(vo.getSceneId()),vo.getPayStatus());
+            }else if(vo.getCameraId() != null){
+                sceneProService.lockOrUnLockBySpace(vo.getCameraId());
+            }
+
+        }catch (Exception e){
+            log.info("scene-pay-status----消费失败",e);
+        }finally {
+
+        }
+
+    }
+
+}

+ 13 - 0
src/main/java/com/fdkankan/ucenter/mq/vo/ScenePayStatusVo.java

@@ -0,0 +1,13 @@
+package com.fdkankan.ucenter.mq.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ScenePayStatusVo implements Serializable {
+    private Long cameraId;
+    private Long sceneId;
+    private Integer payStatus;
+
+}

+ 9 - 4
src/main/java/com/fdkankan/ucenter/pay/factory/impl/down/PaypalDownload.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.constant.Constant;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.exception.BusinessException;
+import com.fdkankan.ucenter.common.EnLang;
 import com.fdkankan.ucenter.common.constants.NacosProperty;
 import com.fdkankan.ucenter.entity.DownloadOrder;
 import com.fdkankan.ucenter.pay.factory.PayEntity;
@@ -41,13 +42,17 @@ public class PaypalDownload implements PayEntity {
         if (downloadOrderEntity == null) {
             throw new BusinessException(ErrorCode.FAILURE_CODE_8001);
         }
-        String subject = Constant.INCREMENT_SUBJECT + ":" + downloadOrderEntity.getCount() + "次";
+        String subject = EnLang.Scene_Download_en + ":" + downloadOrderEntity.getCount() + EnLang.next_en;
+        if("en".equals(order.getLang())){
+            subject = EnLang.Scene_Download_en + ":" + downloadOrderEntity.getCount() + EnLang.next_en;
+        }
+        if("zh".equals(order.getLang())){
+            subject = EnLang.Scene_Download_cn + ":" + downloadOrderEntity.getCount() + EnLang.next_cn;
+        }
         String orderSn = downloadOrderEntity.getOrderSn();
         orderSn += "_download";
         String body = subject;
-        return payOrderService.payPalPay(orderSn, subject, body, downloadOrderEntity.getAmount(), downloadOrderEntity.getAmount(),
-                successUrl,
-                cancelUrl);
+        return payOrderService.payPalPay(orderSn, subject, body, downloadOrderEntity.getAmount(), downloadOrderEntity.getAmount(), successUrl, cancelUrl);
     }
 
     @Override

+ 30 - 1
src/main/java/com/fdkankan/ucenter/pay/factory/impl/increment/PaypalIncrement.java

@@ -4,13 +4,17 @@ import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.constant.Constant;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.exception.BusinessException;
+import com.fdkankan.ucenter.common.EnLang;
 import com.fdkankan.ucenter.common.constants.NacosProperty;
 import com.fdkankan.ucenter.entity.IncrementOrder;
+import com.fdkankan.ucenter.entity.IncrementType;
 import com.fdkankan.ucenter.pay.factory.PayEntity;
 import com.fdkankan.ucenter.pay.factory.impl.PayOrderService;
 import com.fdkankan.ucenter.pay.paypal.PayPalDefaultConfig;
 import com.fdkankan.ucenter.service.IIncrementOrderService;
+import com.fdkankan.ucenter.service.IIncrementTypeService;
 import com.fdkankan.ucenter.vo.request.PlaceOrderParam;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
@@ -24,6 +28,8 @@ public class PaypalIncrement implements PayEntity {
     private IIncrementOrderService incrementOrderService;
     @Autowired
     private PayPalDefaultConfig payPalDefaultConfig;
+    @Autowired
+    private IIncrementTypeService incrementTypeService;
 
 
     @Override
@@ -41,7 +47,13 @@ public class PaypalIncrement implements PayEntity {
         if (incrementOrderEntity == null) {
             throw new BusinessException(ErrorCode.FAILURE_CODE_8001);
         }
-        String subject = Constant.INCREMENT_SUBJECT + ":" + incrementOrderEntity.getCount() + "个/年";
+        String subject = null;
+        if(incrementOrderEntity.getIncrementType()!=null){
+            IncrementType incrementType = incrementTypeService.getById(incrementOrderEntity.getIncrementType());
+            subject =  getSubject(incrementOrderEntity,incrementType,order.getLang());
+        }else {
+            subject =  EnLang.senior_en + ":" + incrementOrderEntity.getCount() +EnLang.month_en ;
+        }
         String orderSn = incrementOrderEntity.getOrderSn();
         orderSn += "_increment";
         String body = subject;
@@ -50,6 +62,23 @@ public class PaypalIncrement implements PayEntity {
                 cancelUrl);
     }
 
+    private String getSubject(IncrementOrder order,IncrementType incrementType, String lang) {
+        if("en".equals(lang) && incrementType.getValidTimeType() == 0){
+            return EnLang.premium_en + ":" + order.getCount() +EnLang.year_en ;
+        }
+        if("en".equals(lang) && incrementType.getValidTimeType() == 1){
+            return EnLang.senior_en + ":" + order.getCount() +EnLang.month_en ;
+        }
+        if("zh".equals(lang) && incrementType.getValidTimeType() == 0){
+            return EnLang.premium_cn + ":" + order.getCount() +EnLang.year_cn ;
+        }
+        if("zh".equals(lang) && incrementType.getValidTimeType() == 1){
+            return EnLang.senior_cn + ":" + order.getCount() +EnLang.month_cn ;
+        }
+        return EnLang.senior_en + ":" + order.getCount() +EnLang.month_en ;
+    }
+
+
     @Override
     public String getType() {
         return "paypal_4";

+ 4 - 4
src/main/java/com/fdkankan/ucenter/pay/paypal/PayPalDefaultConfig.java

@@ -22,19 +22,19 @@ public class PayPalDefaultConfig extends PayPalConfig {
     }
 
     public String getPaySuccessUrl(){
-        return "order/pay/paypal/callback";
+        return "api/order/pay/paypal/callback";
     }
 
     public String getH5PaySuccessUrl(){
-        return "order/pay/paypal/callbackH5";
+        return "api/order/pay/paypal/callbackH5";
     }
 
     public String getCancelUrl(){
-        return "order/pay/paypal/cancel";
+        return "api/order/pay/paypal/cancel";
     }
 
     public String getH5CancelUrl(){
-        return "order/pay/paypal/cancelH5";
+        return "api/order/pay/paypal/cancelH5";
     }
 
     public String getSuccessUrl(){

+ 24 - 4
src/main/java/com/fdkankan/ucenter/pay/strategy/impl/DownloadOrderImpl.java

@@ -1,12 +1,18 @@
 package com.fdkankan.ucenter.pay.strategy.impl;
 
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fdkankan.ucenter.entity.DownloadOrder;
+import com.fdkankan.ucenter.entity.ScenePlus;
+import com.fdkankan.ucenter.entity.ScenePro;
 import com.fdkankan.ucenter.entity.User;
 import com.fdkankan.ucenter.pay.strategy.OrderStrategy;
 import com.fdkankan.ucenter.service.IDownloadOrderService;
+import com.fdkankan.ucenter.service.IScenePlusService;
+import com.fdkankan.ucenter.service.ISceneProService;
 import com.fdkankan.ucenter.service.IUserService;
 import lombok.extern.log4j.Log4j2;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -17,10 +23,14 @@ public class DownloadOrderImpl implements OrderStrategy {
     private IDownloadOrderService downloadOrderService;
     @Autowired
     private IUserService userService;
+    @Autowired
+    private ISceneProService sceneProService;
+    @Autowired
+    private IScenePlusService scenePlusService;
 
     @Override
     public void handleOrder(String orderSn, String tradeNo, String openId, int paymentTypeName, Long spaceId) throws Exception {
-        DownloadOrder downloadOrder = downloadOrderService.getByOrderSn(orderSn);
+        DownloadOrder downloadOrder = downloadOrderService.getByOrderSnNoPay(orderSn);
         if (downloadOrder == null) {
             log.error("找不到订单:" + orderSn);
             throw new Exception("找不到订单,out_trade_no错误");
@@ -32,9 +42,19 @@ public class DownloadOrderImpl implements OrderStrategy {
             throw new Exception("更新增值权益订单失败");
         }
         //更新用户下载次数
-        User userEntity = userService.getById(downloadOrder.getUserId());
-        userEntity.setDownloadNumTotal(userEntity.getDownloadNumTotal() + downloadOrder.getCount());
-        userService.updateById(userEntity);
+        LambdaUpdateWrapper<User> wrapper = new LambdaUpdateWrapper<>();
+        wrapper.eq(User::getId,downloadOrder.getUserId());
+        if(StringUtils.isNotBlank(downloadOrder.getSceneNum())){
+            Integer sceneSource = sceneProService.getSceneSourceByNum(downloadOrder.getSceneNum());
+            if(sceneSource != null && sceneSource == 4){    //深时场景
+                wrapper.setSql("ss_download_num_total = ss_download_num_total + " + downloadOrder.getCount());
+            }else {
+                wrapper.setSql("download_num_total = download_num_total + " + downloadOrder.getCount());
+            }
+        }else {
+            wrapper.setSql("download_num_total = download_num_total + " + downloadOrder.getCount());
+        }
+        userService.update(wrapper);
     }
 
     @Override

+ 1 - 1
src/main/java/com/fdkankan/ucenter/pay/strategy/impl/EntityOrderImpl.java

@@ -27,7 +27,7 @@ public class EntityOrderImpl implements OrderStrategy {
     @Override
     public void handleOrder(String orderSn, String tradeNo, String openId, int paymentTypeName, Long spaceId) throws Exception {
         log.warn("购物支付处理....");
-        Order orderEntity = orderService.getByOrderSn(orderSn);
+        Order orderEntity = orderService.getByOrderSnNoPay(orderSn);
         if (orderEntity == null) {
             log.error("找不到订单:" + orderSn);
             throw new Exception("找不到订单,out_trade_no错误");

+ 2 - 2
src/main/java/com/fdkankan/ucenter/pay/strategy/impl/ExpansionOrderImpl.java

@@ -27,7 +27,7 @@ public class ExpansionOrderImpl implements OrderStrategy {
 
     @Override
     public void handleOrder(String orderSn, String tradeNo, String openId, int paymentTypeName, Long spaceId) throws Exception {
-        ExpansionOrder expansionOrder = expansionOrderService.getByOrderSn(orderSn);
+        ExpansionOrder expansionOrder = expansionOrderService.getByOrderSnNoPay(orderSn);
         if (expansionOrder == null) {
             log.error("找不到订单:" + orderSn);
             throw new Exception("找不到订单,out_trade_no错误");
@@ -52,7 +52,7 @@ public class ExpansionOrderImpl implements OrderStrategy {
             CameraDetail detailEntity = cameraDetailService.getByCameraId(expansionOrder.getCameraId());
             detailEntity.setTotalSpace(cameraSpaceEntity.getSpace());
             cameraDetailService.updateById(detailEntity);
-            sceneProService.lockOrUnLockBySpace(detailEntity,detailEntity.getCameraId() ,1);
+            sceneProService.lockOrUnLockBySpace(detailEntity,detailEntity.getCameraId() );
         }else {
             cameraSpaceEntity = cameraSpaceService.getById(spaceId);
             DateTime date = null;

+ 2 - 2
src/main/java/com/fdkankan/ucenter/pay/strategy/impl/IncrementOrderImpl.java

@@ -34,7 +34,7 @@ public class IncrementOrderImpl implements OrderStrategy {
 
     @Override
     public void handleOrder(String orderSn, String tradeNo, String openId, int paymentTypeName, Long spaceId) throws Exception {
-        IncrementOrder responseIncrementOrder = incrementOrderService.getByOrderSn(orderSn);
+        IncrementOrder responseIncrementOrder = incrementOrderService.getByOrderSnNoPay(orderSn);
         if (responseIncrementOrder == null) {
             log.error("找不到订单:" + orderSn);
             throw new Exception("找不到订单,out_trade_no错误");
@@ -86,7 +86,7 @@ public class IncrementOrderImpl implements OrderStrategy {
             //解封所有场景
             if(userIncrementEntity.getUserId() != null && userIncrementEntity.getCameraId() != null){
                 CameraDetail cameraDetail = cameraDetailService.getByCameraId(userIncrementEntity.getCameraId());
-                sceneProService.lockOrUnLockBySpace(cameraDetail, userIncrementEntity.getCameraId(),1);
+                sceneProService.lockOrUnLockBySpace(cameraDetail, userIncrementEntity.getCameraId());
             }
         }
 

+ 1 - 1
src/main/java/com/fdkankan/ucenter/pay/strategy/impl/RechargeOrderImpl.java

@@ -21,7 +21,7 @@ public class RechargeOrderImpl implements OrderStrategy {
 
     @Override
     public void handleOrder(String orderSn, String tradeNo, String openId, int paymentTypeName, Long spaceId) throws Exception {
-        VirtualOrder responseVirtualOrder = virtualOrderService.getByOrderSn(orderSn);
+        VirtualOrder responseVirtualOrder = virtualOrderService.getByOrderSnNoPay(orderSn);
         if (responseVirtualOrder == null) {
             log.error("找不到订单:" + orderSn);
             throw new Exception("找不到订单,out_trade_no错误");

+ 0 - 0
src/main/java/com/fdkankan/ucenter/service/ICameraDetailService.java


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác