diff --git a/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java index a381c70..df4fae0 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java @@ -48,6 +48,9 @@ public class ServiceProjectSaveOrUpdateParams { @Schema(description = "证件号(保安服务许可证/备案证)") private String idNumber; + @Schema(description = "保安服务合同") + private String securityServiceContract; + @Schema(description = "服务区域面积") private Double serviceArea; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/vo/ServiceProjectListVo.java b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/vo/ServiceProjectListVo.java index 569fcc4..b591be5 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/vo/ServiceProjectListVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/policeManagement/pojo/vo/ServiceProjectListVo.java @@ -43,6 +43,8 @@ public class ServiceProjectListVo { private IsOrNot isFiling; @Schema(description = "证件号(服务类型为保安必填 服务类型为物业则需自招保安为必填)") private String idNumber; + @Schema(description = "保安服务合同") + private String securityServiceContract; @Schema(description = "服务区域面积") private Double serviceArea; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java index d20f9b5..25b72fb 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/params/ServiceProjectSaveOrUpdateParams.java @@ -45,6 +45,9 @@ public class ServiceProjectSaveOrUpdateParams { @Schema(description = "证件号(保安服务许可证/备案证)") private String idNumber; + @Schema(description = "保安服务合同") + private String securityServiceContract; + @Schema(description = "服务区域面积") private Double serviceArea; diff --git a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/ServiceProjectPagerVo.java b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/ServiceProjectPagerVo.java index bb0b5d7..2044393 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/ServiceProjectPagerVo.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/securityManagement/pojo/vo/ServiceProjectPagerVo.java @@ -46,6 +46,8 @@ public class ServiceProjectPagerVo { private IsOrNot isFiling; @Schema(description = "证件号(服务类型为保安必填 服务类型为物业则需自招保安为必填)") private String idNumber; + @Schema(description = "保安服务合同") + private String securityServiceContract; @Schema(description = "服务区域面积") private Double serviceArea; diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUnit.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUnit.java index cbd6080..36de921 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUnit.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/SecurityUnit.java @@ -48,6 +48,11 @@ public class SecurityUnit extends BaseEntity implements Serializable { */ private String businessLicense; + /** + * 保安服务许可证 + */ + private String securityServiceLicence; + /** * 法人信息 */ diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ServiceProject.java b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ServiceProject.java index ac678a2..2bc3396 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ServiceProject.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/entity/ServiceProject.java @@ -76,6 +76,11 @@ public class ServiceProject extends BaseEntity implements Serializable { */ private String idNumber; + /** + * 保安服务合同 + */ + private String securityServiceContract; + /** * 服务区域面积 */ diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/params/SecurityUnitRegisterParams.java b/policeSecurityServer/src/main/java/com/changhu/pojo/params/SecurityUnitRegisterParams.java index 9e32de5..36ce2a8 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/params/SecurityUnitRegisterParams.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/params/SecurityUnitRegisterParams.java @@ -30,6 +30,9 @@ public class SecurityUnitRegisterParams { @Schema(description = "营业执照") private String businessLicense; + @Schema(description = "保安服务许可证") + private String securityServiceLicence; + @Schema(description = "法人信息") private LegalPersonInfo legalPersonInfo; diff --git a/policeSecurityServer/src/main/java/com/changhu/support/minio/MinioProperties.java b/policeSecurityServer/src/main/java/com/changhu/support/minio/MinioProperties.java index 28f907d..5c5f07f 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/minio/MinioProperties.java +++ b/policeSecurityServer/src/main/java/com/changhu/support/minio/MinioProperties.java @@ -3,16 +3,10 @@ package com.changhu.support.minio; import io.minio.MinioClient; import lombok.Data; import lombok.extern.slf4j.Slf4j; -import okhttp3.OkHttpClient; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.security.cert.X509Certificate; - /** * fileName: MinioProperties * author: LuoZhun @@ -47,43 +41,9 @@ public class MinioProperties { @Bean public MinioClient minioClient() { - // Create a trust manager that does not validate certificate chains - TrustManager[] trustAllCerts = new TrustManager[]{ - new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } - - public void checkClientTrusted(X509Certificate[] certs, String authType) { - // Do nothing (trust any client certificate) - } - - public void checkServerTrusted(X509Certificate[] certs, String authType) { - // Do nothing (trust any server certificate) - } - } - }; - - // Install the all-trusting trust manager - SSLContext sslContext = null; - try { - sslContext = SSLContext.getInstance("SSL"); - sslContext.init(null, trustAllCerts, new java.security.SecureRandom()); - } catch (Exception e) { - log.error("Install the all-trusting trust manager error:{}", e.getMessage()); - } - - - // Create a custom OkHttpClient that trusts all certificates - OkHttpClient customHttpClient = new OkHttpClient.Builder() - .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustAllCerts[0]) - .hostnameVerifier((hostname, session) -> true) - .build(); - return MinioClient.builder() .endpoint(url) .credentials(accessKey, secretKey) - .httpClient(customHttpClient) .build(); } } diff --git a/policeSecurityServer/src/main/java/com/changhu/support/minio/service/impl/MinioServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/support/minio/service/impl/MinioServiceImpl.java index bd3a686..9dce182 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/minio/service/impl/MinioServiceImpl.java +++ b/policeSecurityServer/src/main/java/com/changhu/support/minio/service/impl/MinioServiceImpl.java @@ -181,7 +181,7 @@ public class MinioServiceImpl implements MinioService { .method(Method.PUT) .bucket(bucketName) .object(objectName) - .expiry(10, TimeUnit.SECONDS) + .expiry(3, TimeUnit.MINUTES) .build()); } catch (Exception e) { throw new MessageException("获取临时上传地址失败:{}", e.getMessage());