dengsixing 3 anni fa
parent
commit
1a2ccdef99
73 ha cambiato i file con 67 aggiunte e 3760 eliminazioni
  1. 0 16
      4dkankan-center-api/4dkankan-center-platform-api/pom.xml
  2. 0 67
      4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/Camera.java
  3. 0 121
      4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/CameraDetail.java
  4. 0 96
      4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/Company.java
  5. 0 121
      4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/User.java
  6. 0 88
      4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/UserIncrement.java
  7. 0 65
      4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/feign/PlatformGoodsClient.java
  8. 0 9
      4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/feign/PlatformOrderClient.java
  9. 0 63
      4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/feign/PlatformUserClient.java
  10. 0 15
      4dkankan-center-api/4dkankan-center-scene-api/pom.xml
  11. 0 38
      4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/SceneCntDTO.java
  12. 0 69
      4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/SceneEditControlsDTO.java
  13. 0 163
      4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/SceneInfoDTO.java
  14. 0 223
      4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/ScenePODTO.java
  15. 0 141
      4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/SceneProDTO.java
  16. 0 90
      4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/feign/SceneUserSceneClient.java
  17. 0 56
      4dkankan-center-api/pom.xml
  18. 2 13
      4dkankan-center-scene/pom.xml
  19. 3 6
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/Interceptor/CheckCooperationPermitAspect.java
  20. 1 3
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/SceneApplication.java
  21. 1 20
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/FileConvertController.java
  22. 1 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneController.java
  23. 2 2
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneEditController.java
  24. 1 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneUploadController.java
  25. 1 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/V3Controller.java
  26. 0 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/IFileConvertService.java
  27. 13 5
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/ISceneEditInfoService.java
  28. 1 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/ISceneEditService.java
  29. 0 2
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/IScenePlusService.java
  30. 2 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/CameraDetailServiceImpl.java
  31. 0 25
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java
  32. 1 7
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneEditServiceImpl.java
  33. 0 43
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/ScenePlusServiceImpl.java
  34. 1 5
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java
  35. 2 2
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneUploadServiceImpl.java
  36. 33 33
      4dkankan-center-scene/src/main/resources/bootstrap-test.yml
  37. 1 1
      4dkankan-center-scene/src/main/resources/bootstrap.yml
  38. 1 1
      4dkankan-center-scene/src/main/resources/logback-spring.xml
  39. 0 187
      4dkankan-common/pom.xml
  40. 0 55
      4dkankan-common/src/main/java/com/fdkankan/common/aop/FeignInterceptor.java
  41. 0 112
      4dkankan-common/src/main/java/com/fdkankan/common/aop/VisitLogInterceptor.java
  42. 0 29
      4dkankan-common/src/main/java/com/fdkankan/common/bean/DownLoadProgressBean.java
  43. 0 29
      4dkankan-common/src/main/java/com/fdkankan/common/bean/DownLoadTaskBean.java
  44. 0 108
      4dkankan-common/src/main/java/com/fdkankan/common/config/FileRouteConfig.java
  45. 0 38
      4dkankan-common/src/main/java/com/fdkankan/common/config/LogPathHostNameProperty.java
  46. 0 8
      4dkankan-common/src/main/java/com/fdkankan/common/config/RedisDefaultConfig.java
  47. 0 44
      4dkankan-common/src/main/java/com/fdkankan/common/config/ResultStatusDecoder.java
  48. 0 156
      4dkankan-common/src/main/java/com/fdkankan/common/config/SentinelFileDataSourceInitFunc.java
  49. 0 57
      4dkankan-common/src/main/java/com/fdkankan/common/config/SentinelUrlBlockHandler.java
  50. 0 95
      4dkankan-common/src/main/java/com/fdkankan/common/config/ShiroConfig.java
  51. 0 40
      4dkankan-common/src/main/java/com/fdkankan/common/config/ShiroModularRealmAuthenticator.java
  52. 0 23
      4dkankan-common/src/main/java/com/fdkankan/common/config/SupportAutoConfiguration.java
  53. 0 50
      4dkankan-common/src/main/java/com/fdkankan/common/constant/CameraTypeEnum.java
  54. 0 26
      4dkankan-common/src/main/java/com/fdkankan/common/constant/FilterConstant.java
  55. 0 75
      4dkankan-common/src/main/java/com/fdkankan/common/controller/BaseController.java
  56. 0 50
      4dkankan-common/src/main/java/com/fdkankan/common/controller/CustomErrorController.java
  57. 0 145
      4dkankan-common/src/main/java/com/fdkankan/common/exception/GlobalExceptionHandler.java
  58. 0 34
      4dkankan-common/src/main/java/com/fdkankan/common/exception/JwtAuthenticationException.java
  59. 0 10
      4dkankan-common/src/main/java/com/fdkankan/common/factory/LogFactory.java
  60. 0 116
      4dkankan-common/src/main/java/com/fdkankan/common/jwt/JwtFilter.java
  61. 0 33
      4dkankan-common/src/main/java/com/fdkankan/common/jwt/JwtToken.java
  62. 0 37
      4dkankan-common/src/main/java/com/fdkankan/common/model/SSOUser.java
  63. 0 60
      4dkankan-common/src/main/java/com/fdkankan/common/realm/AgentJwtRealm.java
  64. 0 62
      4dkankan-common/src/main/java/com/fdkankan/common/realm/AppJwtRealm.java
  65. 0 61
      4dkankan-common/src/main/java/com/fdkankan/common/realm/ManagerJwtRealm.java
  66. 0 83
      4dkankan-common/src/main/java/com/fdkankan/common/realm/UserJwtRealm.java
  67. 0 56
      4dkankan-common/src/main/java/com/fdkankan/common/response/BaseResponseAdvice.java
  68. 0 72
      4dkankan-common/src/main/java/com/fdkankan/common/user/SSOLoginHelper.java
  69. 0 102
      4dkankan-common/src/main/java/com/fdkankan/common/user/SSOLoginStore.java
  70. 0 27
      4dkankan-common/src/main/java/com/fdkankan/common/user/SSOUser.java
  71. 0 21
      4dkankan-common/src/main/java/com/fdkankan/common/util/SsoUtil.java
  72. 0 38
      4dkankan-common/src/main/java/com/fdkankan/common/util/WebUtil.java
  73. 0 6
      pom.xml

+ 0 - 16
4dkankan-center-api/4dkankan-center-platform-api/pom.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <packaging>jar</packaging>
-
-    <parent>
-        <artifactId>4dkankan-center-api</artifactId>
-        <groupId>com.fdkankan</groupId>
-        <version>2.0.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>4dkankan-center-platform-api</artifactId>
-
-</project>

+ 0 - 67
4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/Camera.java

@@ -1,67 +0,0 @@
-package com.fdkankan.platform.api.dto;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-@Data
-public class Camera implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    /**
-     * 相机的Mac地址
-     */
-    private String childName;
-
-    /**
-     * 激活时间
-     */
-    private Date activatedTime;
-
-    /**
-     * 相机密码
-     */
-    private String childPassword;
-
-    /**
-     * sn码
-     */
-    private String snCode;
-
-    /**
-     * wifi名称
-     */
-    private String wifiName;
-
-    /**
-     * wifi密码
-     */
-    private String wifiPassword;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 更新时间
-     */
-    private Date updateTime;
-
-    /**
-     * 记录的状态,A: 生效,I: 禁用
-     */
-    private String recStatus;
-
-    /**
-     * 0正常,1删除
-     */
-    private Integer tbStatus;
-
-
-}
-

+ 0 - 121
4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/CameraDetail.java

@@ -1,121 +0,0 @@
-package com.fdkankan.platform.api.dto;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 相机子表
- * </p>
- *
- * @author 
- * @since 2021-12-24
- */
-@Getter
-@Setter
-public class CameraDetail implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    /**
-     * 余额
-     */
-    private String balance;
-
-    /**
-     * 用户表t_user的id
-     */
-    private Long userId;
-
-    /**
-     * 0表示客户,1表示员工,2表示赠送,3表示其他,4经销商销售
-     */
-    private Integer own;
-
-    /**
-     * 订单号
-     */
-    private String orderSn;
-
-    /**
-     * 0表示本国,1表示国外
-     */
-    private Integer country;
-
-    /**
-     * 经销商
-     */
-    private String agency;
-
-    /**
-     * 相机类型,0表示双目,1四维看看pro,2 四维看看lite,9 双目转台,10 激光转台
-     */
-    private Integer cameraType;
-
-    /**
-     * 总容量
-     */
-    private Long totalSpace;
-
-    /**
-     * 已使用容量
-     */
-    private Long usedSpace;
-
-    /**
-     * 相机主表t_camera的id
-     */
-    private Long cameraId;
-
-    /**
-     * 商品表t_goods的id
-     */
-    private Long goodsId;
-
-    /**
-     * 企业表t_company的id
-     */
-    private Long companyId;
-
-    /**
-     * 代理商架构管理t_agent_framework的id
-     */
-    private Long agentFrameworkId;
-
-    /**
-     * 相机协作用户id
-     */
-    private Long cooperationUser;
-
-    /**
-     * 设备地址(追溯管理后台)
-     */
-    private String address;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 更新时间
-     */
-    private Date updateTime;
-
-    /**
-     * 记录的状态,A: 生效,I: 禁用
-     */
-    private String recStatus;
-
-    /**
-     * 0正常,1删除
-     */
-    private Integer tbStatus;
-
-
-}

+ 0 - 96
4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/Company.java

@@ -1,96 +0,0 @@
-package com.fdkankan.platform.api.dto;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 客户企业logo信息
- * </p>
- *
- * @author 
- * @since 2021-12-24
- */
-@Getter
-@Setter
-public class Company implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    /**
-     * 公司名称
-     */
-    private String companyName;
-
-    /**
-     * 顶部logo
-     */
-    private String topLogo;
-
-    /**
-     * 地面logo
-     */
-    private String floorLogo;
-
-    /**
-     * 地面点位logo
-     */
-    private String markerLogo;
-
-    /**
-     * 二维码logo
-     */
-    private String qrLogo;
-
-    /**
-     * 是否显示初始logo,0隐藏,1显示
-     */
-    private Integer showLogo;
-
-    /**
-     * t_manager表的id
-     */
-    private Long managerId;
-
-    /**
-     * 新增的相机是否注册,0否,1删
-     */
-    private Integer cameraDelete;
-
-    /**
-     * 数据同步类型
-     */
-    private String dataSync;
-
-    /**
-     * 数据同步方式
-     */
-    private Integer dataSyncAction;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 更新时间
-     */
-    private Date updateTime;
-
-    /**
-     * 记录的状态,A: 生效,I: 禁用
-     */
-    private String recStatus;
-
-    /**
-     * 0正常,1删除
-     */
-    private Integer tbStatus;
-
-
-}

+ 0 - 121
4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/User.java

@@ -1,121 +0,0 @@
-package com.fdkankan.platform.api.dto;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 用户信息表
- * </p>
- *
- * @author 
- * @since 2021-12-24
- */
-@Getter
-@Setter
-public class User implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    /**
-     * 头像对应的链接地址
-     */
-    private String head;
-
-    /**
-     * 用户密码
-     */
-    private String password;
-
-    /**
-     * 用户邮箱
-     */
-    private String email;
-
-    /**
-     * 注册时间
-     */
-    private Date registerTime;
-
-    /**
-     * 用户名
-     */
-    private String userName;
-
-    /**
-     * 昵称
-     */
-    private String nickName;
-
-    /**
-     * 0表示禁言(bbs)
-     */
-    private Integer status;
-
-    /**
-     * 0表示拒绝通知,1表示接受通知
-     */
-    private Integer isNotice;
-
-    /**
-     * 机构名称
-     */
-    private String organizationName;
-
-    /**
-     * 主页链接
-     */
-    private String mainPage;
-
-    /**
-     * 所在国家,默认是86
-     */
-    private String country;
-
-    /**
-     * 所在省份
-     */
-    private String province;
-
-    /**
-     * 所在城市
-     */
-    private String city;
-
-    /**
-     * 可下载场景总数
-     */
-    private Integer downloadNumTotal;
-
-    /**
-     * 已下载场景总数
-     */
-    private Integer downloadNum;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 记录的状态,A: 生效,I: 禁用
-     */
-    private String recStatus;
-
-    /**
-     * 更新时间
-     */
-    private Date updateTime;
-
-    /**
-     * 0正常,1删除
-     */
-    private Integer tbStatus;
-
-
-}

+ 0 - 88
4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/dto/UserIncrement.java

@@ -1,88 +0,0 @@
-package com.fdkankan.platform.api.dto;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 用户增值权益表
- * </p>
- *
- * @author 
- * @since 2021-12-24
- */
-@Getter
-@Setter
-public class UserIncrement implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    /**
-     * 权益包标识
-     */
-    private String keyWord;
-
-    /**
-     * 用户表t_user的id
-     */
-    private Long userId;
-
-    /**
-     * 相机主表t_camera的id
-     */
-    private Long cameraId;
-
-    /**
-     * 会员权益类型Id
-     */
-    private Integer incrementTypeId;
-
-    /**
-     * 结束时间
-     */
-    private Date incrementEndTime;
-
-    /**
-     * 是否过期(1过期,0未过期)
-     */
-    private Integer isExpired;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 记录的状态,A: 生效,I: 禁用
-     */
-    private String recStatus;
-
-    /**
-     * 更新时间
-     */
-    private Date updateTime;
-
-    /**
-     * 扩容订单集合
-     */
-    private String orderSn;
-
-    /**
-     * 生效时间
-     */
-    private Date incrementStartTime;
-
-    private Integer downloadNum;
-
-    /**
-     * 0正常,1删除
-     */
-    private Integer tbStatus;
-
-
-}

+ 0 - 65
4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/feign/PlatformGoodsClient.java

@@ -1,65 +0,0 @@
-package com.fdkankan.platform.api.feign;
-
-import com.fdkankan.common.response.ResultData;
-import com.fdkankan.platform.api.dto.Camera;
-import com.fdkankan.platform.api.dto.CameraDetail;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.List;
-
-@FeignClient(value = "4dkankan-center-platform",contextId = "platformGoodsClient")
-@RequestMapping("/platform/feign/goods")
-public interface PlatformGoodsClient {
-
-    /**
-     *
-     * @return Camera
-     */
-    @PostMapping("/getCameraByChildName")
-    ResultData<Camera> getCameraByChildName(@RequestParam(value = "childName",required = false) String childName);
-
-    /**
-     *
-     * @return CameraDetail
-     */
-    @PostMapping("/getCameraDetailByCameraId")
-    ResultData<CameraDetail> getCameraDetailByCameraId(@RequestParam(value = "cameraId",required = false) Long cameraId);
-
-    /**
-     *
-     * @return CameraDetail
-     */
-    @PostMapping("/updateCameraDetailByCameraIdAndSpace")
-    ResultData<CameraDetail> updateCameraDetailByCameraIdAndSpace(@RequestParam(value = "cameraId", required = false) Long cameraId,
-                                                           @RequestParam(value = "space", required = false) Long space);
-    /**
-     *
-     * @return Camera
-     */
-    @PostMapping("/getCameraBySnCode")
-    ResultData<Camera> getCameraBySnCode(@RequestParam(value = "snCode", required = false) String snCode);
-
-    /**
-     *
-     * @return Camera
-     */
-    @PostMapping("/getByChildNameAndChildPassword")
-    ResultData<Camera> getByChildNameAndChildPassword(@RequestParam(value = "appUserName") String appUserName,
-                                                      @RequestParam(value = "appPassword") String appPassword);
-
-    /**
-     *
-     * @return Camera
-     */
-    @PostMapping("/getCameraById")
-    ResultData<Camera> getCameraById(@RequestParam(value = "cameraId") Long cameraId);
-
-    @PostMapping("/getCameraLikeSnCode")
-    ResultData<List<Camera>> getCameraLikeSnCode(@RequestParam(value = "searchKey")String searchKey);
-
-    @PostMapping("/test")
-    ResultData<String> test();
-}

+ 0 - 9
4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/feign/PlatformOrderClient.java

@@ -1,9 +0,0 @@
-package com.fdkankan.platform.api.feign;
-
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-@FeignClient(value = "4dkankan-center-platform",contextId = "platformOrderClient")
-@RequestMapping("/platform/feign/order")
-public interface PlatformOrderClient {
-}

+ 0 - 63
4dkankan-center-api/4dkankan-center-platform-api/src/main/java/com/fdkankan/platform/api/feign/PlatformUserClient.java

@@ -1,63 +0,0 @@
-package com.fdkankan.platform.api.feign;
-
-import com.fdkankan.common.response.ResultData;
-import com.fdkankan.common.user.SSOUser;
-import com.fdkankan.platform.api.dto.*;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.List;
-
-@FeignClient(value = "4dkankan-center-platform",contextId = "platformUserClient")
-@RequestMapping("/platform/feign/user")
-public interface PlatformUserClient {
-    /**
-     *
-     * @return SSOUser
-     */
-    @PostMapping("/getSSOUserByUserId")
-    ResultData<SSOUser> getSSOUserByUserId(@RequestParam(value = "userId", required = false) Long userId) ;
-
-    /**
-     *
-     * @return company
-     */
-    @PostMapping("/getCompanyById")
-    ResultData<Company> getCompanyById(@RequestParam(value = "companyId", required = false) Long companyId) ;
-    /**
-     *
-     * @return user
-     */
-    @PostMapping("/getUserByName")
-    ResultData<User> getUserByName(@RequestParam(value = "userName", required = false) String userName) ;
-    /**
-     *
-     * @return UserIncrement
-     */
-    @PostMapping("/getUserIncrementByCameraId")
-    ResultData<UserIncrement> getUserIncrementByCameraId(@RequestParam(value = "cameraId", required = false) Long cameraId);
-    /**
-     *
-     * @return User
-     */
-    @PostMapping("/getUserByUserId")
-    ResultData<User> getUserByUserId(@RequestParam(value = "userId") Long userId);
-
-    /**
-     * @param searchKey 模糊查询
-     */
-    @PostMapping("/getUserLikeUserName")
-    ResultData<List<User>> getUserLikeUserName(@RequestParam(value = "searchKey") String searchKey);
-
-    /**
-     * 更改用户场景已下载次数
-     * @param userId
-     * @param downLoadNum
-     * @return
-     */
-    @PostMapping("/updateDownloadNum")
-    ResultData updateDownloadNum(@RequestParam(value = "userId") long userId,
-        @RequestParam(value = "downLoadNum") int downLoadNum);
-}

+ 0 - 15
4dkankan-center-api/4dkankan-center-scene-api/pom.xml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>4dkankan-center-api</artifactId>
-        <groupId>com.fdkankan</groupId>
-        <version>2.0.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>4dkankan-center-scene-api</artifactId>
-
-
-</project>

+ 0 - 38
4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/SceneCntDTO.java

@@ -1,38 +0,0 @@
-package com.fdkankan.scene.api.dto;
-
-import java.io.Serializable;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/3/3
- **/
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class SceneCntDTO implements Serializable {
-
-    /**
-     * 双目场景数量
-     */
-    private Long sceneCnt;
-
-    /**
-     * 八目场景数量
-     */
-    private Long sceneProCnt;
-
-    /**
-     * 协作场景数量
-     */
-    private Long CooperSceneCnt;
-
-}

+ 0 - 69
4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/SceneEditControlsDTO.java

@@ -1,69 +0,0 @@
-package com.fdkankan.scene.api.dto;
-
-import java.io.Serializable;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/1/18
- **/
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class SceneEditControlsDTO implements Serializable {
-
-    /**
-     * 是否展示小地图(0-不展示,1-展示)
-     */
-    private Integer showMap;
-
-    /**
-     * 是否需要密码(0-不需要,1-需要)
-     */
-    private Integer showLock;
-
-    /**
-     * 是否展示标题(0-不需要,1-需要)
-     */
-    private Integer showTitle;
-
-    /**
-     * 是否展示漫游按钮(0-不需要,1-需要)
-     */
-    private Integer showPanorama;
-
-    /**
-     * 是否展示3D按钮(0-不需要,1-需要)
-     */
-    private Integer showDollhouse;
-
-    /**
-     * 是否展示2D按钮(0-不需要,1-需要)
-     */
-    private Integer showFloorplan;
-
-    /**
-     * 是否展示VR(0-不需要,1-需要)
-     */
-    private Integer showVR;
-
-    /**
-     * 是否展示自动导览(0-不需要,1-需要)
-     */
-    private Integer showTour;
-
-    /**
-     * 是否展示测量线(0-不需要,1-需要)
-     */
-    private Integer showRule;
-
-
-}

+ 0 - 163
4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/SceneInfoDTO.java

@@ -1,163 +0,0 @@
-package com.fdkankan.scene.api.dto;
-
-import java.util.Date;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/1/19
- **/
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class SceneInfoDTO {
-
-    /**
-     * 场景码
-     */
-    private String num;
-
-    /**
-     * 地面logo名称
-     */
-    private String floorLogo;
-
-    /**
-     * 地面logo大小
-     */
-    private Integer floorLogoSize;
-
-    /**
-     * 地面logo文件名称
-     */
-    private String floorLogoFile;
-
-    /**
-     * 背景音乐
-     */
-    private String music;
-
-    /**
-     * 背景音乐文件名称
-     */
-    private String musicFile;
-
-    /**
-     * 浏览密码
-     */
-    private String scenePassword;
-
-    /**
-     * 场景标题
-     */
-    private String title;
-
-    /**
-     * 场景描述
-     */
-    private String description;
-
-    private SceneEditControlsDTO controls;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-//    /**
-//     * 点位数量
-//     */
-//    private Integer panoCount;
-//
-//    /**
-//     * 球幕视频数量
-//     */
-//    private Integer videoCount;
-
-    /**
-     * 版本
-     */
-    private Integer version;
-
-    /**
-     * 是否上传了户型图(0-否,1-是)
-     */
-    private Byte floorPlanUser;
-
-//    private String cadInfo;
-//
-//    private Byte isUploadObj;
-//
-//    private Integer floorEditVer;
-//
-//    private Integer floorPublishVer;
-
-    /**
-     * 初始点信息
-     */
-    private String entry;
-
-    /**
-     * 全景图加载方式,tiles/1k:1k瓦片图,tiles/2:2k瓦片图,tiles/4k:4k瓦片图,pan:全景图 ,local:本地切片,cube:立体图
-     */
-    private String sceneResolution;
-
-    /**
-     * 场景来源,lite:双目lite相机,pro:八目相机,minion:双面转台相机,laser:激光相机,virtual:虚拟场景,sketch:图片建模场景
-     */
-    private String sceneFrom;
-
-    /**
-     * 视频覆盖数据
-     */
-    private String boxVideos;
-
-    /**
-     *点位视频
-     */
-    private String videos;
-
-    /**
-     * 是否有热点数据
-     */
-    private Integer tags;
-
-    /**
-     * 加载logo名
-     */
-    private String loadingLogo;
-
-    /**
-     * 加载logo文件名
-     */
-    private String loadingLogoFile;
-
-    /**
-     * 数据同步方式
-     */
-    private String dataSync;
-
-    /**
-     * 户型角度
-     */
-    private Float floorPlanAngle;
-
-    /**
-     * 指南针角度
-     */
-    private Float floorPlanCompass;
-
-    private Integer sceneSource;
-
-
-
-
-}

+ 0 - 223
4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/ScenePODTO.java

@@ -1,223 +0,0 @@
-package com.fdkankan.scene.api.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.util.Date;
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class ScenePODTO {
-
-    private Long id;
-
-    /**
-     * 场景名称
-     */
-    private String sceneName;
-
-    /**
-     * 场景描述
-     */
-    private String sceneDec;
-
-    /**
-     * 场景的链接地址
-     */
-    private String webSite;
-
-    /**
-     * 场景缩略图
-     */
-    private String thumb;
-
-    /**
-     * 0表示未建好,1表示建好,-1表示出错,-2表示不要在官网上显示
-     */
-    private Integer sceneStatus;
-
-    /**
-     * 原始的大场景数据(七牛)
-     */
-    private String dataSource;
-
-    /**
-     * 用户表t_user的id
-     */
-    private Long userId;
-
-    /**
-     * 0表示未付款,1表示付款了,-1表示欠费
-     */
-    private Integer payStatus;
-
-    /**
-     * 相机主表t_camera的id
-     */
-    private Long cameraId;
-
-    /**
-     * 手机id
-     */
-    private String phoneId;
-
-    /**
-     * 大场景序号
-     */
-    private String num;
-
-    /**
-     * 大场景的密钥
-     */
-    private String sceneKey;
-
-    /**
-     * 0表示其他,1表示文博,2表示地产,3表示电商,4表示餐饮,5表示家居
-     */
-    private Integer sceneType;
-
-    /**
-     * 1表示推荐,0表示正常
-     */
-    private Integer recommend;
-
-    /**
-     * 浏览次数
-     */
-    private Integer viewCount;
-
-    /**
-     * 版本
-     */
-    private Integer version;
-
-    /**
-     * 表示缩略图是否存在
-     */
-    private Integer thumbStatus;
-
-    /**
-     * 0表示默认,1表示自己上传
-     */
-    private String floorLogo;
-
-    /**
-     * 标记大小
-     */
-    private Integer floorLogoSize;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 更新时间
-     */
-    private Date updateTime;
-
-    /**
-     * 0-有效,1-删除
-     */
-    private Integer tbStatus;
-
-    private String hotsIds;
-
-    /**
-     * 表示初始点信息
-     */
-    private String entry;
-
-    /**
-     * 拍摄数量
-     */
-    private Integer shootCount;
-
-    /**
-     * 风格
-     */
-    private Integer style;
-
-    /**
-     * 要gps定位
-     */
-    private String gps;
-
-    /**
-     * 方案:1是双目,2是转台,3是六目,4是八目
-     */
-    private Integer sceneScheme;
-
-    /**
-     * 背景音乐名称
-     */
-    private String bgMusic;
-
-    /**
-     * 记录的状态,A: 生效,I: 禁用
-     */
-    private String recStatus;
-
-    /**
-     * 普通录屏文件地址
-     */
-    private String screencapVoiceSrc;
-
-    /**
-     * 旧版录屏数据地址
-     */
-    private String screencapMusic;
-
-    /**
-     * 录屏文件个数
-     */
-    private Integer screencapLen;
-
-    /**
-     * 录音文件地址
-     */
-    private String screencapVoiceSound;
-
-    /**
-     * 选择的类型,sound为screencapVoiceSound,file为screencapVoiceSrc
-     */
-    private String screencapVoiceType;
-
-    /**
-     * 录屏文件地址
-     */
-    private String playData;
-
-    /**
-     * 算法类型
-     */
-    private String algorithm;
-
-    /**
-     * oss服务商
-     */
-    private String oss;
-
-    /**
-     * 重新建模的版本
-     */
-    private Integer floorEditVer;
-
-    /**
-     * 正式发布重新建模的版本
-     */
-    private Integer floorPublishVer;
-
-    /**
-     * 使用容量
-     */
-    private Long space;
-
-    /**
-     * 录屏图片存放文件
-     */
-    private String screencapThumb;
-
-}

+ 0 - 141
4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/SceneProDTO.java

@@ -1,141 +0,0 @@
-package com.fdkankan.scene.api.dto;
-
-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>
- * pro场景表
- * </p>
- *
- * @author 
- * @since 2022-01-20
- */
-@Getter
-@Setter
-@TableName("t_scene_pro")
-public class SceneProDTO implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 场景名称
-     */
-    @TableField("scene_name")
-    private String sceneName;
-
-    /**
-     * 场景描述
-     */
-    @TableField("scene_dec")
-    private String sceneDec;
-
-    /**
-     * 场景的链接地址
-     */
-    @TableField("web_site")
-    private String webSite;
-
-    /**
-     * 场景缩略图
-     */
-    @TableField("thumb")
-    private String thumb;
-
-    /**
-     * 用户表t_user的id
-     */
-    @TableField("user_id")
-    private Long userId;
-
-    /**
-     * 相机主表t_camera的id
-     */
-    @TableField("camera_id")
-    private Long cameraId;
-
-    /**
-     * 场景logo
-     */
-    @TableField("scene_logo")
-    private String sceneLogo;
-
-    /**
-     * 大场景序号
-     */
-    @TableField("num")
-    private String num;
-
-    /**
-     * 0-其他,1-文博,2-地产,3-电商,4-餐饮,5-家居,99-一件换装虚拟房源
-     */
-    @TableField("scene_type")
-    private Integer sceneType;
-
-    /**
-     * 点位视频
-     */
-    @TableField("videos")
-    private String videos;
-
-    /**
-     * 要gps定位
-     */
-    @TableField("gps")
-    private String gps;
-
-    /**
-     * 方案:1-双目,2-转台,3-六目,4-八目,10-获取4k图,11-获取2k,12-获取1k
-     */
-    @TableField("scene_scheme")
-    private Integer sceneScheme;
-
-    /**
-     * 0表示未付款,1表示付款了,-1表示欠费,-2表示容量不足
-     */
-    @TableField("pay_status")
-    private Integer payStatus;
-
-    /**
-     * 0表示未建好,1表示建好,-1表示出错,-2表示不要在官网上显示
-     */
-    @TableField("scene_status")
-    private Integer sceneStatus;
-
-    /**
-     * 算法类型(V2,V3)
-     */
-    @TableField("build_type")
-    private String buildType;
-
-    /**
-     * 创建时间
-     */
-    @TableField("create_time")
-    private Date createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField("update_time")
-    private Date updateTime;
-
-    /**
-     * 0-有效,1-删除
-     */
-    @TableField("tb_status")
-    @TableLogic
-    private Integer tbStatus;
-
-
-}

+ 0 - 90
4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/feign/SceneUserSceneClient.java

@@ -1,90 +0,0 @@
-package com.fdkankan.scene.api.feign;
-
-import com.fdkankan.common.response.ResultData;
-import com.fdkankan.scene.api.dto.SceneCntDTO;
-import com.fdkankan.scene.api.dto.SceneInfoDTO;
-import com.fdkankan.scene.api.dto.ScenePODTO;
-import com.fdkankan.scene.api.dto.SceneProDTO;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.List;
-
-@FeignClient(value = "4dkankan-center-scene",contextId = "sceneUserSceneClient")
-@RequestMapping("/scene/feign/user/scene")
-public interface SceneUserSceneClient {
-
-    @PostMapping("/getSceneCnt")
-    ResultData<SceneCntDTO> getSceneCnt(@RequestParam(value = "userId") Long userId, @RequestParam(value = "cameraId") Long cameraId) ;
-
-    @PostMapping("/getSceneNumByCameraId")
-    ResultData<Integer> getSceneNumByCameraId(@RequestParam(value = "cameraId") Long cameraId,
-                                              @RequestParam(value = "cameraType")Integer cameraType,
-                                              @RequestParam(value = "snCode")String snCode) ;
-
-    @PostMapping("/getLastSceneByCameraId")
-    ResultData<SceneProDTO> getLastSceneByCameraId(@RequestParam(value = "cameraId") Long cameraId) ;
-
-    @PostMapping("/updateSceneDownloadLog")
-    ResultData updateSceneDownloadLog(
-        @RequestParam(value = "num") String num,
-        @RequestParam(value = "status") Integer status,
-        @RequestParam(value = "url", required = false) String url,
-        @RequestParam(value = "reason", required = false) String reason);
-
-    @PostMapping("/getSceneViewInfo")
-    ResultData<SceneInfoDTO> getSceneViewInfo(@RequestParam(value = "num") String num) throws Exception;
-
-    @PostMapping("/lockBeyondSpaceScenes")
-    ResultData lockBeyondSpaceScenes(@RequestParam(value = "usedSpace")Long usedSpace,
-                                     @RequestParam(value = "totalSpace")Long totalSpace,
-                                     @RequestParam(value = "cameraId")Long cameraId);
-
-    @PostMapping("/unlockBeyondSpaceScenes")
-    ResultData unlockBeyondSpaceScenes(@RequestParam(value = "usedSpace")Long usedSpace,
-                                       @RequestParam(value = "cameraId")Long cameraId);
-
-    @PostMapping("/findAllByYesterday")
-    ResultData<List<ScenePODTO>> findAllByYesterday();
-
-    @PostMapping("/updatePayStatus")
-    ResultData updatePayStatus(@RequestParam(value = "num") String num ,
-                               @RequestParam(value = "payStatus") Integer payStatus);
-
-    @PostMapping("/updateUserIdByCameraId")
-    ResultData updateUserIdByCameraId(@RequestParam(value = "userId")Long userId,
-                                      @RequestParam(value = "cameraId")Long cameraId);
-
-    @PostMapping("/getSceneCount")
-    ResultData getSceneCount(@RequestParam(value = "cameraId") Long cameraId,
-                             @RequestParam(value = "userId") Long userId,
-                             @RequestParam(value = "cameraType") Integer cameraType);
-
-    @PostMapping("/disableCooperation")
-    ResultData disableCooperation(@RequestParam(value = "cameraId")Long cameraId,
-                                 @RequestParam(value = "snCode")String snCode,
-                                 @RequestParam(value = "cooperationUserName")String cooperationUserName);
-
-    @PostMapping("/saveCooperation")
-    ResultData saveCooperation(@RequestParam(value = "cameraId") Long cameraId,
-                               @RequestParam(value = "resourceIds") String resourceIds,
-                               @RequestParam(value = "userId") Long userId,
-                               @RequestParam(value = "snCode")String snCode,
-                               @RequestParam(value = "cooperationUserName")String cooperationUserName);
-
-    @PostMapping("/updateImageVersionFromSceneProEdit")
-    ResultData updateImageVersionFromSceneProEdit(@RequestParam(value = "num" ) String num);
-
-    @PostMapping("/getSceneResourceByCameraId")
-    ResultData getSceneResourceByCameraId(@RequestParam(value = "cameraId" ) Long cameraId);
-
-    @PostMapping("/checkDownLoad")
-    ResultData checkDownLoad(@RequestParam(value = "sceneNum") String sceneNum);
-
-    @PostMapping("/findByCameraIds")
-    ResultData findByCameraIds(@RequestParam(value = "cameraIds") String cameraIds,
-                                      @RequestParam(value = "startTime") String startTime,
-                                      @RequestParam(value = "endTime")   String endTime);
-}

+ 0 - 56
4dkankan-center-api/pom.xml

@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <packaging>pom</packaging>
-    <parent>
-        <artifactId>4dkankan-parent</artifactId>
-        <groupId>com.fdkankan</groupId>
-        <version>2.0.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>4dkankan-center-api</artifactId>
-    <modules>
-        <module>4dkankan-center-scene-api</module>
-        <module>4dkankan-center-platform-api</module>
-    </modules>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-openfeign</artifactId>
-        </dependency>
-
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-loadbalancer</artifactId>
-        </dependency>
-
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>

+ 2 - 13
4dkankan-center-scene/pom.xml

@@ -13,25 +13,14 @@
 
 
     <properties>
     <properties>
         <java.version>1.8</java.version>
         <java.version>1.8</java.version>
+        <servlet-api-version>2.4</servlet-api-version>
     </properties>
     </properties>
 
 
     <dependencies>
     <dependencies>
 
 
         <dependency>
         <dependency>
             <groupId>com.fdkankan</groupId>
             <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-center-scene-api</artifactId>
-            <version>2.0.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-center-platform-api</artifactId>
-            <version>2.0.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-common</artifactId>
+            <artifactId>4dkankan-common-web</artifactId>
             <version>2.0.0-SNAPSHOT</version>
             <version>2.0.0-SNAPSHOT</version>
         </dependency>
         </dependency>
 
 

+ 3 - 6
4dkankan-center-scene/src/main/java/com/fdkankan/scene/Interceptor/CheckCooperationPermitAspect.java

@@ -1,19 +1,16 @@
 package com.fdkankan.scene.Interceptor;
 package com.fdkankan.scene.Interceptor;
 
 
-import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.StrUtil;
 import com.fdkankan.common.constant.CommonStatus;
 import com.fdkankan.common.constant.CommonStatus;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.ErrorCode;
-import com.fdkankan.common.constant.ServerCode;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.exception.BusinessException;
-import com.fdkankan.common.user.SSOLoginHelper;
-import com.fdkankan.common.util.WebUtil;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.util.RedisUtil;
 import com.fdkankan.redis.util.RedisUtil;
 import com.fdkankan.scene.entity.ScenePlus;
 import com.fdkankan.scene.entity.ScenePlus;
 import com.fdkankan.scene.service.IScenePlusService;
 import com.fdkankan.scene.service.IScenePlusService;
+import com.fdkankan.web.user.SSOLoginHelper;
+import com.fdkankan.web.util.WebUtil;
 import java.io.IOException;
 import java.io.IOException;
-import java.util.Map;
 import java.util.Objects;
 import java.util.Objects;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import lombok.extern.log4j.Log4j2;
 import lombok.extern.log4j.Log4j2;
@@ -56,7 +53,7 @@ public class CheckCooperationPermitAspect {
 	public void doBefore(JoinPoint joinPoint) throws Exception {
 	public void doBefore(JoinPoint joinPoint) throws Exception {
 		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
 		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
 		// 读取session中的用户
 		// 读取session中的用户
-		com.fdkankan.common.model.SSOUser user = ssoLoginHelper.loginCheckV3(request.getHeader("token"));
+		com.fdkankan.web.model.SSOUser user = ssoLoginHelper.loginCheckV3(request.getHeader("token"));
 		if(Objects.isNull(user)){
 		if(Objects.isNull(user)){
 			throw new BusinessException(ErrorCode.TOKEN_NOT_FOUND);
 			throw new BusinessException(ErrorCode.TOKEN_NOT_FOUND);
 		}
 		}

+ 1 - 3
4dkankan-center-scene/src/main/java/com/fdkankan/scene/SceneApplication.java

@@ -5,15 +5,13 @@ import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 
 @SpringBootApplication
 @SpringBootApplication
 @EnableTransactionManagement//开启事务
 @EnableTransactionManagement//开启事务
-@EnableFeignClients("com.fdkankan.*.api.feign")
+//@EnableFeignClients("com.fdkankan.*.api.feign")
 @EnableDiscoveryClient
 @EnableDiscoveryClient
 @EnableScheduling
 @EnableScheduling
 @ComponentScan(basePackages = {"com.fdkankan.*"})
 @ComponentScan(basePackages = {"com.fdkankan.*"})

+ 1 - 20
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/FileConvertController.java

@@ -1,30 +1,11 @@
 package com.fdkankan.scene.controller;
 package com.fdkankan.scene.controller;
 
 
-import cn.hutool.core.io.FileTypeUtil;
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.io.IoUtil;
-import cn.hutool.core.lang.UUID;
-import com.dtflys.forest.http.ForestResponse;
-import com.fdkankan.common.constant.ConstantFileName;
-import com.fdkankan.common.constant.ConstantFilePath;
-import com.fdkankan.common.constant.ErrorCode;
-import com.fdkankan.common.controller.BaseController;
-import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
-import com.fdkankan.common.util.CreateObjUtil;
-import com.fdkankan.scene.httpclient.FdkankanMiniClient;
 import com.fdkankan.scene.service.IFileConvertService;
 import com.fdkankan.scene.service.IFileConvertService;
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.nio.file.Paths;
-import javax.servlet.ServletOutputStream;
+import com.fdkankan.web.controller.BaseController;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;

+ 1 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneController.java

@@ -2,7 +2,7 @@ package com.fdkankan.scene.controller;
 
 
 
 
 import com.fdkankan.common.constant.SceneInfoReqType;
 import com.fdkankan.common.constant.SceneInfoReqType;
-import com.fdkankan.common.controller.BaseController;
+import com.fdkankan.web.controller.BaseController;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.scene.service.ISceneEditInfoService;
 import com.fdkankan.scene.service.ISceneEditInfoService;
 import com.fdkankan.scene.service.IScenePlusService;
 import com.fdkankan.scene.service.IScenePlusService;

+ 2 - 2
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneEditController.java

@@ -2,7 +2,7 @@ package com.fdkankan.scene.controller;
 
 
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.SceneInfoReqType;
 import com.fdkankan.common.constant.SceneInfoReqType;
-import com.fdkankan.common.controller.BaseController;
+import com.fdkankan.web.controller.BaseController;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.scene.annotation.CheckCooperationPermit;
 import com.fdkankan.scene.annotation.CheckCooperationPermit;
@@ -524,7 +524,7 @@ public class SceneEditController extends BaseController {
     @CheckCooperationPermit
     @CheckCooperationPermit
     @PostMapping(value = "/getAuth")
     @PostMapping(value = "/getAuth")
     public SceneAuthVO getAuth(@RequestParam("num") String num) throws Exception{
     public SceneAuthVO getAuth(@RequestParam("num") String num) throws Exception{
-        return sceneEditService.getAuth(num, this.getSSOUser());
+        return sceneEditService.getAuth(num, this.getSsoUser());
     }
     }
 
 
     /**
     /**

+ 1 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneUploadController.java

@@ -1,7 +1,7 @@
 package com.fdkankan.scene.controller;
 package com.fdkankan.scene.controller;
 
 
 
 
-import com.fdkankan.common.controller.BaseController;
+import com.fdkankan.web.controller.BaseController;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.scene.service.ISceneUploadService;
 import com.fdkankan.scene.service.ISceneUploadService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/V3Controller.java

@@ -1,6 +1,6 @@
 package com.fdkankan.scene.controller;
 package com.fdkankan.scene.controller;
 
 
-import com.fdkankan.common.controller.BaseController;
+import com.fdkankan.web.controller.BaseController;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.scene.service.ISceneEditInfoService;
 import com.fdkankan.scene.service.ISceneEditInfoService;
 import com.fdkankan.scene.service.IScenePlusService;
 import com.fdkankan.scene.service.IScenePlusService;

+ 0 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/IFileConvertService.java

@@ -1,7 +1,6 @@
 package com.fdkankan.scene.service;
 package com.fdkankan.scene.service;
 
 
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
 
 
 /**
 /**

+ 13 - 5
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/ISceneEditInfoService.java

@@ -1,10 +1,20 @@
 package com.fdkankan.scene.service;
 package com.fdkankan.scene.service;
 
 
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
-import com.fdkankan.scene.api.dto.SceneInfoDTO;
 import com.fdkankan.scene.entity.SceneEditInfo;
 import com.fdkankan.scene.entity.SceneEditInfo;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.fdkankan.scene.vo.*;
+import com.fdkankan.scene.vo.BallScreenVideoParamVO;
+import com.fdkankan.scene.vo.BaseDataParamVO;
+import com.fdkankan.scene.vo.DeleteSidParamVO;
+import com.fdkankan.scene.vo.DownloadVO;
+import com.fdkankan.scene.vo.FileNameAndDataParamVO;
+import com.fdkankan.scene.vo.FileParamVO;
+import com.fdkankan.scene.vo.RenameCadParamVO;
+import com.fdkankan.scene.vo.SceneCheckKeyParamVO;
+import com.fdkankan.scene.vo.SceneEditInfoParamVO;
+import com.fdkankan.scene.vo.SceneEditInfoVO;
+import com.fdkankan.scene.vo.SceneInfoParamVO;
+import com.fdkankan.scene.vo.SceneInfoVO;
 import java.io.IOException;
 import java.io.IOException;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -30,8 +40,6 @@ public interface ISceneEditInfoService extends IService<SceneEditInfo> {
 
 
     SceneInfoVO getSceneInfo(SceneInfoParamVO param) throws Exception;
     SceneInfoVO getSceneInfo(SceneInfoParamVO param) throws Exception;
 
 
-    SceneInfoDTO getSceneInfo4Download(SceneInfoParamVO param) throws Exception;
-
 //    ResultData saveUpload(SaveUploadParamVO param) throws Exception;
 //    ResultData saveUpload(SaveUploadParamVO param) throws Exception;
 
 
     ResultData saveCad(BaseDataParamVO param) throws Exception;
     ResultData saveCad(BaseDataParamVO param) throws Exception;

+ 1 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/ISceneEditService.java

@@ -1,7 +1,7 @@
 package com.fdkankan.scene.service;
 package com.fdkankan.scene.service;
 
 
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
-import com.fdkankan.common.user.SSOUser;
+import com.fdkankan.web.user.SSOUser;
 import com.fdkankan.scene.vo.BaseDataParamVO;
 import com.fdkankan.scene.vo.BaseDataParamVO;
 import com.fdkankan.scene.vo.BaseSceneParamVO;
 import com.fdkankan.scene.vo.BaseSceneParamVO;
 import com.fdkankan.scene.vo.LocalesParamVO;
 import com.fdkankan.scene.vo.LocalesParamVO;

+ 0 - 2
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/IScenePlusService.java

@@ -18,8 +18,6 @@ public interface IScenePlusService extends IService<ScenePlus> {
 
 
     ScenePlus getScenePlusByNum(String num);
     ScenePlus getScenePlusByNum(String num);
 
 
-    ResultData resetSpace(String num) throws Exception;
-
     ResultData checkKey(SceneCheckKeyParamVO param) throws Exception;
     ResultData checkKey(SceneCheckKeyParamVO param) throws Exception;
 
 
     ResultData updateScenePlusUserIdByCameraId(List<Long> cameraIdList, Long userId);
     ResultData updateScenePlusUserIdByCameraId(List<Long> cameraIdList, Long userId);

+ 2 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/CameraDetailServiceImpl.java

@@ -1,5 +1,6 @@
 package com.fdkankan.scene.service.impl;
 package com.fdkankan.scene.service.impl;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fdkankan.scene.entity.CameraDetail;
 import com.fdkankan.scene.entity.CameraDetail;
 import com.fdkankan.scene.mapper.ICameraDetailMapper;
 import com.fdkankan.scene.mapper.ICameraDetailMapper;
 import com.fdkankan.scene.service.ICameraDetailService;
 import com.fdkankan.scene.service.ICameraDetailService;
@@ -19,6 +20,6 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
 
 
     @Override
     @Override
     public CameraDetail getByCameraId(long cameraId) {
     public CameraDetail getByCameraId(long cameraId) {
-        return null;
+        return this.getOne(new LambdaQueryWrapper<CameraDetail>().eq(CameraDetail::getCameraId, cameraId));
     }
     }
 }
 }

+ 0 - 25
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -30,18 +30,12 @@ import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.common.util.SceneUtil;
 import com.fdkankan.common.util.SceneUtil;
 import com.fdkankan.fyun.constant.StorageType;
 import com.fdkankan.fyun.constant.StorageType;
 import com.fdkankan.fyun.oss.UploadToOssUtil;
 import com.fdkankan.fyun.oss.UploadToOssUtil;
-import com.fdkankan.platform.api.feign.PlatformGoodsClient;
-import com.fdkankan.platform.api.feign.PlatformUserClient;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisLockKey;
 import com.fdkankan.redis.constant.RedisLockKey;
 import com.fdkankan.redis.util.RedisLockUtil;
 import com.fdkankan.redis.util.RedisLockUtil;
 import com.fdkankan.redis.util.RedisUtil;
 import com.fdkankan.redis.util.RedisUtil;
-import com.fdkankan.scene.api.dto.SceneInfoDTO;
 import com.fdkankan.scene.bean.BoxPhotoBean;
 import com.fdkankan.scene.bean.BoxPhotoBean;
-import com.fdkankan.scene.bean.RequestSceneProV4;
 import com.fdkankan.scene.bean.SceneJsonBean;
 import com.fdkankan.scene.bean.SceneJsonBean;
-import com.fdkankan.scene.callback.FdkkMiniReqErrorCallback;
-import com.fdkankan.scene.callback.FdkkMiniReqSuccessCallback;
 import com.fdkankan.scene.entity.CameraDetail;
 import com.fdkankan.scene.entity.CameraDetail;
 import com.fdkankan.scene.entity.Company;
 import com.fdkankan.scene.entity.Company;
 import com.fdkankan.scene.entity.SceneDataDownload;
 import com.fdkankan.scene.entity.SceneDataDownload;
@@ -50,7 +44,6 @@ import com.fdkankan.scene.entity.SceneEditInfo;
 import com.fdkankan.scene.entity.SceneEditInfoExt;
 import com.fdkankan.scene.entity.SceneEditInfoExt;
 import com.fdkankan.scene.entity.ScenePlus;
 import com.fdkankan.scene.entity.ScenePlus;
 import com.fdkankan.scene.entity.ScenePlusExt;
 import com.fdkankan.scene.entity.ScenePlusExt;
-import com.fdkankan.scene.httpclient.FdkankanMiniClient;
 import com.fdkankan.scene.mapper.ISceneEditInfoMapper;
 import com.fdkankan.scene.mapper.ISceneEditInfoMapper;
 import com.fdkankan.scene.service.ICameraDetailService;
 import com.fdkankan.scene.service.ICameraDetailService;
 import com.fdkankan.scene.service.ICompanyService;
 import com.fdkankan.scene.service.ICompanyService;
@@ -151,18 +144,12 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
     @Autowired
     @Autowired
     ISceneDataDownloadService sceneDataDownloadService;
     ISceneDataDownloadService sceneDataDownloadService;
     @Autowired
     @Autowired
-    PlatformGoodsClient platformGoodsClient;
-    @Autowired
-    PlatformUserClient platformUserClient;
-    @Autowired
     private ISceneEditInfoExtService sceneEditInfoExtService;
     private ISceneEditInfoExtService sceneEditInfoExtService;
     @Autowired
     @Autowired
     IScenePlusService scenePlusService;
     IScenePlusService scenePlusService;
     @Autowired
     @Autowired
     IScenePlusExtService scenePlusExtService;
     IScenePlusExtService scenePlusExtService;
     @Autowired
     @Autowired
-    private FdkankanMiniClient fdkankanMiniClient;
-    @Autowired
     private ISceneUploadService sceneUploadService;
     private ISceneUploadService sceneUploadService;
     @Autowired
     @Autowired
     private ICameraDetailService cameraDetailService;
     private ICameraDetailService cameraDetailService;
@@ -404,18 +391,6 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
         return null;
         return null;
     }
     }
 
 
-    @Override
-    public SceneInfoDTO getSceneInfo4Download(SceneInfoParamVO param) throws Exception{
-        SceneInfoVO sceneInfo4View = this.getSceneInfo4View(param.getNum());
-        if(Objects.isNull(sceneInfo4View)){
-            return null;
-        }
-        SceneInfoDTO sceneInfoDTO = BeanUtil.copyProperties(sceneInfo4View, SceneInfoDTO.class);
-        ScenePlus scenePlus = scenePlusService.getScenePlusByNum(param.getNum());
-        sceneInfoDTO.setSceneSource(scenePlus.getSceneSource());
-        return sceneInfoDTO;
-    }
-
     /**
     /**
      * <p>
      * <p>
             编辑页面获取场景详情信息
             编辑页面获取场景详情信息

+ 1 - 7
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneEditServiceImpl.java

@@ -12,11 +12,8 @@ import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.UploadFilePath;
 import com.fdkankan.common.constant.UploadFilePath;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
-import com.fdkankan.common.user.SSOUser;
 import com.fdkankan.common.util.DateExtUtil;
 import com.fdkankan.common.util.DateExtUtil;
 import com.fdkankan.fyun.oss.UploadToOssUtil;
 import com.fdkankan.fyun.oss.UploadToOssUtil;
-import com.fdkankan.platform.api.feign.PlatformGoodsClient;
-import com.fdkankan.platform.api.feign.PlatformUserClient;
 import com.fdkankan.scene.entity.Camera;
 import com.fdkankan.scene.entity.Camera;
 import com.fdkankan.scene.entity.CameraDetail;
 import com.fdkankan.scene.entity.CameraDetail;
 import com.fdkankan.scene.entity.SceneCooperation;
 import com.fdkankan.scene.entity.SceneCooperation;
@@ -40,6 +37,7 @@ import com.fdkankan.scene.vo.BaseSceneParamVO;
 import com.fdkankan.scene.vo.DeleteFileParamVO;
 import com.fdkankan.scene.vo.DeleteFileParamVO;
 import com.fdkankan.scene.vo.LocalesParamVO;
 import com.fdkankan.scene.vo.LocalesParamVO;
 import com.fdkankan.scene.vo.SceneAuthVO;
 import com.fdkankan.scene.vo.SceneAuthVO;
+import com.fdkankan.web.user.SSOUser;
 import java.io.IOException;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.ArrayList;
@@ -74,10 +72,6 @@ public class SceneEditServiceImpl implements ISceneEditService {
     @Value("${http.api.isLogin}")
     @Value("${http.api.isLogin}")
     private String URL_ISLOGIN;
     private String URL_ISLOGIN;
     @Autowired
     @Autowired
-    PlatformGoodsClient platformGoodsClient;
-    @Autowired
-    PlatformUserClient platformUserClient;
-    @Autowired
     IScenePlusService scenePlusService;
     IScenePlusService scenePlusService;
     @Autowired
     @Autowired
     private UploadToOssUtil uploadToOssUtil;
     private UploadToOssUtil uploadToOssUtil;

+ 0 - 43
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/ScenePlusServiceImpl.java

@@ -1,8 +1,6 @@
 package com.fdkankan.scene.service.impl;
 package com.fdkankan.scene.service.impl;
 
 
-import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -11,41 +9,22 @@ import com.fdkankan.common.constant.PayStatus;
 import com.fdkankan.common.constant.SceneStatus;
 import com.fdkankan.common.constant.SceneStatus;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
-import com.fdkankan.common.user.SSOUser;
-import com.fdkankan.common.util.DateExtUtil;
-import com.fdkankan.platform.api.feign.PlatformGoodsClient;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisLockKey;
 import com.fdkankan.redis.constant.RedisLockKey;
 import com.fdkankan.redis.util.RedisLockUtil;
 import com.fdkankan.redis.util.RedisLockUtil;
 import com.fdkankan.redis.util.RedisUtil;
 import com.fdkankan.redis.util.RedisUtil;
-import com.fdkankan.scene.entity.Camera;
-import com.fdkankan.scene.entity.CameraDetail;
-import com.fdkankan.scene.entity.SceneCooperation;
 import com.fdkankan.scene.entity.SceneEditInfo;
 import com.fdkankan.scene.entity.SceneEditInfo;
 import com.fdkankan.scene.entity.ScenePlus;
 import com.fdkankan.scene.entity.ScenePlus;
 import com.fdkankan.scene.entity.ScenePlusExt;
 import com.fdkankan.scene.entity.ScenePlusExt;
-import com.fdkankan.scene.entity.SceneResource;
-import com.fdkankan.scene.entity.User;
-import com.fdkankan.scene.entity.UserIncrement;
 import com.fdkankan.scene.mapper.IScenePlusMapper;
 import com.fdkankan.scene.mapper.IScenePlusMapper;
-import com.fdkankan.scene.service.ICameraDetailService;
-import com.fdkankan.scene.service.ICameraService;
-import com.fdkankan.scene.service.ISceneCooperationService;
 import com.fdkankan.scene.service.ISceneEditInfoService;
 import com.fdkankan.scene.service.ISceneEditInfoService;
 import com.fdkankan.scene.service.IScenePlusExtService;
 import com.fdkankan.scene.service.IScenePlusExtService;
 import com.fdkankan.scene.service.IScenePlusService;
 import com.fdkankan.scene.service.IScenePlusService;
-import com.fdkankan.scene.service.ISceneResourceService;
-import com.fdkankan.scene.service.IUserIncrementService;
-import com.fdkankan.scene.service.IUserService;
 import com.fdkankan.scene.vo.SceneCheckKeyParamVO;
 import com.fdkankan.scene.vo.SceneCheckKeyParamVO;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
 import java.util.List;
 import java.util.List;
 import java.util.Objects;
 import java.util.Objects;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 /**
 /**
@@ -63,8 +42,6 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
     @Autowired
     @Autowired
     private IScenePlusExtService scenePlusExtService;
     private IScenePlusExtService scenePlusExtService;
     @Autowired
     @Autowired
-    private PlatformGoodsClient platformGoodsClient;
-    @Autowired
     private IScenePlusService scenePlusService;
     private IScenePlusService scenePlusService;
     @Autowired
     @Autowired
     ISceneEditInfoService sceneEditInfoService;
     ISceneEditInfoService sceneEditInfoService;
@@ -79,26 +56,6 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
     }
     }
 
 
     @Override
     @Override
-    public ResultData resetSpace(String num) throws Exception{
-        ScenePlus scenePlus = this.getScenePlusByNum(num);
-        ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
-        if(Objects.isNull(scenePlus)){
-            log.info("该场景不存在无法重置容量,场景码为:" + num);
-            return ResultData.error(ErrorCode.FAILURE_CODE_5058);
-        }
-        if (scenePlusExt.getSceneScheme() < 4){
-            log.info("该场景不属于八目相机无法重置容量,场景码为:" + num);
-            return ResultData.error(ErrorCode.FAILURE_CODE_5057);
-        }
-        platformGoodsClient.updateCameraDetailByCameraIdAndSpace(scenePlus.getCameraId(), -scenePlusExt.getSpace());
-
-        scenePlusExt.setSpace(Long.parseLong("0"));
-        scenePlusExtService.updateById(scenePlusExt);
-
-        return ResultData.ok();
-    }
-
-    @Override
     public ResultData checkKey(SceneCheckKeyParamVO param) throws Exception {
     public ResultData checkKey(SceneCheckKeyParamVO param) throws Exception {
 //        ScenePro scenePro = sceneProService.getOne(
 //        ScenePro scenePro = sceneProService.getOne(
 //            new LambdaQueryWrapper<ScenePro>()
 //            new LambdaQueryWrapper<ScenePro>()

+ 1 - 5
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java

@@ -15,11 +15,9 @@ import com.fdkankan.common.constant.ConstantFilePath;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.FileBizType;
 import com.fdkankan.common.constant.FileBizType;
 import com.fdkankan.common.constant.ServerCode;
 import com.fdkankan.common.constant.ServerCode;
-import com.fdkankan.common.constant.TbStatus;
 import com.fdkankan.common.constant.UploadFilePath;
 import com.fdkankan.common.constant.UploadFilePath;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
-import com.fdkankan.common.user.SSOLoginHelper;
 import com.fdkankan.common.util.ComputerUtil;
 import com.fdkankan.common.util.ComputerUtil;
 import com.fdkankan.common.util.ConvertUtils;
 import com.fdkankan.common.util.ConvertUtils;
 import com.fdkankan.common.util.CreateObjUtil;
 import com.fdkankan.common.util.CreateObjUtil;
@@ -27,7 +25,6 @@ import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.common.util.OkHttpUtils;
 import com.fdkankan.common.util.OkHttpUtils;
 import com.fdkankan.fyun.constant.StorageType;
 import com.fdkankan.fyun.constant.StorageType;
 import com.fdkankan.fyun.oss.UploadToOssUtil;
 import com.fdkankan.fyun.oss.UploadToOssUtil;
-import com.fdkankan.platform.api.feign.PlatformGoodsClient;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisLockKey;
 import com.fdkankan.redis.constant.RedisLockKey;
 import com.fdkankan.redis.util.RedisLockUtil;
 import com.fdkankan.redis.util.RedisLockUtil;
@@ -55,6 +52,7 @@ import com.fdkankan.scene.vo.FileNameAndDataParamVO;
 import com.fdkankan.scene.vo.HotParamVO;
 import com.fdkankan.scene.vo.HotParamVO;
 import com.fdkankan.scene.vo.SaveTagsParamVO;
 import com.fdkankan.scene.vo.SaveTagsParamVO;
 import com.fdkankan.scene.vo.SaveTagsVisibleParamVO;
 import com.fdkankan.scene.vo.SaveTagsVisibleParamVO;
+import com.fdkankan.web.user.SSOLoginHelper;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.google.common.collect.Sets;
 import java.io.File;
 import java.io.File;
@@ -129,8 +127,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Autowired
     @Autowired
     ISceneDataDownloadService sceneDataDownloadService;
     ISceneDataDownloadService sceneDataDownloadService;
     @Autowired
     @Autowired
-    PlatformGoodsClient platformGoodsClient;
-    @Autowired
     ISceneProService sceneProService;
     ISceneProService sceneProService;
     @Autowired
     @Autowired
     ISceneEditInfoService sceneEditInfoService;
     ISceneEditInfoService sceneEditInfoService;

+ 2 - 2
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneUploadServiceImpl.java

@@ -12,8 +12,8 @@ import com.fdkankan.common.constant.TbStatus;
 import com.fdkankan.common.constant.UploadFilePath;
 import com.fdkankan.common.constant.UploadFilePath;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.common.response.ResultData;
-import com.fdkankan.common.user.SSOLoginHelper;
-import com.fdkankan.common.user.SSOUser;
+import com.fdkankan.web.user.SSOLoginHelper;
+import com.fdkankan.web.user.SSOUser;
 import com.fdkankan.common.util.BASE64DecodedMultipartFile;
 import com.fdkankan.common.util.BASE64DecodedMultipartFile;
 import com.fdkankan.common.util.FileUtil;
 import com.fdkankan.common.util.FileUtil;
 import com.fdkankan.fyun.oss.UploadToOssUtil;
 import com.fdkankan.fyun.oss.UploadToOssUtil;

+ 33 - 33
4dkankan-center-scene/src/main/resources/bootstrap-test.yml

@@ -1,16 +1,16 @@
 spring:
 spring:
   application:
   application:
-    name: 4dkankan-center-scene
+    name: 4dkankan-center-scene-v4
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
         server-addr: 120.24.144.164:8848
         server-addr: 120.24.144.164:8848
         file-extension: yaml
         file-extension: yaml
         namespace: 4dkankan-test
         namespace: 4dkankan-test
-        extension-configs:
-          - data-id: 4dkankan-center-scene.yaml
-            group: DEFAULT_GROUP
-            refresh: true
+#        extension-configs:
+#          - data-id: 4dkankan-center-scene-v4.yaml
+#            group: DEFAULT_GROUP
+#            refresh: true
         shared-configs:
         shared-configs:
           - data-id: common-db-config.yaml
           - data-id: common-db-config.yaml
             group: DEFAULT_GROUP
             group: DEFAULT_GROUP
@@ -33,31 +33,31 @@ spring:
             refresh: true
             refresh: true
       discovery:
       discovery:
         server-addr: 120.24.144.164:8848
         server-addr: 120.24.144.164:8848
-        namespace: 4dkankan-test
-    sentinel:
-      transport:
-        dashboard: 120.24.144.164:8888
-        heartbeat-interval-ms: 500
-        port: 8719
-      eager: true #取消sentinel控制台懒加载
-      #sentinel配置持久化nacos
-      datasource:
-        #流控规则
-        flow:
-          nacos:
-            server-addr: ${spring.cloud.nacos.config.server-addr}
-            dataId: ${spring.application.name}-flow-rules
-            groupId: SENTINEL_GROUP
-            namespace: 4dkankan-test
-            rule-type: flow
-        #熔断规则
-        degrade:
-          nacos:
-            server-addr: ${spring.cloud.nacos.config.server-addr}
-            dataId: ${spring.application.name}-degrade-rules
-            groupId: SENTINEL_GROUP
-            namespace: 4dkankan-test
-            rule-type: degrade
+        namespace: 4dkankan-dev
+#    sentinel:
+#      transport:
+#        dashboard: 120.24.144.164:8888
+#        heartbeat-interval-ms: 500
+#        port: 8719
+#      eager: true #取消sentinel控制台懒加载
+#      #sentinel配置持久化nacos
+#      datasource:
+#        #流控规则
+#        flow:
+#          nacos:
+#            server-addr: ${spring.cloud.nacos.config.server-addr}
+#            dataId: ${spring.application.name}-flow-rules
+#            groupId: SENTINEL_GROUP
+#            namespace: 4dkankan-test
+#            rule-type: flow
+#        #熔断规则
+#        degrade:
+#          nacos:
+#            server-addr: ${spring.cloud.nacos.config.server-addr}
+#            dataId: ${spring.application.name}-degrade-rules
+#            groupId: SENTINEL_GROUP
+#            namespace: 4dkankan-test
+#            rule-type: degrade
 #      log:
 #      log:
 #        dir: ./logs # 默认值${home}/logs/csp/
 #        dir: ./logs # 默认值${home}/logs/csp/
 #        switch-pid: true # 日志带上线程id
 #        switch-pid: true # 日志带上线程id
@@ -67,9 +67,9 @@ spring:
 #  sentinel:
 #  sentinel:
 #    enabled: true
 #    enabled: true
 
 
-feign:
-  httpclient:
-    connection-timeout: 200000
+#feign:
+#  httpclient:
+#    connection-timeout: 200000
 
 
 server:
 server:
   tomcat:
   tomcat:

+ 1 - 1
4dkankan-center-scene/src/main/resources/bootstrap.yml

@@ -1,3 +1,3 @@
 spring:
 spring:
   profiles:
   profiles:
-    active: dev
+    active: test

+ 1 - 1
4dkankan-center-scene/src/main/resources/logback-spring.xml

@@ -6,7 +6,7 @@
 <configuration scan="true" scanPeriod="10 seconds">
 <configuration scan="true" scanPeriod="10 seconds">
 
 
 	<springProperty scope="context" name="LOG_PATH" source="logging.path"/>
 	<springProperty scope="context" name="LOG_PATH" source="logging.path"/>
-	<define name="hostName" class = "com.fdkankan.common.config.LogPathHostNameProperty"/>
+	<define name="hostName" class = "com.fdkankan.web.config.LogPathHostNameProperty"/>
 
 
 	<contextName>logback</contextName>
 	<contextName>logback</contextName>
 	<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
 	<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->

+ 0 - 187
4dkankan-common/pom.xml

@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <packaging>jar</packaging>
-    <parent>
-        <groupId>com.fdkankan</groupId>
-        <artifactId>4dkankan-parent</artifactId>
-        <version>2.0.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>com.fdkankan</groupId>
-    <artifactId>4dkankan-common</artifactId>
-
-<!--    <repositories>-->
-<!--        <repository>-->
-<!--            <id>releases</id>-->
-<!--            <url>http://192.168.0.115:8081/nexus-2.14.2-01/content/repositories/releases/</url>-->
-<!--        </repository>-->
-<!--        <repository>-->
-<!--            <id>nexus-aliyun</id>-->
-<!--            <url>http://maven.aliyun.com/nexus/content/groups/public</url>-->
-<!--        </repository>-->
-<!--    </repositories>-->
-
-    <dependencies>
-
-        <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-common-utils</artifactId>
-            <version>2.0.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>cn.hutool</groupId>
-            <artifactId>hutool-all</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-webflux</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>fastjson</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.shiro</groupId>
-            <artifactId>shiro-spring</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>net.coobird</groupId>
-            <artifactId>thumbnailator</artifactId>
-            <version>0.4.8</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <version>2.8.5</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-utils-redis</artifactId>
-            <version>2.0.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-openfeign</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.poi</groupId>
-            <artifactId>poi</artifactId>
-            <version>3.8</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.poi</groupId>
-            <artifactId>poi-ooxml</artifactId>
-            <version>3.8</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>junit</groupId>
-                    <artifactId>junit</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.plugin</groupId>
-            <artifactId>spring-plugin-core</artifactId>
-            <version>1.2.0.RELEASE</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.plugin</groupId>
-            <artifactId>spring-plugin-metadata</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-aop</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-extension</artifactId>
-            <version>3.4.3.4</version>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-            </plugin>
-        </plugins>
-
-    </build>
-
-<!--    <distributionManagement>-->
-<!--        <repository>-->
-<!--            &lt;!&ndash; 这里的ID要和setting的id一致 &ndash;&gt;-->
-<!--            <id>releases</id>-->
-<!--            <url>http://192.168.0.115:8081/nexus-2.14.2-01/content/repositories/releases/</url>-->
-<!--        </repository>-->
-<!--        &lt;!&ndash;这是打成快照版本的配置 &ndash;&gt;-->
-<!--        <snapshotRepository>-->
-<!--            <id>snapshots</id>-->
-<!--            <url>http://192.168.0.115:8081/nexus-2.14.2-01/content/repositories/snapshots/</url>-->
-<!--        </snapshotRepository>-->
-<!--    </distributionManagement>-->
-
-</project>

+ 0 - 55
4dkankan-common/src/main/java/com/fdkankan/common/aop/FeignInterceptor.java

@@ -1,55 +0,0 @@
-//package com.fdkankan.common.aop;
-//
-//import com.alibaba.fastjson.JSON;
-//import com.fdkankan.common.constant.LogFormatConstant;
-//import java.util.Enumeration;
-//import javax.servlet.http.HttpServletRequest;
-//import lombok.extern.slf4j.Slf4j;
-//import org.aspectj.lang.ProceedingJoinPoint;
-//import org.aspectj.lang.annotation.Around;
-//import org.aspectj.lang.annotation.Aspect;
-//import org.aspectj.lang.annotation.Pointcut;
-//import org.aspectj.lang.reflect.MethodSignature;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.stereotype.Component;
-//import org.springframework.web.context.request.RequestContextHolder;
-//import org.springframework.web.context.request.ServletRequestAttributes;
-//
-//@Component
-//@Aspect
-//@Slf4j
-//public class FeignInterceptor {
-//
-//	// 切入点表达式
-//	@Pointcut("execution(* com.fdkankan.*.feign..*.*(..))")
-//	public void privilege() {
-//	}
-//
-//	@Around("privilege()")
-//	public Object around(ProceedingJoinPoint pjp) throws Throwable {
-//
-//		// 获取类名
-//		String className = pjp.getTarget().getClass().getName();
-//		// 获取执行的方法名称
-//		String methodName = pjp.getSignature().getName();
-//		// 获取参数名称
-//		String[] parameterNamesArgs = ((MethodSignature) pjp.getSignature()).getParameterNames();
-//		// 定义返回参数
-//		Object result = null;
-//		// 获取方法参数
-//		Object[] args = pjp.getArgs();
-//		StringBuilder params = new StringBuilder();
-//		for(int i = 0; i < parameterNamesArgs.length; i++){
-//			params.append(",").append(parameterNamesArgs[i]).append("=").append(args[i]);
-//		}
-//		log.info(LogFormatConstant.FEIGN_LOG_START, className, methodName, params.substring(1));
-//		// 执行目标方法
-//		result = pjp.proceed();
-//
-//		log.info(LogFormatConstant.FEIGN_LOG_END, className, methodName, JSON.toJSONString(result));
-//
-//		return result;
-//	}
-//}
-//

+ 0 - 112
4dkankan-common/src/main/java/com/fdkankan/common/aop/VisitLogInterceptor.java

@@ -1,112 +0,0 @@
-//package com.fdkankan.common.aop;
-//
-//import com.fdkankan.common.constant.LogFormatConstant;
-//import com.fdkankan.common.factory.LogFactory;
-//import java.util.Enumeration;
-//import javax.servlet.http.HttpServletRequest;
-//import lombok.extern.slf4j.Slf4j;
-//import org.aspectj.lang.ProceedingJoinPoint;
-//import org.aspectj.lang.annotation.Around;
-//import org.aspectj.lang.annotation.Aspect;
-//import org.aspectj.lang.annotation.Pointcut;
-//import org.aspectj.lang.reflect.MethodSignature;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.stereotype.Component;
-//import org.springframework.web.context.request.RequestContextHolder;
-//import org.springframework.web.context.request.ServletRequestAttributes;
-//
-//@Component
-//@Aspect
-//@Slf4j
-//public class VisitLogInterceptor {
-//
-//	// 切入点表达式
-//	@Pointcut("execution(public * com.fdkankan.*..controller..*.*(..))")
-//	public void privilege() {
-//	}
-//
-//	@Around("privilege()")
-//	public Object around(ProceedingJoinPoint pjp) throws Throwable {
-//
-//		// 获取类名
-//		String className = pjp.getTarget().getClass().getName();// pjp.getTarget().getClass().getSimpleName();
-//		// 获取执行的方法名称
-//		String methodName = pjp.getSignature().getName();
-//		// 获取参数名称
-//		String[] parameterNamesArgs = ((MethodSignature) pjp.getSignature()).getParameterNames();
-//		// 定义返回参数
-//		Object result = null;
-//		// 获取方法参数
-//		Object[] args = pjp.getArgs();
-//		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
-//		// 请求的URL
-//		String requestURL = request.getRequestURL().toString();
-//		String ip = getIpAddr(request);
-//
-//		StringBuffer paramsBuf = new StringBuffer();
-//		// 获取请求参数集合并进行遍历拼接
-//		for (int i = 0; i < args.length; i++) {
-//			if (paramsBuf.length() > 0) {
-//				paramsBuf.append("|");
-//			}
-//			paramsBuf.append(parameterNamesArgs[i]).append(" = ").append(args[i]);
-//		}
-//		StringBuffer headerBuf = new StringBuffer();
-//		Enumeration<String> headerNames = request.getHeaderNames();
-//		while (headerNames.hasMoreElements()) {
-//			String key = (String) headerNames.nextElement();
-//			String value = request.getHeader(key);
-//			if (headerBuf.length() > 0) {
-//				headerBuf.append("|");
-//			}
-//			headerBuf.append(key).append("=").append(value);
-//		}
-//
-//		// 打印请求参数参数
-//		// 记录开始时间
-//		long start = System.currentTimeMillis();
-//
-//		log.info(LogFormatConstant.REQUEST_LOG_START, ip, requestURL, className, methodName, paramsBuf.toString(), headerBuf.toString());
-//
-//		// 执行目标方法
-//		result = pjp.proceed();
-//
-//		// 获取执行完的时间 打印返回报文
-//		log.info(LogFormatConstant.REQUEST_LOG_END, requestURL, className, methodName, result, (System.currentTimeMillis() - start));
-//		return result;
-//	}
-//
-//	/**
-//	 * @Title: getIpAddr
-//	 * @Description: 获取ip
-//	 * @param request
-//	 * @return
-//	 * @return String 返回类型
-//	 */
-//	public String getIpAddr(HttpServletRequest request) {
-//		String ipAddress = null;
-//		ipAddress = request.getHeader("x-forwarded-for");
-//		if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
-//			ipAddress = request.getHeader("Proxy-Client-IP");
-//		}
-//		if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
-//			ipAddress = request.getHeader("WL-Proxy-Client-IP");
-//		}
-//		if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
-//			ipAddress = request.getRemoteAddr();
-//		}
-//
-//		//对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
-//		if (ipAddress != null && ipAddress.length() > 15) { // "***.***.***.***".length()
-//			// = 15
-//			if (ipAddress.indexOf(",") > 0) {
-//				ipAddress = ipAddress.substring(0, ipAddress.indexOf(","));
-//			}
-//		}
-//		// 或者这样也行,对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
-//		//return ipAddress!=null&&!"".equals(ipAddress)?ipAddress.split(",")[0]:null;
-//		return ipAddress;
-//	}
-//}
-//

+ 0 - 29
4dkankan-common/src/main/java/com/fdkankan/common/bean/DownLoadProgressBean.java

@@ -1,29 +0,0 @@
-package com.fdkankan.common.bean;
-
-import java.io.Serializable;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * <p>
- * 场景下载进度
- * </p>
- *
- * @author dengsixing
- * @since 2022/2/22
- **/
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class DownLoadProgressBean implements Serializable {
-
-    private String url;
-
-    private Integer percent;
-
-    private Integer status;
-
-}

+ 0 - 29
4dkankan-common/src/main/java/com/fdkankan/common/bean/DownLoadTaskBean.java

@@ -1,29 +0,0 @@
-package com.fdkankan.common.bean;
-
-import java.io.Serializable;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/2/22
- **/
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class DownLoadTaskBean implements Serializable {
-
-    private Long userId;
-
-    private String num;
-
-    private String type;
-
-}

+ 0 - 108
4dkankan-common/src/main/java/com/fdkankan/common/config/FileRouteConfig.java

@@ -1,108 +0,0 @@
-package com.fdkankan.common.config;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-
-@Component
-@ConfigurationProperties(prefix = "file.route")
-public class FileRouteConfig {
-    /**
-     * 路径
-     */
-    //保存硬盘地址
-    private String hardDisk;
-	//保存硬盘地址(激光相机)
-	private String hardDiskLaser;
-    //默认图片类型文件夹
-    private String imageFolder;
-    //默认文件类型文件夹
-    private String documentFolder;
-    //默认的视频类型文件夹
-    private String videoFolder;
-    //默认的音频类型文件夹
-    private String musicFolder;
-    //允许上传的ip(上传白名单)
-    private String[] IPs;
-    /**
-     * 类型
-     */
-    //图片类型
-    private String[] imageType;
-    //文件类型
-    private String[] documentType;
-    //视频类型
-    private String[] videoType;
-    //音频类型
-    private String[] musicType;
-	public String getHardDisk() {
-		return hardDisk;
-	}
-	public String getHardDiskLaser() {
-		return hardDiskLaser;
-	}
-	public String getImageFolder() {
-		return imageFolder;
-	}
-	public String getDocumentFolder() {
-		return documentFolder;
-	}
-	public String getVideoFolder() {
-		return videoFolder;
-	}
-	public String getMusicFolder() {
-		return musicFolder;
-	}
-	public String[] getIPs() {
-		return IPs;
-	}
-	public String[] getImageType() {
-		return imageType;
-	}
-	public String[] getDocumentType() {
-		return documentType;
-	}
-	public String[] getVideoType() {
-		return videoType;
-	}
-	public String[] getMusicType() {
-		return musicType;
-	}
-	public void setHardDisk(String hardDisk) {
-
-		this.hardDisk = hardDisk;
-	}
-	public void setHardDiskLaser(String hardDiskLaser) {
-
-		this.hardDiskLaser = hardDiskLaser;
-	}
-	public void setImageFolder(String imageFolder) {
-		this.imageFolder = imageFolder;
-	}
-	public void setDocumentFolder(String documentFolder) {
-		this.documentFolder = documentFolder;
-	}
-	public void setVideoFolder(String videoFolder) {
-		this.videoFolder = videoFolder;
-	}
-	public void setMusicFolder(String musicFolder) {
-		this.musicFolder = musicFolder;
-	}
-	public void setIPs(String[] iPs) {
-		IPs = iPs;
-	}
-	public void setImageType(String[] imageType) {
-		this.imageType = imageType;
-	}
-	public void setDocumentType(String[] documentType) {
-		this.documentType = documentType;
-	}
-	public void setVideoType(String[] videoType) {
-		this.videoType = videoType;
-	}
-	public void setMusicType(String[] musicType) {
-		this.musicType = musicType;
-	}
-    
-    
-}

+ 0 - 38
4dkankan-common/src/main/java/com/fdkankan/common/config/LogPathHostNameProperty.java

@@ -1,38 +0,0 @@
-package com.fdkankan.common.config;
-
-import ch.qos.logback.core.PropertyDefinerBase;
-import com.fdkankan.common.util.FileUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-import org.springframework.util.ObjectUtils;
-
-//@Component
-public class LogPathHostNameProperty extends PropertyDefinerBase {
-
-//    @Value("${hostName.filePath:/opt/hosts/hosts.txt}")
-//    private String hostNamePath;
-
-    @Override
-    public String getPropertyValue() {
-
-        String hostNamePath = getContext().getProperty("hostName.filePath");
-        if(ObjectUtils.isEmpty(hostNamePath)){
-            hostNamePath = "/opt/hosts/hosts.txt";
-        }
-        String hostName = "null";
-        try {
-            hostName = FileUtils.readFile(hostNamePath);
-            // 去除空格
-            if(!ObjectUtils.isEmpty(hostName)){
-                hostName = hostName.trim().replaceAll("\\s","");
-            }
-        } catch (Exception e) {
-            System.err.println("=========================error======================");
-            System.err.println("从文件中获取服务器名称失败,文件路径:"+hostNamePath);
-            return hostName;
-        }
-        return hostName;
-    }
-
-
-}

+ 0 - 8
4dkankan-common/src/main/java/com/fdkankan/common/config/RedisDefaultConfig.java

@@ -1,8 +0,0 @@
-package com.fdkankan.common.config;
-
-public class RedisDefaultConfig {
-//    public static final TimeUnit DEFAULT_TIME_UNIT = TimeUnit.SECONDS; //redis默认过期时间单位
-//    public static final int DEFAULT_EXPIRE_TIME = 7200;  // redis默认过期时间,单位/秒, 60*60*2=2H, 两小时
-//    public static final int CAMERA_EXPIRE_TIME = 604800;  // 相机登陆7天有效期
-//    public static final int USER_EXPIRE_TIME = 21600;  // agent用户有效期
-}

+ 0 - 44
4dkankan-common/src/main/java/com/fdkankan/common/config/ResultStatusDecoder.java

@@ -1,44 +0,0 @@
-package com.fdkankan.common.config;
-
-import com.alibaba.cloud.commons.io.IOUtils;
-import com.alibaba.fastjson.JSONObject;
-import com.fdkankan.common.constant.ServerCode;
-import com.fdkankan.common.exception.BusinessException;
-import com.fdkankan.common.response.ResultData;
-import feign.Response;
-import feign.codec.Decoder;
-import lombok.extern.slf4j.Slf4j;
-
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.nio.charset.StandardCharsets;
-import java.util.Objects;
-
-@Slf4j
-public final class ResultStatusDecoder implements Decoder {
-
-    public static final String CONTENT_KEY = "content";
-    final Decoder delegate;
-
-    public ResultStatusDecoder(Decoder delegate) {
-        Objects.requireNonNull(delegate, "Decoder must not be null. ");
-        this.delegate = delegate;
-    }
-
-    @Override
-    public Object decode(Response response, Type type) throws IOException {
-        // 判断是否返回参数是否是异常
-        String resultStr = IOUtils.toString(response.body().asInputStream(), StandardCharsets.UTF_8);
-        log.info("feign调用返回,result msg ->{}",resultStr);
-        try {
-            ResultData resultData = JSONObject.parseObject(resultStr, ResultData.class);
-            if(resultData.getCode() != ServerCode.SUCCESS.code()){
-                throw new BusinessException(resultData.getCode(),resultData.getMessage());
-            }
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        // 回写body
-        return delegate.decode(response.toBuilder().body(resultStr, StandardCharsets.UTF_8).build(), type);
-    }
-}

+ 0 - 156
4dkankan-common/src/main/java/com/fdkankan/common/config/SentinelFileDataSourceInitFunc.java

@@ -1,156 +0,0 @@
-//package com.fdkankan.common.config;
-//
-//import com.alibaba.csp.sentinel.command.handler.ModifyParamFlowRulesCommandHandler;
-//import com.alibaba.csp.sentinel.datasource.*;
-//import com.alibaba.csp.sentinel.init.InitFunc;
-//import com.alibaba.csp.sentinel.slots.block.authority.AuthorityRule;
-//import com.alibaba.csp.sentinel.slots.block.authority.AuthorityRuleManager;
-//import com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule;
-//import com.alibaba.csp.sentinel.slots.block.degrade.DegradeRuleManager;
-//import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
-//import com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager;
-//import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule;
-//import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRuleManager;
-//import com.alibaba.csp.sentinel.slots.system.SystemRule;
-//import com.alibaba.csp.sentinel.slots.system.SystemRuleManager;
-//import com.alibaba.csp.sentinel.transport.util.WritableDataSourceRegistry;
-//import com.alibaba.fastjson.JSON;
-//import com.alibaba.fastjson.TypeReference;
-//
-//import java.io.File;
-//import java.io.IOException;
-//import java.util.List;
-//
-///**
-// * <p>
-// * sentinel规则数据持久化到本地文件
-// * </p>
-// *
-// * @author dengsixing
-// * @since 2022/1/26
-// **/
-//public class SentinelFileDataSourceInitFunc implements InitFunc {
-//
-//    @Override
-//    public void init() throws Exception {
-//        //持久化在本地的目录
-//        String ruleDir = System.getProperty("user.home") + "/sentinel/rules";
-//        String flowRulePath = ruleDir + "/flow-rule.json";
-//        String degradeRulePath = ruleDir + "/degrade-rule.json";
-//        String systemRulePath = ruleDir + "/system-rule.json";
-//        String authorityRulePath = ruleDir + "/authority-rule.json";
-//        String paramFlowRulePath = ruleDir + "/param-flow-rule.json";
-//
-//        this.mkdirIfNotExits(ruleDir);
-//        this.createFileIfNotExits(flowRulePath);
-//        this.createFileIfNotExits(degradeRulePath);
-//        this.createFileIfNotExits(systemRulePath);
-//        this.createFileIfNotExits(authorityRulePath);
-//        this.createFileIfNotExits(paramFlowRulePath);
-//
-//        // 流控规则
-//        ReadableDataSource<String, List<FlowRule>> flowRuleRDS = new FileRefreshableDataSource<>(
-//                flowRulePath,
-//                flowRuleListParser
-//        );
-//        // 将可读数据源注册至FlowRuleManager
-//        // 这样当规则文件发生变化时,就会更新规则到内存
-//        FlowRuleManager.register2Property(flowRuleRDS.getProperty());
-//        WritableDataSource<List<FlowRule>> flowRuleWDS = new FileWritableDataSource<List<FlowRule>>(
-//                flowRulePath,
-//                this::encodeJson
-//        );
-//        // 将可写数据源注册至transport模块的WritableDataSourceRegistry中
-//        // 这样收到控制台推送的规则时,Sentinel会先更新到内存,然后将规则写入到文件中
-//        WritableDataSourceRegistry.registerFlowDataSource(flowRuleWDS);
-//
-//        // 降级规则
-//        ReadableDataSource<String, List<DegradeRule>> degradeRuleRDS = new FileRefreshableDataSource<>(
-//                degradeRulePath,
-//                degradeRuleListParser
-//        );
-//        DegradeRuleManager.register2Property(degradeRuleRDS.getProperty());
-//        WritableDataSource<List<DegradeRule>> degradeRuleWDS = new FileWritableDataSource<>(
-//                degradeRulePath,
-//                this::encodeJson
-//        );
-//        WritableDataSourceRegistry.registerDegradeDataSource(degradeRuleWDS);
-//
-//        // 系统规则
-//        ReadableDataSource<String, List<SystemRule>> systemRuleRDS = new FileRefreshableDataSource<>(
-//                systemRulePath,
-//                systemRuleListParser
-//        );
-//        SystemRuleManager.register2Property(systemRuleRDS.getProperty());
-//        WritableDataSource<List<SystemRule>> systemRuleWDS = new FileWritableDataSource<>(
-//                systemRulePath,
-//                this::encodeJson
-//        );
-//        WritableDataSourceRegistry.registerSystemDataSource(systemRuleWDS);
-//
-//        // 授权规则
-//        ReadableDataSource<String, List<AuthorityRule>> authorityRuleRDS = new FileRefreshableDataSource<>(
-//                flowRulePath,
-//                authorityRuleListParser
-//        );
-//        AuthorityRuleManager.register2Property(authorityRuleRDS.getProperty());
-//        WritableDataSource<List<AuthorityRule>> authorityRuleWDS = new FileWritableDataSource<>(
-//                authorityRulePath,
-//                this::encodeJson
-//        );
-//        WritableDataSourceRegistry.registerAuthorityDataSource(authorityRuleWDS);
-//
-//        // 热点参数规则
-//        ReadableDataSource<String, List<ParamFlowRule>> paramFlowRuleRDS = new FileRefreshableDataSource<>(
-//                paramFlowRulePath,
-//                paramFlowRuleListParser
-//        );
-//        ParamFlowRuleManager.register2Property(paramFlowRuleRDS.getProperty());
-//        WritableDataSource<List<ParamFlowRule>> paramFlowRuleWDS = new FileWritableDataSource<>(
-//                paramFlowRulePath,
-//                this::encodeJson
-//        );
-//        ModifyParamFlowRulesCommandHandler.setWritableDataSource(paramFlowRuleWDS);
-//    }
-//
-//    private Converter<String, List<FlowRule>> flowRuleListParser = source -> JSON.parseObject(
-//            source,
-//            new TypeReference<List<FlowRule>>() {}
-//    );
-//    private Converter<String, List<DegradeRule>> degradeRuleListParser = source -> JSON.parseObject(
-//            source,
-//            new TypeReference<List<DegradeRule>>() {}
-//    );
-//    private Converter<String, List<SystemRule>> systemRuleListParser = source -> JSON.parseObject(
-//            source,
-//            new TypeReference<List<SystemRule>>() {}
-//    );
-//
-//    private Converter<String, List<AuthorityRule>> authorityRuleListParser = source -> JSON.parseObject(
-//            source,
-//            new TypeReference<List<AuthorityRule>>() {}
-//    );
-//
-//    private Converter<String, List<ParamFlowRule>> paramFlowRuleListParser = source -> JSON.parseObject(
-//            source,
-//            new TypeReference<List<ParamFlowRule>>() {}
-//    );
-//
-//    private void mkdirIfNotExits(String filePath) throws IOException {
-//        File file = new File(filePath);
-//        if (!file.exists()) {
-//            file.mkdirs();
-//        }
-//    }
-//
-//    private void createFileIfNotExits(String filePath) throws IOException {
-//        File file = new File(filePath);
-//        if (!file.exists()) {
-//            file.createNewFile();
-//        }
-//    }
-//
-//    private <T> String encodeJson(T t) {
-//        return JSON.toJSONString(t);
-//    }
-//}

+ 0 - 57
4dkankan-common/src/main/java/com/fdkankan/common/config/SentinelUrlBlockHandler.java

@@ -1,57 +0,0 @@
-package com.fdkankan.common.config;
-
-import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.BlockExceptionHandler;
-import com.alibaba.csp.sentinel.slots.block.BlockException;
-import com.alibaba.csp.sentinel.slots.block.authority.AuthorityException;
-import com.alibaba.csp.sentinel.slots.block.degrade.DegradeException;
-import com.alibaba.csp.sentinel.slots.block.flow.FlowException;
-import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowException;
-import com.alibaba.csp.sentinel.slots.system.SystemBlockException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fdkankan.common.response.ResultData;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * <p>
- * sentinel统一异常处理
- * </p>
- *
- * @author dengsixing
- * @since 2022/1/26
- **/
-@Slf4j
-@Component
-public class SentinelUrlBlockHandler implements BlockExceptionHandler {
-    @Override
-    public void handle(HttpServletRequest request, HttpServletResponse response, BlockException e) throws IOException {
-        String msg = null;
-        if (e instanceof FlowException) {
-            msg = "限流了";
-        } else if (e instanceof DegradeException) {
-            msg = "降级了";
-        } else if (e instanceof ParamFlowException) {
-            msg = "热点参数限流";
-        } else if (e instanceof SystemBlockException) {
-            msg = "系统规则(负载/...不满足要求)";
-        } else if (e instanceof AuthorityException) {
-            msg = "授权规则不通过";
-        }
-        // http状态码
-        response.setStatus(500);
-        response.setCharacterEncoding("utf-8");
-        response.setHeader("Content-Type", "application/json;charset=utf-8");
-        response.setContentType(MediaType.APPLICATION_JSON_VALUE);
-
-        new ObjectMapper()
-                .writeValue(
-                        response.getWriter(),
-                        ResultData.error(-1, msg)
-                );
-    }
-}

+ 0 - 95
4dkankan-common/src/main/java/com/fdkankan/common/config/ShiroConfig.java

@@ -1,95 +0,0 @@
-package com.fdkankan.common.config;
-
-import com.fdkankan.common.constant.FilterConstant;
-import com.fdkankan.common.constant.LoginType;
-import com.fdkankan.common.jwt.JwtFilter;
-import com.fdkankan.common.realm.AgentJwtRealm;
-import com.fdkankan.common.realm.AppJwtRealm;
-import com.fdkankan.common.realm.ManagerJwtRealm;
-import com.fdkankan.common.realm.UserJwtRealm;
-import org.apache.shiro.authc.pam.AtLeastOneSuccessfulStrategy;
-import org.apache.shiro.authc.pam.ModularRealmAuthenticator;
-import org.apache.shiro.mgt.DefaultSessionStorageEvaluator;
-import org.apache.shiro.mgt.DefaultSubjectDAO;
-import org.apache.shiro.mgt.SecurityManager;
-import org.apache.shiro.realm.Realm;
-import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
-import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import javax.servlet.Filter;
-import java.util.*;
-
-//@Configuration
-public class ShiroConfig {
-
-    @Bean("shiroFilter")
-    public ShiroFilterFactoryBean shiroFilter(SecurityManager securityManager) {
-         ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
-        shiroFilterFactoryBean.setSecurityManager(securityManager);
-        //拦截器
-        Map<String, String> filterChainDefinitionMap = new LinkedHashMap<String, String>();
-        // 配置不会被拦截的链接 顺序判断
-//        filterChainDefinitionMap.put("/**", "anon");
-
-        // 添加自己的过滤器并且取名为jwt
-        Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
-        filterMap.put("user_jwt", new JwtFilter(LoginType.USER.code()));
-        filterMap.put("manager_jwt", new JwtFilter(LoginType.MANAGER.code()));
-        filterMap.put("agent_jwt", new JwtFilter(LoginType.AGENT.code()));
-        filterMap.put("app_jwt", new JwtFilter(LoginType.APP.code()));
-        shiroFilterFactoryBean.setFilters(filterMap);
-        //<!-- 过滤链定义,从上向下顺序执行,一般将/**放在最为下边
-        filterChainDefinitionMap.put(FilterConstant.FILTER_USER_URL + "/**", "user_jwt");
-        filterChainDefinitionMap.put(FilterConstant.FILTER_SCENE_URL + "/**", "user_jwt");
-        filterChainDefinitionMap.put(FilterConstant.FILTER_DEVICE_URL + "/**", "user_jwt");
-        filterChainDefinitionMap.put(FilterConstant.FILTER_PAY_URL + "/**", "user_jwt");
-        filterChainDefinitionMap.put(FilterConstant.FILTER_MANAGER_URL + "/**", "manager_jwt");
-        filterChainDefinitionMap.put(FilterConstant.FILTER_AGENT_URL + "/**", "agent_jwt");
-        filterChainDefinitionMap.put(FilterConstant.FILTER_APP_URL + "/**", "app_jwt");
-        //未授权界面;
-        shiroFilterFactoryBean.setUnauthorizedUrl("/403");
-        shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
-
-        return shiroFilterFactoryBean;
-    }
-
-    @Bean("securityManager")
-    public SecurityManager securityManager() {
-        List<Realm> realms = new ArrayList<>();
-        realms.add(new UserJwtRealm());
-        realms.add(new AgentJwtRealm());
-        realms.add(new ManagerJwtRealm());
-        realms.add(new AppJwtRealm());
-
-        DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
-        //设置realm.
-        securityManager.setAuthenticator(modularRealmAuthenticator());
-        securityManager.setRealms(realms);
-        /*
-         * 关闭shiro自带的session,详情见文档
-         * http://shiro.apache.org/session-management.html#SessionManagement-StatelessApplications%28Sessionless%29
-         */
-        DefaultSubjectDAO subjectDAO = new DefaultSubjectDAO();
-        DefaultSessionStorageEvaluator defaultSessionStorageEvaluator = new DefaultSessionStorageEvaluator();
-        defaultSessionStorageEvaluator.setSessionStorageEnabled(false);
-        subjectDAO.setSessionStorageEvaluator(defaultSessionStorageEvaluator);
-        securityManager.setSubjectDAO(subjectDAO);
-
-        return securityManager;
-    }
-
-    @Bean
-    public ModularRealmAuthenticator modularRealmAuthenticator(){
-        //自己重写的ShiroModularRealmAuthenticator
-        ShiroModularRealmAuthenticator modularRealmAuthenticator = new ShiroModularRealmAuthenticator();
-        modularRealmAuthenticator.setAuthenticationStrategy(new AtLeastOneSuccessfulStrategy());
-        return modularRealmAuthenticator;
-    }
-
-
-
-
-
-}

+ 0 - 40
4dkankan-common/src/main/java/com/fdkankan/common/config/ShiroModularRealmAuthenticator.java

@@ -1,40 +0,0 @@
-package com.fdkankan.common.config;
-
-import com.fdkankan.common.jwt.JwtToken;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authc.pam.ModularRealmAuthenticator;
-import org.apache.shiro.realm.Realm;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-public class ShiroModularRealmAuthenticator extends ModularRealmAuthenticator {
-
-    @Override
-    protected AuthenticationInfo doAuthenticate(AuthenticationToken authenticationToken)
-            throws AuthenticationException {
-        // 判断getRealms()是否返回为空
-        assertRealmsConfigured();
-        // 强制转换回自定义的CustomizedToken
-        JwtToken customizedToken = (JwtToken) authenticationToken;
-        // 登录类型
-        String loginType = customizedToken.getLoginType();
-        // 所有Realm
-        Collection<Realm> realms = getRealms();
-        // 登录类型对应的所有Realm
-        Collection<Realm> typeRealms = new ArrayList<>();
-        for (Realm realm : realms) {
-            if (realm.getName().contains(loginType))
-                typeRealms.add(realm);
-        }
-
-        // 判断是单Realm还是多Realm
-        if (typeRealms.size() == 1)
-            return doSingleRealmAuthentication(typeRealms.iterator().next(), customizedToken);
-        else
-            return doMultiRealmAuthentication(typeRealms, customizedToken);
-    }
-
-}

+ 0 - 23
4dkankan-common/src/main/java/com/fdkankan/common/config/SupportAutoConfiguration.java

@@ -1,23 +0,0 @@
-package com.fdkankan.common.config;
-
-
-import feign.codec.Decoder;
-import feign.optionals.OptionalDecoder;
-import org.springframework.beans.factory.ObjectFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
-import org.springframework.cloud.openfeign.support.ResponseEntityDecoder;
-import org.springframework.cloud.openfeign.support.SpringDecoder;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class SupportAutoConfiguration {
-    @Autowired
-    private ObjectFactory<HttpMessageConverters> messageConverters;
-
-    @Bean
-    public Decoder feignDecoder() {
-        return new ResultStatusDecoder(new OptionalDecoder(new ResponseEntityDecoder(new SpringDecoder(this.messageConverters))));
-    }
-}

+ 0 - 50
4dkankan-common/src/main/java/com/fdkankan/common/constant/CameraTypeEnum.java

@@ -1,50 +0,0 @@
-package com.fdkankan.common.constant;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum CameraTypeEnum {
-    DOUBLE_EYE(0,"KK-","4DKKLITE_","旧双目相机"),
-    FDKK_PRO(1,"KK-","4DKKPRO_","四维看看pro八目相机"),
-    FDKK_LITE(2,"KK-","4DKKLITE_","四维看看lite"),
-    ZHIHOUSE_REDHOUSE(5,"KK-","4DKKLITE_","指房宝小红屋相机"),
-    DOUBLE_EYE_TURN(9,"KJ-","4DKKLITE_","双目转台"),
-    LASER_TURN(10,"SS-","4DKKLA_","激光转台");
-
-
-    private int type;
-    private String sceneNumPrefix;
-    private String wifiNamePrefix;
-    private String desc;
-
-    public int getType() {
-        return type;
-    }
-
-    public String getSceneNumPrefix() {
-        return sceneNumPrefix;
-    }
-
-    static Map<Integer,CameraTypeEnum> typeMaps = new HashMap<>(5);
-
-    static{
-        for (CameraTypeEnum typeEnum : CameraTypeEnum.values()) {
-            typeMaps.put(typeEnum.getType(),typeEnum);
-        }
-    }
-
-    CameraTypeEnum(Integer type, String sceneNumPrefix, String wifiNamePrefix, String desc) {
-        this.type = type;
-        this.sceneNumPrefix = sceneNumPrefix;
-        this.wifiNamePrefix = wifiNamePrefix;
-        this.desc = desc;
-    }
-
-    public static String getSceneNumPrefixByType(Integer type){
-        if(typeMaps.containsKey(type)){
-            return typeMaps.get(type).getSceneNumPrefix();
-        }
-        return "";
-    }
-
-}

+ 0 - 26
4dkankan-common/src/main/java/com/fdkankan/common/constant/FilterConstant.java

@@ -1,26 +0,0 @@
-package com.fdkankan.common.constant;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class FilterConstant {
-
-    public static final String FILTER_USER_URL = "/service/user";
-    public static final String FILTER_SCENE_URL = "/service/scene/edit";
-    public static final String FILTER_DEVICE_URL = "/service/device";
-    public static final String FILTER_PAY_URL = "/service/order/scanPay";
-    public static final String FILTER_MANAGER_URL = "/service/manager";
-    public static final String FILTER_AGENT_URL = "/service/agent";
-    public static final String FILTER_APP_URL = "/service/app";
-
-    public static List<String> getFilterPattern(){
-        List<String> arr = new ArrayList<>();
-        arr.add(FILTER_USER_URL);
-        arr.add(FILTER_SCENE_URL);
-        arr.add(FILTER_DEVICE_URL);
-        arr.add(FILTER_PAY_URL);
-//        arr.add(FILTER_MANAGER_URL);
-//        arr.add(FILTER_AGENT_URL);
-        return arr;
-    }
-}

+ 0 - 75
4dkankan-common/src/main/java/com/fdkankan/common/controller/BaseController.java

@@ -1,75 +0,0 @@
-package com.fdkankan.common.controller;
-
-import com.fdkankan.common.user.SSOLoginHelper;
-import com.fdkankan.common.user.SSOUser;
-import com.fdkankan.common.util.DateEditor;
-import java.util.Date;
-import java.util.Objects;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.propertyeditors.StringTrimmerEditor;
-import org.springframework.web.bind.WebDataBinder;
-import org.springframework.web.bind.annotation.InitBinder;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.*;
-import java.util.Date;
-import java.util.Objects;
-
-public class BaseController {
-    @Autowired
-    protected HttpServletRequest request;
-
-    @Autowired
-    protected HttpServletResponse response;
-
-    @Autowired
-    SSOLoginHelper ssoLoginHelper;
-
-    @InitBinder
-    protected void initBinder(WebDataBinder webDataBinder) {
-        webDataBinder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
-        webDataBinder.registerCustomEditor(Date.class, new DateEditor(true));
-    }
-
-    protected String getToken(){
-        return request.getHeader("token");
-    }
-
-    protected Long getUserId(){
-        SSOUser ssoUser = ssoLoginHelper.loginCheck(request.getHeader("token"));
-        if(Objects.nonNull(ssoUser)){
-            return ssoUser.getId();
-        }
-        return null;
-    }
-
-    protected SSOUser getSSOUser(){
-        return ssoLoginHelper.loginCheck(request.getHeader("token"));
-    }
-
-    public static void output(HttpServletResponse resp, File file) {
-        OutputStream os = null;
-        BufferedInputStream bis = null;
-        byte[] buff = new byte[1024];
-        try {
-            os = resp.getOutputStream();
-            bis = new BufferedInputStream(new FileInputStream(file));
-            int i = 0;
-            while ((i = bis.read(buff)) != -1) {
-                os.write(buff, 0, i);
-                os.flush();
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                bis.close();
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-}

+ 0 - 50
4dkankan-common/src/main/java/com/fdkankan/common/controller/CustomErrorController.java

@@ -1,50 +0,0 @@
-package com.fdkankan.common.controller;
-
-import com.fdkankan.common.response.ResultData;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.boot.web.servlet.error.ErrorController;
-import org.springframework.http.HttpStatus;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-/**
- * <p>
- * 404 500 401等错误返回转发接口,统一返回格式
- * </p>
- *
- * @author dengsixing
- * @since 2022/3/9
- **/
-@Controller
-public class CustomErrorController implements ErrorController {
-
-    @RequestMapping("/error")
-    @ResponseBody
-    public ResultData handleError(HttpServletRequest request, HttpServletResponse response){
-
-        //获取statusCode:401,404,500
-        Integer statusCode = (Integer) request.getAttribute("javax.servlet.error.status_code");
-        String message = "";
-        HttpStatus httpStatus = HttpStatus.valueOf(statusCode);
-        switch (httpStatus){
-            case INTERNAL_SERVER_ERROR :
-                message = "服务器内部异常!";
-                break;
-            case NOT_FOUND:
-                message = "接口不存在!";
-                break;
-            case FORBIDDEN:
-                message = "禁止访问!";
-                break;
-        }
-        return ResultData.error(statusCode, message);
-    }
-
-
-    @Override
-    public String getErrorPath() {
-        return "/error";
-    }
-}

+ 0 - 145
4dkankan-common/src/main/java/com/fdkankan/common/exception/GlobalExceptionHandler.java

@@ -1,145 +0,0 @@
-package com.fdkankan.common.exception;
-
-import cn.hutool.core.exceptions.ExceptionUtil;
-import com.alibaba.csp.sentinel.Tracer;
-import com.fdkankan.common.constant.ErrorCode;
-import com.fdkankan.common.constant.ServerCode;
-import com.fdkankan.common.response.ResultData;
-import java.util.List;
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.transform.Result;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.catalina.Server;
-import org.springframework.http.HttpStatus;
-import org.springframework.validation.BindException;
-import org.springframework.validation.BindingResult;
-import org.springframework.validation.FieldError;
-import org.springframework.validation.ObjectError;
-import org.springframework.web.bind.MethodArgumentNotValidException;
-import org.springframework.web.bind.MissingServletRequestParameterException;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.ResponseStatus;
-import org.springframework.web.bind.annotation.RestControllerAdvice;
-import org.springframework.web.multipart.MultipartException;
-import org.springframework.web.servlet.NoHandlerFoundException;
-
-/**
- * 全局异常处理器
- */
-@RestControllerAdvice
-@Slf4j
-public class GlobalExceptionHandler {
-
-    /**
-     * 处理未知异常
-     */
-    @ResponseBody
-    @ExceptionHandler(value = Exception.class)
-    public ResultData exceptionHandler(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Exception e) throws Exception {
-            log.error("服务错误:", e);
-            //增加sentinel异常次数
-            Tracer.trace(e);
-            return ResultData.error(ServerCode.SYSTEM_ERROR.code(), ExceptionUtil.stacktraceToString(e, 3000));
-    }
-
-    /**
-     * 限流熔断异常处理
-     * 如果在这里捕获的话,就需要在接口中加入@SentinelResour注解
-     */
-//    @ResponseBody
-//    @ExceptionHandler({FlowException.class, DegradeException.class})
-//    public ResultData flowExceptionHandler(HttpServletRequest httpServletRequest, Exception e) {
-//        String requestURI = httpServletRequest.getRequestURI();
-//        String resource = null;
-//        if(e instanceof FlowException){
-//            resource = ((FlowException) e).getRule().getResource();
-//        }
-//        if(e instanceof DegradeException){
-//            resource = ((DegradeException) e).getRule().getResource();
-//        }
-//
-//        log.error("请求限流:requestURI{},resource:{}", requestURI, resource);
-//        return ResultData.error(ServerCode.SYSTEM_ERROR.code(), "系统繁忙,请稍后重试");
-//    }
-
-    /**
-     * <p>
-            form表达提交,缺少参数异常处理
-     * </p>
-     * @author dengsixing
-     * @date 2022/4/14
-     * @param e
-     * @return com.fdkankan.common.response.ResultData
-     **/
-    @ResponseBody
-    @ExceptionHandler(value = MissingServletRequestParameterException.class)
-    public ResultData missingServletRequestParameterException(
-        MissingServletRequestParameterException e){
-        return ResultData.error(
-            ServerCode.PARAM_REQUIRED.code(),
-            ServerCode.PARAM_REQUIRED.formatMessage(e.getParameterName()));
-    }
-
-    /**
-     * <p>
-     form表达提交,文件为空异常处理
-     * </p>
-     * @author dengsixing
-     * @date 2022/4/14
-     * @param e
-     * @return com.fdkankan.common.response.ResultData
-     **/
-    @ResponseBody
-    @ExceptionHandler(value = MultipartException.class)
-    public ResultData multipartException(MultipartException e){
-        return ResultData.error(
-            ServerCode.PARAM_REQUIRED.code(),
-            ServerCode.PARAM_REQUIRED.formatMessage("文件"));
-    }
-
-
-    /**
-     * 参数校验异常拦截处理
-     */
-    @ResponseBody
-    @ExceptionHandler({BindException.class,MethodArgumentNotValidException.class})
-    public ResultData validationBodyException(Exception e) {
-        BindingResult result = null;
-        if(e instanceof MethodArgumentNotValidException){
-            result = ((MethodArgumentNotValidException) e).getBindingResult();
-        }
-        if(e instanceof BindException){
-            result = ((BindException) e).getBindingResult();
-        }
-        String message = "";
-        if (result.hasErrors()) {
-            List<ObjectError> errors = result.getAllErrors();
-            if (errors != null) {
-                errors.forEach(p -> {
-                    FieldError fieldError = (FieldError) p;
-                    log.error("参数校验错误:类:{},字段:{},错误信息:{}",fieldError.getObjectName(), fieldError.getField(), fieldError.getDefaultMessage());
-                });
-                if (errors.size() > 0) {
-                    FieldError fieldError = (FieldError) errors.get(0);
-                    message = fieldError.getDefaultMessage();
-                }
-            }
-        }
-        return ResultData.error(ErrorCode.PARAM_REQUIRED.code(), message);
-    }
-
-
-    /**
-     * 处理业务异常
-     */
-    @ResponseBody
-    @ExceptionHandler(value = BusinessException.class)
-    public ResultData businessExceptionHandler(HttpServletRequest httpServletRequest, BusinessException e) {
-        log.info("业务异常code:{},message:{}", e.getCode(), e.getMessage());
-        return ResultData.error(e.getCode(), e.getMessage());
-    }
-}

+ 0 - 34
4dkankan-common/src/main/java/com/fdkankan/common/exception/JwtAuthenticationException.java

@@ -1,34 +0,0 @@
-package com.fdkankan.common.exception;
-
-import org.apache.shiro.ShiroException;
-
-public class JwtAuthenticationException extends ShiroException {
-
-    private static final long serialVersionUID = 2899335020273674736L;
-
-    private int code;
-
-    private String msg;
-
-    public JwtAuthenticationException(int code, String msg){
-        super(msg);
-        this.code = code;
-        this.msg = msg;
-    }
-
-    public int getCode() {
-        return code;
-    }
-
-    public void setCode(int code) {
-        this.code = code;
-    }
-
-    public String getMsg() {
-        return msg;
-    }
-
-    public void setMsg(String msg) {
-        this.msg = msg;
-    }
-}

+ 0 - 10
4dkankan-common/src/main/java/com/fdkankan/common/factory/LogFactory.java

@@ -1,10 +0,0 @@
-package com.fdkankan.common.factory;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class LogFactory {
-    public static final Logger V_LOG = LoggerFactory.getLogger("visitLog");
-    public static final Logger P_LOG = LoggerFactory.getLogger("programLog");
-
-}

+ 0 - 116
4dkankan-common/src/main/java/com/fdkankan/common/jwt/JwtFilter.java

@@ -1,116 +0,0 @@
-package com.fdkankan.common.jwt;
-
-import com.alibaba.fastjson.JSONObject;
-import com.fdkankan.common.exception.JwtAuthenticationException;
-import org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.RequestMethod;
-
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-
-public class JwtFilter extends BasicHttpAuthenticationFilter {
-    private static Logger log = LoggerFactory.getLogger("programLog");
-
-    private String loginType;
-
-    public JwtFilter(String loginType){
-        this.loginType = loginType;
-    }
-
-    /**
-     * 执行登录认证
-     *
-     * @param request
-     * @param response
-     * @param mappedValue
-     * @return
-     */
-    @Override
-    protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
-        try {
-            log.info("Step 1: 接口拦截shiro认证权限");
-            executeLogin(request, response);
-            String url = ((HttpServletRequest) request).getRequestURI();
-//            getSubject(request, response).checkPermission(url);
-            return true;
-        } catch (Exception e) {
-            // 认证出现异常,传递错误信息msg
-            String msg = e.getMessage();
-            // 获取应用异常(该Cause是导致抛出此throwable(异常)的throwable(异常))
-            Throwable throwable = e.getCause();
-            JSONObject jsonObject = new JSONObject();
-            if (throwable instanceof JwtAuthenticationException) {
-                jsonObject.put("code", ((JwtAuthenticationException) throwable).getCode());
-                jsonObject.put("msg", ((JwtAuthenticationException) throwable).getMsg());
-            }else{
-                jsonObject.put("code", 3002);
-                jsonObject.put("msg", msg);
-            }
-            // 直接返回Response信息
-            this.response(response, jsonObject);
-            return false;
-        }
-    }
-
-    /**
-     *
-     */
-    @Override
-    protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception {
-        HttpServletRequest httpServletRequest = (HttpServletRequest) request;
-        String token = httpServletRequest.getHeader("token");
-
-        JwtToken jwtToken = new JwtToken(token, loginType);
-        // 提交给realm进行登入,如果错误他会抛出异常并被捕获
-        getSubject(request, response).login(jwtToken);
-        // 如果没有抛出异常则代表登入成功,返回true
-        return true;
-    }
-
-    /**
-     * 对跨域提供支持
-     */
-    @Override
-    protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception {
-        HttpServletRequest httpServletRequest = (HttpServletRequest) request;
-        HttpServletResponse httpServletResponse = (HttpServletResponse) response;
-        httpServletResponse.setHeader("Access-control-Allow-Origin", httpServletRequest.getHeader("Origin"));
-        httpServletResponse.setHeader("Access-Control-Allow-Methods", "GET,POST,OPTIONS,PUT,DELETE");
-        httpServletResponse.setHeader("Access-Control-Allow-Headers", httpServletRequest.getHeader("Access-Control-Request-Headers"));
-        // 跨域时会首先发送一个option请求,这里我们给option请求直接返回正常状态
-        if (httpServletRequest.getMethod().equals(RequestMethod.OPTIONS.name())) {
-            httpServletResponse.setStatus(HttpStatus.OK.value());
-            return false;
-        }
-        return super.preHandle(request, response);
-    }
-
-    /**
-     * 无需转发,直接返回Response信息
-     */
-    private void response(ServletResponse response, JSONObject msg) {
-        response.setCharacterEncoding("UTF-8");
-        response.setContentType("application/json; charset=utf-8");
-        PrintWriter out = null;
-        try {
-            out = response.getWriter();
-            out.append(msg.toString());
-            out.flush();
-            out.close();
-        } catch (IOException e) {
-            e.printStackTrace();
-        } finally {
-            if (out != null){
-                out.close();
-            }
-        }
-    }
-
-}

+ 0 - 33
4dkankan-common/src/main/java/com/fdkankan/common/jwt/JwtToken.java

@@ -1,33 +0,0 @@
-package com.fdkankan.common.jwt;
-
-import org.apache.shiro.authc.AuthenticationToken;
-
-public class JwtToken implements AuthenticationToken {
-
-    private String token;
-
-    private String loginType;
-
-    public JwtToken(String token, String loginType){
-        this.token = token;
-        this.loginType = loginType;
-    }
-
-    @Override
-    public Object getPrincipal() {
-        return token;
-    }
-
-    @Override
-    public Object getCredentials() {
-        return token;
-    }
-
-    public String getLoginType() {
-        return loginType;
-    }
-
-    public void setLoginType(String loginType) {
-        this.loginType = loginType;
-    }
-}

+ 0 - 37
4dkankan-common/src/main/java/com/fdkankan/common/model/SSOUser.java

@@ -1,37 +0,0 @@
-package com.fdkankan.common.model;
-
-import java.io.Serializable;
-import java.util.Set;
-import lombok.Data;
-
-/**
- * sso user
- *
- *  2018-04-02 19:59:49
- */
-@Data
-public class SSOUser implements Serializable {
-
-    private static final long serialVersionUID = -2560069033053679931L;
-
-    private Long id;
-
-    private String userName;
-
-    private String password;
-
-    private String email;
-
-    private Set<String> permissionSet;
-
-    private Set<String> roleSet;
-
-    /**
-     * 是否相机登录,0-否,1-是
-     */
-    private Integer cameraLogin;
-
-    private Long cameraId;
-
-
-}

+ 0 - 60
4dkankan-common/src/main/java/com/fdkankan/common/realm/AgentJwtRealm.java

@@ -1,60 +0,0 @@
-package com.fdkankan.common.realm;
-
-import cn.hutool.core.util.StrUtil;
-import com.fdkankan.common.exception.JwtAuthenticationException;
-import com.fdkankan.common.jwt.JwtToken;
-import com.fdkankan.common.util.JwtUtil;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authc.SimpleAuthenticationInfo;
-import org.apache.shiro.authz.AuthorizationInfo;
-import org.apache.shiro.authz.SimpleAuthorizationInfo;
-import org.apache.shiro.realm.AuthorizingRealm;
-import org.apache.shiro.subject.PrincipalCollection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-@Component
-public class AgentJwtRealm extends AuthorizingRealm {
-    private static Logger log = LoggerFactory.getLogger("programLog");
-
-    @Override
-    public boolean supports(AuthenticationToken token) {
-        return token instanceof JwtToken;
-    }
-
-    @Override
-    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
-        SimpleAuthorizationInfo simpleAuthorizationInfo = new SimpleAuthorizationInfo();
-        return simpleAuthorizationInfo;
-    }
-
-    @Override
-    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
-        log.info("Step 2: Agent进行用户名正确与否验证");
-        String token = (String) auth.getCredentials();
-        if (StrUtil.isEmpty(token)){
-            throw new JwtAuthenticationException(3004, "无token,请重新登录");
-        }
-        // 获取 token 中的 userName
-        String userName = JwtUtil.getUsername(token);
-        if (StrUtil.isEmpty(userName)){
-            throw new JwtAuthenticationException(3004, "访问异常!");
-        }
-//        if (!userName.contains(SsoUtil.PREFIX_CACHE_AGENT)){
-//            throw new JwtAuthenticationException(3004, "用户未登录");
-//        }
-        if (!JwtUtil.isVerify(token, userName)) {
-            throw new JwtAuthenticationException(3004, "非法访问!");
-        }
-//        // 防止重复登陆, redisToken是最新登录获取的token
-//        String redisToken = JedisUtil.getStringValue(userName);
-//        if (StrUtil.isEmpty(redisToken) || !redisToken.equals(token)){
-//            throw new JwtAuthenticationException(3004, "用户未登录");
-//        }
-
-        return new SimpleAuthenticationInfo(token, token, "jwt_realm");
-    }
-}

+ 0 - 62
4dkankan-common/src/main/java/com/fdkankan/common/realm/AppJwtRealm.java

@@ -1,62 +0,0 @@
-package com.fdkankan.common.realm;
-
-import cn.hutool.core.util.StrUtil;
-import com.fdkankan.common.exception.JwtAuthenticationException;
-import com.fdkankan.common.jwt.JwtToken;
-import com.fdkankan.common.util.JwtUtil;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authc.SimpleAuthenticationInfo;
-import org.apache.shiro.authz.AuthorizationInfo;
-import org.apache.shiro.authz.SimpleAuthorizationInfo;
-import org.apache.shiro.realm.AuthorizingRealm;
-import org.apache.shiro.subject.PrincipalCollection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-@Component
-public class AppJwtRealm extends AuthorizingRealm {
-    private static Logger log = LoggerFactory.getLogger("programLog");
-
-    @Override
-    public boolean supports(AuthenticationToken token) {
-        return token instanceof JwtToken;
-    }
-
-    @Override
-    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
-        SimpleAuthorizationInfo simpleAuthorizationInfo = new SimpleAuthorizationInfo();
-        return simpleAuthorizationInfo;
-    }
-
-    @Override
-    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
-        log.info("Step 2: Agent进行用户名正确与否验证");
-        String token = (String) auth.getCredentials();
-        log.info("doGetAuthenticationInfo - step3 :" + token);
-        if (StrUtil.isEmpty(token)){
-            throw new JwtAuthenticationException(3004, "无token,请重新登录");
-        }
-        // 获取 token 中的 userName
-        String userName = JwtUtil.getUsername(token);
-        if (StrUtil.isEmpty(userName)){
-            throw new JwtAuthenticationException(3004, "访问异常!");
-        }
-        String regex = "^-?\\d+(\\.\\d+)?$";
-        if(userName.matches(regex)){
-            // TODO: 2021/12/21
-//            if (!JedisUtil.exists(SsoUtil.PREFIX_CACHE_CAMERA + userName)){
-//                throw new JwtAuthenticationException(3004, "用户未登录");
-//            }
-//            if (!JedisUtil.getStringValue(SsoUtil.PREFIX_CACHE_CAMERA + userName).contains(token)){
-//                throw new JwtAuthenticationException(3004, "用户未登录");
-//            }
-        }
-// TODO: 2021/12/21
-//        JedisUtil.expire(SsoUtil.PREFIX_CACHE_CAMERA + userName, 21600);
-
-        return new SimpleAuthenticationInfo(token, token, "jwt_realm");
-    }
-}

+ 0 - 61
4dkankan-common/src/main/java/com/fdkankan/common/realm/ManagerJwtRealm.java

@@ -1,61 +0,0 @@
-package com.fdkankan.common.realm;
-
-import cn.hutool.core.util.StrUtil;
-import com.fdkankan.common.exception.JwtAuthenticationException;
-import com.fdkankan.common.jwt.JwtToken;
-import com.fdkankan.common.util.JwtUtil;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authc.SimpleAuthenticationInfo;
-import org.apache.shiro.authz.AuthorizationInfo;
-import org.apache.shiro.authz.SimpleAuthorizationInfo;
-import org.apache.shiro.realm.AuthorizingRealm;
-import org.apache.shiro.subject.PrincipalCollection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-@Component
-public class ManagerJwtRealm extends AuthorizingRealm {
-    private static Logger log = LoggerFactory.getLogger("programLog");
-
-    @Override
-    public boolean supports(AuthenticationToken token) {
-        return token instanceof JwtToken;
-    }
-
-    @Override
-    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
-        SimpleAuthorizationInfo simpleAuthorizationInfo = new SimpleAuthorizationInfo();
-        return simpleAuthorizationInfo;
-    }
-
-    @Override
-    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
-        log.info("Step 2: Manager进行用户名正确与否验证");
-        String token = (String) auth.getCredentials();
-        if (StrUtil.isEmpty(token)){
-            throw new JwtAuthenticationException(3004, "无token,请重新登录");
-        }
-        // 获取 token 中的 userName
-        String userName = JwtUtil.getUsername(token);
-        if (StrUtil.isEmpty(userName)){
-            throw new JwtAuthenticationException(3004, "访问异常!");
-        }
-//        if (!userName.contains(SsoUtil.PREFIX_CACHE_MANAGER)){
-//            throw new JwtAuthenticationException(3004, "用户未登录");
-//        }
-        if (!JwtUtil.isVerify(token, userName)) {
-            throw new JwtAuthenticationException(3004, "非法访问!");
-        }
-        // 防止重复登陆, redisToken是最新登录获取的token
-        // TODO: 2021/12/21  
-//        String redisToken = JedisUtil.getStringValue(userName);
-//        if (StrUtil.isEmpty(redisToken) || !redisToken.equals(token)){
-//            throw new JwtAuthenticationException(3004, "用户未登录");
-//        }
-
-        return new SimpleAuthenticationInfo(token, token, "jwt_realm");
-    }
-}

+ 0 - 83
4dkankan-common/src/main/java/com/fdkankan/common/realm/UserJwtRealm.java

@@ -1,83 +0,0 @@
-package com.fdkankan.common.realm;
-
-import cn.hutool.core.util.StrUtil;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fdkankan.common.exception.JwtAuthenticationException;
-import com.fdkankan.common.jwt.JwtToken;
-import com.fdkankan.common.util.JwtUtil;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authc.SimpleAuthenticationInfo;
-import org.apache.shiro.authz.AuthorizationInfo;
-import org.apache.shiro.authz.SimpleAuthorizationInfo;
-import org.apache.shiro.realm.AuthorizingRealm;
-import org.apache.shiro.subject.PrincipalCollection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-@Component
-public class UserJwtRealm extends AuthorizingRealm {
-    private static Logger log = LoggerFactory.getLogger("programLog");
-
-//    @Autowired
-//    private UserFeignClient userService;
-    @Autowired
-    private ObjectMapper mapper;
-
-    /**
-     * 必须重写此方法,不然Shiro会报错
-     */
-    @Override
-    public boolean supports(AuthenticationToken token) {
-        return token instanceof JwtToken;
-    }
-    /**
-     * 只有当需要检测用户权限的时候才会调用此方法,例如checkRole,checkPermission之类的
-     */
-    @Override
-    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
-        SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();
-        String username = (String)principals.getPrimaryPrincipal();
-//        List list = principals.asList();
-//        Result result = userService.findByUserName(username);
-//        if (result.getCode() == Result.CODE_FAILURE){
-//            return authorizationInfo;
-//        }
-//        SSOUser dbUser = mapper.convertValue(result.getData(), SSOUser.class);
-//        authorizationInfo.setRoles(dbUser.getRoleSet());
-//        authorizationInfo.setStringPermissions(dbUser.getPermissionSet());
-        return authorizationInfo;
-    }
-    /**
-     * 默认使用此方法进行用户名正确与否验证,错误抛出异常即可。
-     */
-    @Override
-    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
-        log.info("Step 2: User进行用户名正确与否验证");
-        String token = (String) auth.getCredentials();
-        if (StrUtil.isEmpty(token)){
-            throw new JwtAuthenticationException(3004, "无token,请重新登录");
-        }
-        // 解密获得username,用于和数据库进行对比
-        String username = JwtUtil.getUsername(token);
-        if (username == null) {
-            throw new JwtAuthenticationException(3004, "访问异常!");
-        }
-        if (!JwtUtil.isVerify(token, username)) {
-            throw new JwtAuthenticationException(3004, "非法访问!");
-        }
-        // TODO: 2021/12/21
-//        SSOUser ssoUser = SSOLoginHelper.loginCheck(token);
-//        if (ssoUser == null){
-//            throw new JwtAuthenticationException(3004, "用户未登录");
-//        }
-//
-//        // refresh
-        // TODO: 2021/12/21
-//        JedisUtil.expire(token, 21600);
-        return new SimpleAuthenticationInfo(username, token, "jwt_realm");
-    }
-}

+ 0 - 56
4dkankan-common/src/main/java/com/fdkankan/common/response/BaseResponseAdvice.java

@@ -1,56 +0,0 @@
-package com.fdkankan.common.response;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fdkankan.common.response.ResultData;
-import java.util.List;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.core.MethodParameter;
-import org.springframework.http.MediaType;
-import org.springframework.http.converter.HttpMessageConverter;
-import org.springframework.http.server.ServerHttpRequest;
-import org.springframework.http.server.ServerHttpResponse;
-import org.springframework.web.bind.annotation.RestControllerAdvice;
-import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
-
-import java.util.Objects;
-
-@RestControllerAdvice
-@Slf4j
-public class BaseResponseAdvice implements ResponseBodyAdvice<Object> {
-    @Override
-    public boolean supports(MethodParameter methodParameter, Class<? extends HttpMessageConverter<?>> aClass) {
-        return true;
-    }
-
-    @Override
-    public Object beforeBodyWrite(Object body, MethodParameter methodParameter,
-        MediaType mediaType, Class<? extends HttpMessageConverter<?>> aClass,
-        ServerHttpRequest serverHttpRequest, ServerHttpResponse serverHttpResponse) {
-//        if(serverHttpRequest.getURI().getPath().contains("feign")){
-//            return body;
-//        }
-//        log.info("响应拦截成功。。。");
-//        List<String> strings = serverHttpRequest.getHeaders().get("Accept-Language");
-//        System.out.println(strings.get(0));
-
-        //admin监控请求,直接返回
-        if(serverHttpRequest.getURI().getPath().contains("actuator")){
-            return body;
-        }
-
-        if(body instanceof String){
-            return JSONObject.toJSONString(ResultData.ok(body));
-        }
-        if(body instanceof Page){
-            Page page = (Page) body;
-            return ResultData.ok(new PageInfo(page.getCurrent(), page.getSize(), page.getTotal(), page.getRecords()));
-        }
-        if (body instanceof ResultData) {
-            return body;
-        } else {
-            return ResultData.ok(body);
-        }
-    }
-}

+ 0 - 72
4dkankan-common/src/main/java/com/fdkankan/common/user/SSOLoginHelper.java

@@ -1,72 +0,0 @@
-package com.fdkankan.common.user;
-
-import com.fdkankan.common.constant.LoginType;
-import com.fdkankan.common.util.JwtUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-@Component
-public class SSOLoginHelper {
-
-    @Autowired
-    private SSOLoginStore ssoLoginStore;
-
-    public  SSOUser loginCheck(String token) {
-        if (token != null && token.trim().length() > 0) {
-            String username = JwtUtil.getUsername(token);
-            SSOUser ssoUser = ssoLoginStore.get(username);
-            if (ssoUser != null) {
-                return ssoUser;
-            }
-        }
-        return null;
-    }
-
-    public com.fdkankan.common.model.SSOUser loginCheckV3(String token) {
-        if (token != null && token.trim().length() > 0) {
-            com.fdkankan.common.model.SSOUser ssoUser = ssoLoginStore.getV3(token);
-            if (ssoUser != null) {
-                return ssoUser;
-            }
-        }
-        return null;
-    }
-
-    public String login(String loginType,String userName) {
-        return this.login(loginType,userName,null, null);
-    }
-    public String login(String loginType,String userName,Integer time) {
-        return this.login(loginType,userName,time, null);
-    }
-    public String login(SSOUser ssoUser) {
-        String loginType = LoginType.USER.code();
-        String userName = ssoUser.getUserName();
-        return this.login(loginType,userName,null, ssoUser);
-    }
-    public String login(SSOUser ssoUser,Integer time) {
-        String loginType = LoginType.USER.code();
-        String userName = ssoUser.getUserName();
-        return this.login(loginType,userName,time, ssoUser);
-    }
-
-    /**
-     * @param loginType     登录类型
-     * @param userName      登录用户名
-     * @param time          过期时间,时间单位为秒,默认为 6小时 21600
-     * @param ssoUser       sooUser
-     */
-    public String login(String loginType,String userName,Integer time,SSOUser ssoUser) {
-        String token = JwtUtil.createJWT(-1, userName,loginType);
-        ssoLoginStore.put(loginType,userName,token,time, ssoUser);
-        return token;
-    }
-
-    public  void logout(String token) {
-        String username = JwtUtil.getUsername(token);
-        String loginType = JwtUtil.getLoginType(token);
-        this.logout(loginType,username);
-    }
-    public  void logout(String loginType,String userName) {
-        ssoLoginStore.remove(loginType,userName);
-    }
-}

+ 0 - 102
4dkankan-common/src/main/java/com/fdkankan/common/user/SSOLoginStore.java

@@ -1,102 +0,0 @@
-package com.fdkankan.common.user;
-
-import cn.hutool.core.util.ObjectUtil;
-import com.alibaba.fastjson.JSONObject;
-import com.fdkankan.common.constant.LoginType;
-import com.fdkankan.redis.constant.RedisKey;
-import com.fdkankan.redis.util.RedisUtil;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.nio.charset.StandardCharsets;
-import java.util.Objects;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-
-@Slf4j
-@Component
-public class SSOLoginStore {
-
-    @Resource
-    private RedisUtil redisUtil;
-    /**
-     * get
-     * @param userName
-     * @return
-     */
-    public  SSOUser get(String userName) {
-        String redisKey = getSsoUserRedisKey(userName);
-        String objectValue =  redisUtil.get(redisKey);
-        if (objectValue != null) {
-            return JSONObject.parseObject(objectValue, SSOUser.class);
-        }
-        return null;
-    }
-
-
-    @Resource
-    @Qualifier("redisTemplate2")
-    private RedisTemplate redisTemplate2;
-
-    public  com.fdkankan.common.model.SSOUser getV3(String token) {
-        String redisKey = "token#".concat(token);
-        Object obj = redisTemplate2.opsForValue().get(redisKey);
-        if(Objects.nonNull(obj)){
-            return (com.fdkankan.common.model.SSOUser)obj;
-        }
-        return null;
-    }
-
-    /**
-     * remove
-     * @param loginType     登录类型
-     * @param userName      登录用户名
-     */
-    public  void remove(String loginType,String userName) {
-        String redisKey = getTokenRedisKey(loginType,userName);
-        if(redisUtil.hasKey(redisKey)){
-            redisUtil.del(redisKey);
-        }
-        if(LoginType.USER.code().equals(loginType)  ){
-            String ssoUserRedisKey = getSsoUserRedisKey(userName);
-            if(redisUtil.hasKey(ssoUserRedisKey)){
-                redisUtil.del(ssoUserRedisKey);
-            }
-        }
-    }
-
-    /**
-     *  put
-     * @param loginType     登录类型
-     * @param userName      登录用户名
-     * @param token         token
-     * @param time          过期时间,时间单位为秒,默认为 6小时 21600
-     * @param ssoUser       sooUser
-     */
-    public  void put(String loginType, String userName, String token,Integer time, SSOUser ssoUser) {
-        if(time == null || time <=0 ){
-            time = RedisKey.USER_EXPIRE_TIME;
-        }
-        String redisKey = getTokenRedisKey(loginType,userName);
-        redisUtil.set(redisKey, token, time);
-        if(LoginType.USER.code().equals(loginType) && ssoUser!=null ){
-            redisUtil.set(getSsoUserRedisKey(userName),JSONObject.toJSONString(ssoUser),time);
-        }
-    }
-
-    /**
-     * 获取token key
-     */
-    private static String getTokenRedisKey(String loginType,String userName){
-        return String.format(RedisKey.TOKEN_USER, loginType,userName);
-    }
-    private static String getSsoUserRedisKey(String userName){
-        return String.format(RedisKey.SSO_USER,userName);
-    }
-
-
-}

+ 0 - 27
4dkankan-common/src/main/java/com/fdkankan/common/user/SSOUser.java

@@ -1,27 +0,0 @@
-package com.fdkankan.common.user;
-
-import lombok.Data;
-import lombok.ToString;
-
-import java.io.Serializable;
-import java.util.Set;
-
-@Data
-@ToString
-public class SSOUser implements Serializable {
-
-    private static final long serialVersionUID = -2560069033053679931L;
-
-    private Long id;
-
-    private String userName;
-
-    private String password;
-
-    private String email;
-
-    private Set<String> permissionSet;
-
-    private Set<String> roleSet;
-
-}

+ 0 - 21
4dkankan-common/src/main/java/com/fdkankan/common/util/SsoUtil.java

@@ -1,21 +0,0 @@
-package com.fdkankan.common.util;
-
-public class SsoUtil {
-
-    public static final String REDIRECT_URL = "redirect_url";
-    public static final String SSO_USER = "sso_user";
-    public static final String SSO_SERVER = "sso_server";
-    public static final String SSO_LOGIN = "/login";
-    public static final String SSO_LOGOUT = "/logout";
-    public static final String SSO_LOGOUT_PATH = "logoutPath";
-    public static final String PREFIX_SHIRO_CACHE = "shiro:cache:";
-    public static final String PREFIX_MSG_AUTH_CODE = "msg:auth:code:";
-    public static final String PREFIX_CACHE_MANAGER = "manager:";
-    public static final String PREFIX_CACHE_AGENT = "agent:";
-    public static final String PREFIX_CACHE_CAMERA = "camera:";
-    public static final String SSO_SESSIONID = "token";
-    public static final String PREFIX_CACHE_USERINFO = "user_info:";
-    public static final String PREFIX_MSG_NOT_CODE = "msg:not:code:";//短信重发验证
-
-    public static final String USER_TOKEN = "user:token:";
-}

+ 0 - 38
4dkankan-common/src/main/java/com/fdkankan/common/util/WebUtil.java

@@ -1,38 +0,0 @@
-package com.fdkankan.common.util;
-
-import cn.hutool.http.ContentType;
-import com.alibaba.fastjson.JSON;
-import java.util.HashMap;
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.springframework.web.multipart.MultipartFile;
-
-/**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/6/9
- **/
-public class WebUtil {
-
-    /**
-     * 获取请求参数中的场景码
-     * @param pjp
-     * @param request
-     * @return
-     */
-    public static String getNum(JoinPoint pjp, HttpServletRequest request){
-        Object[] args = pjp.getArgs();
-        String contentType = request.getContentType();
-        if(contentType.contains(ContentType.JSON.getValue())){
-            HashMap hashMap = JSON.parseObject(JSON.toJSONString(args[0]), HashMap.class);
-            return (String) hashMap.get("num");
-        }
-        return request.getParameter("num");
-    }
-
-}

+ 0 - 6
pom.xml

@@ -89,12 +89,6 @@
             </dependency>
             </dependency>
 
 
             <dependency>
             <dependency>
-                <groupId>com.fdkankan</groupId>
-                <artifactId>4dkankan-common</artifactId>
-                <version>${fdkankan.common-version}</version>
-            </dependency>
-
-            <dependency>
                 <groupId>com.alibaba</groupId>
                 <groupId>com.alibaba</groupId>
                 <artifactId>fastjson</artifactId>
                 <artifactId>fastjson</artifactId>
                 <version>${fastjson-version}</version>
                 <version>${fastjson-version}</version>