Compare commits
No commits in common. "d10acd386ed1ce0aa033cb35c46051155dcac82d" and "76b1105337aa987984b9ae108fb2c9450058fe51" have entirely different histories.
d10acd386e
...
76b1105337
|
@ -48,9 +48,6 @@ public class ServiceProjectSaveOrUpdateParams {
|
||||||
@Schema(description = "证件号(保安服务许可证/备案证)")
|
@Schema(description = "证件号(保安服务许可证/备案证)")
|
||||||
private String idNumber;
|
private String idNumber;
|
||||||
|
|
||||||
@Schema(description = "保安服务合同")
|
|
||||||
private String securityServiceContract;
|
|
||||||
|
|
||||||
@Schema(description = "服务区域面积")
|
@Schema(description = "服务区域面积")
|
||||||
private Double serviceArea;
|
private Double serviceArea;
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,6 @@ public class ServiceProjectListVo {
|
||||||
private IsOrNot isFiling;
|
private IsOrNot isFiling;
|
||||||
@Schema(description = "证件号(服务类型为保安必填 服务类型为物业则需自招保安为必填)")
|
@Schema(description = "证件号(服务类型为保安必填 服务类型为物业则需自招保安为必填)")
|
||||||
private String idNumber;
|
private String idNumber;
|
||||||
@Schema(description = "保安服务合同")
|
|
||||||
private String securityServiceContract;
|
|
||||||
|
|
||||||
@Schema(description = "服务区域面积")
|
@Schema(description = "服务区域面积")
|
||||||
private Double serviceArea;
|
private Double serviceArea;
|
||||||
|
|
|
@ -45,9 +45,6 @@ public class ServiceProjectSaveOrUpdateParams {
|
||||||
@Schema(description = "证件号(保安服务许可证/备案证)")
|
@Schema(description = "证件号(保安服务许可证/备案证)")
|
||||||
private String idNumber;
|
private String idNumber;
|
||||||
|
|
||||||
@Schema(description = "保安服务合同")
|
|
||||||
private String securityServiceContract;
|
|
||||||
|
|
||||||
@Schema(description = "服务区域面积")
|
@Schema(description = "服务区域面积")
|
||||||
private Double serviceArea;
|
private Double serviceArea;
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,6 @@ public class ServiceProjectPagerVo {
|
||||||
private IsOrNot isFiling;
|
private IsOrNot isFiling;
|
||||||
@Schema(description = "证件号(服务类型为保安必填 服务类型为物业则需自招保安为必填)")
|
@Schema(description = "证件号(服务类型为保安必填 服务类型为物业则需自招保安为必填)")
|
||||||
private String idNumber;
|
private String idNumber;
|
||||||
@Schema(description = "保安服务合同")
|
|
||||||
private String securityServiceContract;
|
|
||||||
|
|
||||||
@Schema(description = "服务区域面积")
|
@Schema(description = "服务区域面积")
|
||||||
private Double serviceArea;
|
private Double serviceArea;
|
||||||
|
|
|
@ -48,11 +48,6 @@ public class SecurityUnit extends BaseEntity implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String businessLicense;
|
private String businessLicense;
|
||||||
|
|
||||||
/**
|
|
||||||
* 保安服务许可证
|
|
||||||
*/
|
|
||||||
private String securityServiceLicence;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 法人信息
|
* 法人信息
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -76,11 +76,6 @@ public class ServiceProject extends BaseEntity implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String idNumber;
|
private String idNumber;
|
||||||
|
|
||||||
/**
|
|
||||||
* 保安服务合同
|
|
||||||
*/
|
|
||||||
private String securityServiceContract;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务区域面积
|
* 服务区域面积
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -30,9 +30,6 @@ public class SecurityUnitRegisterParams {
|
||||||
@Schema(description = "营业执照")
|
@Schema(description = "营业执照")
|
||||||
private String businessLicense;
|
private String businessLicense;
|
||||||
|
|
||||||
@Schema(description = "保安服务许可证")
|
|
||||||
private String securityServiceLicence;
|
|
||||||
|
|
||||||
@Schema(description = "法人信息")
|
@Schema(description = "法人信息")
|
||||||
private LegalPersonInfo legalPersonInfo;
|
private LegalPersonInfo legalPersonInfo;
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,16 @@ package com.changhu.support.minio;
|
||||||
import io.minio.MinioClient;
|
import io.minio.MinioClient;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
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
|
* fileName: MinioProperties
|
||||||
* author: LuoZhun
|
* author: LuoZhun
|
||||||
|
@ -41,9 +47,43 @@ public class MinioProperties {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public MinioClient minioClient() {
|
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()
|
return MinioClient.builder()
|
||||||
.endpoint(url)
|
.endpoint(url)
|
||||||
.credentials(accessKey, secretKey)
|
.credentials(accessKey, secretKey)
|
||||||
|
.httpClient(customHttpClient)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class MinioServiceImpl implements MinioService {
|
||||||
.method(Method.PUT)
|
.method(Method.PUT)
|
||||||
.bucket(bucketName)
|
.bucket(bucketName)
|
||||||
.object(objectName)
|
.object(objectName)
|
||||||
.expiry(3, TimeUnit.MINUTES)
|
.expiry(10, TimeUnit.SECONDS)
|
||||||
.build());
|
.build());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new MessageException("获取临时上传地址失败:{}", e.getMessage());
|
throw new MessageException("获取临时上传地址失败:{}", e.getMessage());
|
||||||
|
|
Loading…
Reference in New Issue