sanlin.shi 1 month ago
parent
commit
1ea23119a2
26 changed files with 217 additions and 415 deletions
  1. 60 0
      sql.md
  2. 0 68
      src/main/java/cn/hanghui/outapi/platform/tenant/controller/AppLogController.java
  3. 12 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/config/device/template/DeviceTemplateDto.java
  4. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/config/fkj/device/template/FkjDeviceDto.java
  5. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/config/fkj/device/template/FkjDeviceTemplateDto.java
  6. 10 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/DeviceDto.java
  7. 13 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/DeviceVo.java
  8. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/TenantVo.java
  9. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/ampe/HhFaceDeviceDto.java
  10. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/hhlocal/HhLocalDeviceBase.java
  11. 0 37
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/AppLog.java
  12. 0 26
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/AppLogExtend.java
  13. 12 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/Device.java
  14. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/DeviceTemplate.java
  15. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/FkjDevice.java
  16. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/FkjDeviceTemplate.java
  17. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/HhLocalDevice.java
  18. 11 0
      src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/HhLocalDeviceTemplate.java
  19. 0 55
      src/main/java/cn/hanghui/outapi/platform/tenant/job/AppLogJob.java
  20. 0 18
      src/main/java/cn/hanghui/outapi/platform/tenant/mapper/AppLogExtendMapper.java
  21. 0 19
      src/main/java/cn/hanghui/outapi/platform/tenant/mapper/AppLogMapper.java
  22. 0 42
      src/main/java/cn/hanghui/outapi/platform/tenant/service/AppLogService.java
  23. 0 135
      src/main/java/cn/hanghui/outapi/platform/tenant/service/impl/AppLogServiceImpl.java
  24. 0 5
      src/main/resources/application-api.yml
  25. 0 5
      src/main/resources/application-dev.yml
  26. 0 5
      src/main/resources/application-prod.yml

+ 60 - 0
sql.md

@@ -796,3 +796,63 @@ ALTER TABLE fkj_device add `processing_page_switch` tinyint(1) DEFAULT '0' COMME
 ALTER TABLE fkj_device_template add `processing_page_switch` tinyint(1) DEFAULT '0' COMMENT '是否启用副屏处理中页面' AFTER secondary_page_images;
 
 
+
+ALTER TABLE `hanghui_outapi_platform`.`device` 
+ADD COLUMN `transit_push_switch` tinyint(1) NULL DEFAULT 1 COMMENT '启用进出记录推送 默认: true' AFTER `scan_face_failed_page_url`,
+ADD COLUMN `transit_push_encrypt_switch` tinyint(1) NULL DEFAULT 0 COMMENT '进出记录推送数据是否加解密 默认false' AFTER `transit_push_switch`,
+ADD COLUMN `transit_push_encrypt_app_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appKey' AFTER `transit_push_encrypt_switch`,
+ADD COLUMN `transit_push_encrypt_app_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appSecrete' AFTER `transit_push_encrypt_app_key`,
+ADD COLUMN `transit_push_encrypt_private_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_app_secret`,
+ADD COLUMN `transit_push_encrypt_private_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_private_secret`;
+
+ALTER TABLE `hanghui_outapi_platform`.`device_template` 
+ADD COLUMN `transit_push_switch` tinyint(1) NULL DEFAULT 1 COMMENT '启用进出记录推送 默认: true',
+ADD COLUMN `transit_push_encrypt_switch` tinyint(1) NULL DEFAULT 0 COMMENT '进出记录推送数据是否加解密 默认false' AFTER `transit_push_switch`,
+ADD COLUMN `transit_push_encrypt_app_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appKey' AFTER `transit_push_encrypt_switch`,
+ADD COLUMN `transit_push_encrypt_app_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appSecrete' AFTER `transit_push_encrypt_app_key`,
+ADD COLUMN `transit_push_encrypt_private_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_app_secret`,
+ADD COLUMN `transit_push_encrypt_private_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_private_secret`;
+
+
+ALTER TABLE `hanghui_outapi_platform`.`hh_local_device` 
+ADD COLUMN `transit_push_switch` tinyint(1) NULL DEFAULT 1 COMMENT '启用进出记录推送 默认: true',
+ADD COLUMN `transit_push_encrypt_switch` tinyint(1) NULL DEFAULT 0 COMMENT '进出记录推送数据是否加解密 默认false' AFTER `transit_push_switch`,
+ADD COLUMN `transit_push_encrypt_app_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appKey' AFTER `transit_push_encrypt_switch`,
+ADD COLUMN `transit_push_encrypt_app_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appSecrete' AFTER `transit_push_encrypt_app_key`,
+ADD COLUMN `transit_push_encrypt_private_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_app_secret`,
+ADD COLUMN `transit_push_encrypt_private_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_private_secret`;
+
+ALTER TABLE `hanghui_outapi_platform`.`hh_local_device_template` 
+ADD COLUMN `transit_push_switch` tinyint(1) NULL DEFAULT 1 COMMENT '启用进出记录推送 默认: true',
+ADD COLUMN `transit_push_encrypt_switch` tinyint(1) NULL DEFAULT 0 COMMENT '进出记录推送数据是否加解密 默认false' AFTER `transit_push_switch`,
+ADD COLUMN `transit_push_encrypt_app_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appKey' AFTER `transit_push_encrypt_switch`,
+ADD COLUMN `transit_push_encrypt_app_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appSecrete' AFTER `transit_push_encrypt_app_key`,
+ADD COLUMN `transit_push_encrypt_private_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_app_secret`,
+ADD COLUMN `transit_push_encrypt_private_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_private_secret`;
+
+
+ALTER TABLE `hanghui_outapi_platform`.`fkj_device` 
+ADD COLUMN `transit_push_switch` tinyint(1) NULL DEFAULT 1 COMMENT '启用进出记录推送 默认: true',
+ADD COLUMN `transit_push_encrypt_switch` tinyint(1) NULL DEFAULT 0 COMMENT '进出记录推送数据是否加解密 默认false' AFTER `transit_push_switch`,
+ADD COLUMN `transit_push_encrypt_app_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appKey' AFTER `transit_push_encrypt_switch`,
+ADD COLUMN `transit_push_encrypt_app_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appSecrete' AFTER `transit_push_encrypt_app_key`,
+ADD COLUMN `transit_push_encrypt_private_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_app_secret`,
+ADD COLUMN `transit_push_encrypt_private_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_private_secret`;
+
+ALTER TABLE `hanghui_outapi_platform`.`fkj_device_template` 
+ADD COLUMN `transit_push_switch` tinyint(1) NULL DEFAULT 1 COMMENT '启用进出记录推送 默认: true',
+ADD COLUMN `transit_push_encrypt_switch` tinyint(1) NULL DEFAULT 0 COMMENT '进出记录推送数据是否加解密 默认false' AFTER `transit_push_switch`,
+ADD COLUMN `transit_push_encrypt_app_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appKey' AFTER `transit_push_encrypt_switch`,
+ADD COLUMN `transit_push_encrypt_app_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密appSecrete' AFTER `transit_push_encrypt_app_key`,
+ADD COLUMN `transit_push_encrypt_private_secret` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_app_secret`,
+ADD COLUMN `transit_push_encrypt_private_key` varchar(100) NULL COMMENT '进出记录推送数据是否加解密PrivateKey' AFTER `transit_push_encrypt_private_secret`;
+
+
+
+
+
+
+
+
+
+

+ 0 - 68
src/main/java/cn/hanghui/outapi/platform/tenant/controller/AppLogController.java

@@ -1,68 +0,0 @@
-package cn.hanghui.outapi.platform.tenant.controller;
-
-import cn.hanghui.outapi.platform.common.entity.rest.RestCode;
-import cn.hanghui.outapi.platform.common.entity.rest.RestResult;
-import cn.hanghui.outapi.platform.common.utils.AppTokenUtil;
-import cn.hanghui.outapi.platform.tenant.entity.dto.AppLogDto;
-import cn.hanghui.outapi.platform.tenant.entity.dto.AppLogPageDto;
-import cn.hanghui.outapi.platform.tenant.entity.dto.AppLogVo;
-import cn.hanghui.outapi.platform.tenant.service.AppLogService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-import java.util.concurrent.ThreadPoolExecutor;
-
-/**
- * @author shisl
- * @package cn.hanghui.outapi.platform.tenant.controller
- * @class AppLogController
- * @date 2023/12/19 上午10:44
- * @description
- */
-@Slf4j
-@Api(tags = "应用日志")
-@RestController
-@RequestMapping("/api/v1/app/log")
-@AllArgsConstructor(onConstructor_ = @Autowired)
-public class AppLogController {
-
-    @Autowired
-    private AppLogService appLogService;
-
-    @Autowired
-    private ThreadPoolExecutor threadPoolExecutor;
-
-    @ApiOperation(value = "日志插入", notes = "日志插入")
-    @PostMapping(value = "/add")
-    public RestResult taskQuery(@RequestBody AppLogDto dto) {
-//        List<String> tokens = AppTokenUtil.getTokens();
-//        if (dto == null || dto.getToken() == null || "".equals(dto.getToken().trim()) || !tokens.contains(dto.getToken().trim())) {
-//            return RestResult.error(RestCode.FORBIDDEN.getMsg());
-//        }
-//
-//        if (dto.getSn() == null || "".equals(dto.getSn().trim())) {
-//            return RestResult.error("参数有误!");
-//        }
-//        threadPoolExecutor.execute(() -> {
-//            appLogService.add(dto);
-//        });
-        return RestResult.ok();
-    }
-
-    @ApiOperation(value = "查询日志列表(分页)")
-    @PostMapping("/page")
-    public RestResult<IPage<AppLogVo>> page(@RequestBody AppLogPageDto dto) {
-        return appLogService.page(dto);
-    }
-
-
-}

+ 12 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/config/device/template/DeviceTemplateDto.java

@@ -529,5 +529,17 @@ public class DeviceTemplateDto {
 
     @ApiModelProperty(value = "刷脸失败结果页图片配置")
     private String scanFaceFailedPageUrl;
+
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
 }
 

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/config/fkj/device/template/FkjDeviceDto.java

@@ -218,4 +218,15 @@ public class FkjDeviceDto implements Serializable {
 
     @ApiModelProperty(value = "提示标语播报文本")
     private String reminderPlayText;
+
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
 }

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/config/fkj/device/template/FkjDeviceTemplateDto.java

@@ -214,4 +214,15 @@ public class FkjDeviceTemplateDto implements Serializable {
     @ApiModelProperty(value = "提示标语播报文本")
     private String reminderPlayText;
 
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
 }

+ 10 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/DeviceDto.java

@@ -373,6 +373,16 @@ public class DeviceDto {
     private String logPushUrl;
     @ApiModelProperty(value = "进出记录推送地址")
     private String transitPushUrl;
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
 
     //功能配置
     @ApiModelProperty(value = "是否开启年龄限制")

+ 13 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/DeviceVo.java

@@ -553,4 +553,17 @@ public class DeviceVo {
 
     @ApiModelProperty(value = "刷脸失败结果页图片配置")
     private String scanFaceFailedPageUrl;
+
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
+
 }

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/TenantVo.java

@@ -576,5 +576,16 @@ public class TenantVo implements Serializable {
     @ApiModelProperty(value = "刷脸失败结果页图片配置")
     private String scanFaceFailedPageUrl;
 
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
 
 }

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/ampe/HhFaceDeviceDto.java

@@ -252,4 +252,15 @@ public class HhFaceDeviceDto {
     @ApiModelProperty(value = "刷脸失败结果页图片配置")
     private String scanFaceFailedPageUrl;
 
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
 }

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/dto/hhlocal/HhLocalDeviceBase.java

@@ -404,4 +404,15 @@ public class HhLocalDeviceBase implements Serializable {
     @ApiModelProperty(value = "人脸框跟随框是否镜像")
     private Boolean rgbRevert;
 
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
 }

+ 0 - 37
src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/AppLog.java

@@ -1,37 +0,0 @@
-package cn.hanghui.outapi.platform.tenant.entity.po;
-
-import cn.hanghui.outapi.platform.common.entity.po.Base;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * @author shisl
- * @package cn.hanghui.outapi.platform.tenant.entity.po
- * @class AppLog
- * @date 2023/12/19 上午10:27
- * @description
- */
-@Deprecated
-@Data
-@EqualsAndHashCode(callSuper = true)
-@TableName(value = "app_log", autoResultMap = true)
-public class AppLog extends Base {
-
-    /**
-     * 设备sn编号
-     */
-    private String sn;
-
-    /**
-     * 日志类型 Logcat/Error/Crash
-     */
-    private String logType;
-
-    /**
-     * 日志标签
-     */
-    private String logTag;
-
-
-}

+ 0 - 26
src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/AppLogExtend.java

@@ -1,26 +0,0 @@
-package cn.hanghui.outapi.platform.tenant.entity.po;
-
-import cn.hanghui.outapi.platform.common.entity.po.Base;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * @author shisl
- * @package cn.hanghui.outapi.platform.tenant.entity.po
- * @class AppLogExtend
- * @date 2023/12/19 上午10:28
- * @description
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-@TableName(value = "app_log_extend", autoResultMap = true)
-@Deprecated
-public class AppLogExtend extends Base {
-
-    private Long appLogId;
-
-    private String logContent;
-
-
-}

+ 12 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/Device.java

@@ -333,8 +333,20 @@ public class Device extends Base {
     private String heartTrackingUrl;
     @ApiModelProperty(value = "在线日志推送地址")
     private String logPushUrl;
+
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
     @ApiModelProperty(value = "进出记录推送地址")
     private String transitPushUrl;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
 
 
     //功能配置

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/DeviceTemplate.java

@@ -334,8 +334,19 @@ public class DeviceTemplate extends Base {
     private String heartTrackingUrl;
     @ApiModelProperty(value = "在线日志推送地址")
     private String logPushUrl;
+
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
     @ApiModelProperty(value = "进出记录推送地址")
     private String transitPushUrl;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
 
 
     //功能配置

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/FkjDevice.java

@@ -270,5 +270,16 @@ public class FkjDevice extends Base {
     @ApiModelProperty(value = "副屏处理中页面图片")
     private String processingPageImage;
 
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
 
 }

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/FkjDeviceTemplate.java

@@ -261,4 +261,15 @@ public class FkjDeviceTemplate extends Base {
 
     @ApiModelProperty(value = "副屏处理中页面图片")
     private String processingPageImage;
+
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
 }

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/HhLocalDevice.java

@@ -360,6 +360,17 @@ public class HhLocalDevice extends Base {
     @ApiModelProperty(value = "进出记录滤重时间 默认0 0-120s")
     private Integer inOutFilterRepeatTime;
 
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
     //功能配置
     @ApiModelProperty(value = "是否开启年龄限制")
     private Boolean isOpenAgeLimit;

+ 11 - 0
src/main/java/cn/hanghui/outapi/platform/tenant/entity/po/HhLocalDeviceTemplate.java

@@ -353,6 +353,17 @@ public class HhLocalDeviceTemplate extends Base {
     @ApiModelProperty(value = "进出记录滤重时间 默认0 0-120s")
     private Integer inOutFilterRepeatTime;
 
+    @ApiModelProperty(value = "启用进出记录推送 默认: true")
+    private Boolean transitPushSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密 默认true")
+    private Boolean transitPushEncryptSwitch;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appKey")
+    private String transitPushEncryptAppKey;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密appSecrete")
+    private String transitPushEncryptAppSecret;
+    @ApiModelProperty(value = "进出记录推送数据是否加解密PrivateKey")
+    private String transitPushEncryptPrivateKey;
+
     //功能配置
     @ApiModelProperty(value = "是否开启年龄限制")
     private Boolean isOpenAgeLimit;

+ 0 - 55
src/main/java/cn/hanghui/outapi/platform/tenant/job/AppLogJob.java

@@ -1,55 +0,0 @@
-package cn.hanghui.outapi.platform.tenant.job;
-
-import cn.hanghui.outapi.platform.tenant.service.AppLogService;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.time.DateUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.EnableAsync;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-
-import javax.annotation.Resource;
-import java.util.Date;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * @author shisl
- * @package cn.hanghui.outapi.platform.tenant.job
- * @class AppLogJob
- * @date 2023/12/19 下午1:53
- * @description
- */
-@Configuration
-@EnableScheduling
-@EnableAsync
-@Slf4j
-public class AppLogJob {
-
-    @Value("${job.enable}")
-    private Boolean jobEnable;
-
-    @Resource
-    private AppLogService appLogService;
-
-    /**
-     * 每一分钟执行一次
-     */
-//    @Scheduled(cron = "0 */1 * * * ?", zone = "Asia/Shanghai")
-    /**
-     * 每日凌晨0点执行
-     */
-//    @Scheduled(cron = "0 0 0 * * ?", zone = "Asia/Shanghai")
-    public void delExpireLog() {
-        if (!jobEnable) {
-            return;
-        }
-        log.info("--->开始执行删除过期日志操作");
-        Date currentTime = new Date();
-        Date endTime = DateUtils.addDays(currentTime, -7);
-        appLogService.delExpireLog(endTime);
-
-    }
-}

+ 0 - 18
src/main/java/cn/hanghui/outapi/platform/tenant/mapper/AppLogExtendMapper.java

@@ -1,18 +0,0 @@
-package cn.hanghui.outapi.platform.tenant.mapper;
-
-import cn.hanghui.outapi.platform.tenant.entity.po.AppLogExtend;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springframework.stereotype.Repository;
-
-/**
- * @author shisl
- * @package cn.hanghui.outapi.platform.tenant.mapper
- * @class AppLogExtendMapper
- * @date 2023/12/19 上午11:09
- * @description
- */
-@Repository
-@Deprecated
-public interface AppLogExtendMapper extends BaseMapper<AppLogExtend> {
-
-}

+ 0 - 19
src/main/java/cn/hanghui/outapi/platform/tenant/mapper/AppLogMapper.java

@@ -1,19 +0,0 @@
-package cn.hanghui.outapi.platform.tenant.mapper;
-
-import cn.hanghui.outapi.platform.tenant.entity.po.AppLog;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springframework.stereotype.Repository;
-
-/**
- * @author shisl
- * @package cn.hanghui.outapi.platform.tenant.mapper
- * @class AppLogMapper
- * @date 2023/12/19 上午11:08
- * @description
- */
-@Repository
-@Deprecated
-public interface AppLogMapper extends BaseMapper<AppLog> {
-
-
-}

+ 0 - 42
src/main/java/cn/hanghui/outapi/platform/tenant/service/AppLogService.java

@@ -1,42 +0,0 @@
-package cn.hanghui.outapi.platform.tenant.service;
-
-import cn.hanghui.outapi.platform.common.entity.rest.RestResult;
-import cn.hanghui.outapi.platform.tenant.entity.dto.AppLogDto;
-import cn.hanghui.outapi.platform.tenant.entity.dto.AppLogPageDto;
-import cn.hanghui.outapi.platform.tenant.entity.dto.AppLogVo;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.Date;
-
-/**
- * @author shisl
- * @package cn.hanghui.outapi.platform.tenant.service
- * @class AppLogService
- * @date 2023/12/19 上午10:48
- * @description
- */
-@Deprecated
-public interface AppLogService {
-    /**
-     * 日志插入
-     *
-     * @param dto
-     * @return
-     */
-    RestResult add(AppLogDto dto);
-
-    /**
-     * 获取日志列表分页
-     *
-     * @param dto
-     * @return
-     */
-    RestResult<IPage<AppLogVo>> page(AppLogPageDto dto);
-
-    /**
-     * 删除过期日志
-     *
-     * @param endTime
-     */
-    void delExpireLog(Date endTime);
-}

+ 0 - 135
src/main/java/cn/hanghui/outapi/platform/tenant/service/impl/AppLogServiceImpl.java

@@ -1,135 +0,0 @@
-package cn.hanghui.outapi.platform.tenant.service.impl;
-
-import cn.hanghui.outapi.platform.common.entity.rest.RestResult;
-import cn.hanghui.outapi.platform.tenant.entity.dto.AppLogDto;
-import cn.hanghui.outapi.platform.tenant.entity.dto.AppLogPageDto;
-import cn.hanghui.outapi.platform.tenant.entity.dto.AppLogVo;
-import cn.hanghui.outapi.platform.tenant.entity.po.AppLog;
-import cn.hanghui.outapi.platform.tenant.entity.po.AppLogExtend;
-import cn.hanghui.outapi.platform.tenant.mapper.AppLogExtendMapper;
-import cn.hanghui.outapi.platform.tenant.mapper.AppLogMapper;
-import cn.hanghui.outapi.platform.tenant.service.AppLogService;
-import cn.hutool.core.bean.BeanUtil;
-import com.baomidou.dynamic.datasource.annotation.DS;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-/**
- * @author shisl
- * @package cn.hanghui.outapi.platform.tenant.service.impl
- * @class AppLogServiceImpl
- * @date 2023/12/19 上午10:49
- * @description
- */
-@Slf4j
-@Service
-@Deprecated
-public class AppLogServiceImpl implements AppLogService {
-
-    @Resource
-    private AppLogMapper appLogMapper;
-
-    @Resource
-    private AppLogExtendMapper appLogExtendMapper;
-
-    @Override
-    @DS("mysqlMiddlePlatform")
-    public RestResult add(AppLogDto dto) {
-        //插入日志基本信息
-        AppLog log = BeanUtil.copyProperties(dto, AppLog.class);
-        log.setCreateTime(new Date());
-        log.setIsDeleted(Boolean.FALSE);
-        log.setUpdateTime(new Date());
-        log.setVersion(1);
-        appLogMapper.insert(log);
-
-        //插入日志内容
-        AppLogExtend extend = new AppLogExtend();
-        extend.setAppLogId(log.getId());
-        extend.setLogContent(dto.getLogContent());
-        extend.setCreateTime(new Date());
-        extend.setIsDeleted(Boolean.FALSE);
-        extend.setUpdateTime(new Date());
-        extend.setVersion(1);
-        appLogExtendMapper.insert(extend);
-        return RestResult.ok();
-    }
-
-    @Override
-    @DS("mysqlMiddlePlatform")
-    public RestResult<IPage<AppLogVo>> page(AppLogPageDto dto) {
-        Page<AppLog> page = new Page<>(dto.getPageNumber(), dto.getPageSize());
-        LambdaQueryWrapper<AppLog> wrapper = new LambdaQueryWrapper<>();
-        if (dto.getSn() != null) {
-            wrapper.eq(AppLog::getSn, dto.getSn());
-        }
-        if (dto.getLogType() != null) {
-            wrapper.eq(AppLog::getLogType, dto.getLogType());
-        }
-        if (dto.getLogTag() != null) {
-            wrapper.like(AppLog::getLogTag, dto.getLogTag());
-        }
-        if (dto.getStartTime() != null) {
-            wrapper.ge(AppLog::getCreateTime, dto.getStartTime());
-        }
-        if (dto.getEndTime() != null) {
-            wrapper.le(AppLog::getCreateTime, dto.getEndTime());
-        }
-        wrapper.orderByDesc(AppLog::getId);
-        Page<AppLog> iPage = appLogMapper.selectPage(page, wrapper);
-        IPage<AppLogVo> convert = iPage.convert(t -> {
-            AppLogVo logVo = BeanUtil.copyProperties(t, AppLogVo.class);
-            return logVo;
-        });
-        complete(convert);
-        return RestResult.ok(convert);
-    }
-
-    @Override
-    @DS("mysqlMiddlePlatform")
-    public void delExpireLog(Date endTime) {
-//        LambdaQueryWrapper<AppLog> wrapper = new LambdaQueryWrapper<>();
-//        wrapper.lt(AppLog::getCreateTime, endTime);
-//        List<AppLog> logs = appLogMapper.selectList(wrapper);
-//        if (logs == null || logs.size() == 0) {
-//            log.info("删除过期日志完成,共删除0条数据");
-//            return;
-//        }
-//        List<Long> logIds = logs.stream().map(AppLog::getId).collect(Collectors.toList());
-//        appLogMapper.deleteBatchIds(logIds);
-//        appLogExtendMapper.delete(Wrappers.lambdaQuery(AppLogExtend.class).in(AppLogExtend::getAppLogId, logIds));
-//        log.info("删除过期日志完成,共删除{}条数据", logIds.size());
-    }
-
-    private void complete(IPage<AppLogVo> convert) {
-        List<AppLogVo> records = convert.getRecords();
-        if (records == null || records.size() == 0) {
-            return;
-        }
-        List<Long> logIds = records.stream().map(AppLogVo::getId).collect(Collectors.toList());
-        List<AppLogExtend> logExtends = appLogExtendMapper.selectList(Wrappers.lambdaQuery(AppLogExtend.class).in(AppLogExtend::getAppLogId, logIds));
-        if (logExtends == null || logExtends.size() == 0) {
-            return;
-        }
-        Map<Long, AppLogExtend> extendsMap = logExtends.stream().collect(Collectors.toMap(AppLogExtend::getAppLogId, a -> a, (k1, k2) -> k1));
-        records.stream().forEach(item -> {
-            AppLogExtend logExtend = extendsMap.get(item.getId());
-            if (logExtend != null) {
-                item.setLogContent(logExtend.getLogContent());
-            }
-        });
-        convert.setRecords(records);
-    }
-
-
-}

+ 0 - 5
src/main/resources/application-api.yml

@@ -55,11 +55,6 @@ spring:
           url: jdbc:mysql://192.168.1.4:3306/ti_prove?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: Nqj##361
-        mysqlMiddlePlatform:
-          driver-class-name: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://192.168.1.4:3306/middle_platform?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
-          username: root
-          password: Nqj##361
 
 --- # redis
 spring:

+ 0 - 5
src/main/resources/application-dev.yml

@@ -58,11 +58,6 @@ spring:
           url: jdbc:mysql://218.108.80.158:55557/ti_prove?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: Nqj##117521
-        mysqlMiddlePlatform:
-          driver-class-name: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://218.108.80.158:55557/middle_platform?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
-          username: root
-          password: Nqj##117521
 
 --- # redis
 spring:

+ 0 - 5
src/main/resources/application-prod.yml

@@ -55,11 +55,6 @@ spring:
           url: jdbc:mysql://192.168.1.4:3306/ti_prove?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: Nqj##361
-        mysqlMiddlePlatform:
-          driver-class-name: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://192.168.1.4:3306/middle_platform?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
-          username: root
-          password: Nqj##361
 
 --- # redis
 spring: