feat:添加APP版本管理相关代码
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package org.springblade.file.callback;
|
||||
|
||||
/**
|
||||
* 解压回调接口
|
||||
* @author bfhuange
|
||||
* @date 2024/11/8
|
||||
*/
|
||||
public interface UnzipCallback {
|
||||
/**
|
||||
* 解压任务的业务编码
|
||||
* @return
|
||||
*/
|
||||
String getBizCode();
|
||||
|
||||
/**
|
||||
* 回调接口
|
||||
* @param bizId 业务id
|
||||
* @param event 事件 org.springblade.file.callback.UnzipEventType name
|
||||
* @return
|
||||
*/
|
||||
boolean callback(Long bizId, String event);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.springblade.file.callback;
|
||||
|
||||
/**
|
||||
* 解压事件类型
|
||||
* @author bfhuange
|
||||
* @date 2024/11/15
|
||||
*/
|
||||
public enum UnzipEventType {
|
||||
/**
|
||||
* 开始解压
|
||||
*/
|
||||
START,
|
||||
/**
|
||||
* 解压成功
|
||||
*/
|
||||
SUCCESS,
|
||||
/**
|
||||
* 解压失败
|
||||
*/
|
||||
FAIL,
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.springblade.file.config;
|
||||
|
||||
import feign.codec.Encoder;
|
||||
import feign.form.spring.SpringFormEncoder;
|
||||
import org.springframework.beans.factory.ObjectFactory;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.cloud.openfeign.support.SpringEncoder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2025/4/9
|
||||
*/
|
||||
public class FeignFileUploadClientConfig {
|
||||
|
||||
@Bean
|
||||
public Encoder feignFormEncoder(ObjectFactory<HttpMessageConverters> messageConverters) {
|
||||
return new SpringFormEncoder(new SpringEncoder(messageConverters));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
package org.springblade.file.feign;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.tool.api.FR;
|
||||
import org.springblade.file.pojo.dto.*;
|
||||
import org.springblade.file.pojo.entity.Attachment;
|
||||
import org.springblade.file.pojo.vo.*;
|
||||
import org.springblade.thirdparty.ocr.pojo.vo.TransportCertificateVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @date 2024/10/21
|
||||
*/
|
||||
@FeignClient(
|
||||
value = AppConstant.APPLICATION_FILE_NAME,
|
||||
fallback = IFileClientFallback.class
|
||||
)
|
||||
public interface IFileClient {
|
||||
|
||||
String API_PREFIX = "/feign/client/file";
|
||||
String ATTACHMENT = API_PREFIX + "/attachment";
|
||||
String ATTACHMENT_DETAIL = API_PREFIX + "/attachment-detail";
|
||||
String BUSINESS_ATTACHMENT_SAVE_REMOVE = API_PREFIX + "/businessAttachment-save-remove";
|
||||
String BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE = API_PREFIX + "/businessAttachment-batch-save-remove";
|
||||
String BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE_BY_PARAM = API_PREFIX + "/businessAttachment-batch-save-remove-by-param";
|
||||
String BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE_NO_BIZ_ID = API_PREFIX + "/businessAttachment-batch-save-remove-no-bizId";
|
||||
String BUSINESS_ATTACHMENT_REMOVE = API_PREFIX + "/businessAttachment-remove";
|
||||
String BUSINESS_ATTACHMENT_LIST = API_PREFIX + "/businessAttachment-list";
|
||||
String BUSINESS_UNZIP_TASK_SAVE = API_PREFIX + "/businessUnzipTask-save";
|
||||
String BUSINESS_UNZIP_TASK_UPDATE = API_PREFIX + "/businessUnzipTask-update";
|
||||
String BUSINESS_UNZIP_TASK_CANCEL = API_PREFIX + "/businessUnzipTask-cancel";
|
||||
String BUSINESS_UNZIP_TASK_REMOVE = API_PREFIX + "/businessUnzipTask-remove";
|
||||
String BUSINESS_UNZIP_TASK_LIST = API_PREFIX + "/businessUnzipTask-list";
|
||||
String BUSINESS_UNZIP_DETAIL_LIST = API_PREFIX + "/businessUnzipDetail-list";
|
||||
String RECOGNITION_TRANSPORT_CERTIFICATE = API_PREFIX + "/recognitionTransportCertificate";
|
||||
String FILE_URLS = API_PREFIX + "/getFileUrls";
|
||||
|
||||
/**
|
||||
* 获取附件,多个附件id用逗号分割
|
||||
*
|
||||
* @param id
|
||||
* @return List<Attachment>
|
||||
*/
|
||||
@GetMapping(ATTACHMENT)
|
||||
FR<List<Attachment>> getAttachment(@RequestParam("id") String id);
|
||||
|
||||
/**
|
||||
* 获取附件详情
|
||||
*
|
||||
* @param id
|
||||
* @return List<Attachment>
|
||||
*/
|
||||
@GetMapping(ATTACHMENT_DETAIL)
|
||||
FR<AttachmentDetailVO> getAttachmentDetail(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 保存并删除业务附件,remove为true,先用bizId删除,再新增
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_SAVE_REMOVE)
|
||||
FR saveAndRemoveBusinessAttachment(@RequestBody @Validated BusinessAttachmentBatchAddDTO param);
|
||||
|
||||
/**
|
||||
* 批量保存并删除业务附件,先删除附件,再新增,业务id为空,从params中获取bizId,先删除
|
||||
*
|
||||
* @param params 参数为空不新增
|
||||
* @param bizId 业务id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE)
|
||||
FR batchSaveAndRemoveBusinessAttachment(@RequestBody List<@Valid BusinessAttachmentAddDTO> params, @RequestParam(value = "bizId", required = false) Long bizId);
|
||||
|
||||
/**
|
||||
* 批量保存并删除业务附件,deleteParam为空,从params获取bizId删除,不为空,使用bizIds和bizCodes删除附件,bizCodes为空删除所有bizIds的附件
|
||||
* deleteParam 中 delete 为false,不删除
|
||||
*
|
||||
* @param params 参数为空不新增
|
||||
* @param deleteParam 删除参数,支持只删除业务编码参数的附件
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE_BY_PARAM)
|
||||
FR batchSaveAndRemoveByParamBusinessAttachment(@RequestBody List<@Valid BusinessAttachmentAddDTO> params, @Valid @SpringQueryMap BusinessAttachmentDeleteDTO deleteParam);
|
||||
|
||||
/**
|
||||
* 批量保存并删除业务附件,从参数中提取所有bizId
|
||||
*
|
||||
* @param params 参数
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_BATCH_SAVE_REMOVE_NO_BIZ_ID)
|
||||
FR batchSaveAndRemoveBusinessAttachment(@RequestBody List<@Valid BusinessAttachmentAddDTO> params);
|
||||
|
||||
/**
|
||||
* 根据业务id删除业务附件
|
||||
*
|
||||
* @param bizId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_REMOVE)
|
||||
FR removeBusinessAttachment(@NotNull(message = "业务id不能为空") @RequestParam(value = "bizId", required = false) Long bizId);
|
||||
|
||||
/**
|
||||
* 查询业务附件列表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_ATTACHMENT_LIST)
|
||||
FR<List<BusinessAttachmentVO>> getBusinessAttachments(@Validated @RequestBody BusinessAttachmentQueryDTO param);
|
||||
|
||||
/**
|
||||
* 保存业务解压任务
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_SAVE)
|
||||
FR saveBusinessUnzipTask(@Validated @RequestBody BusinessUnzipTaskAddDTO param);
|
||||
|
||||
/**
|
||||
* 更新业务解压任务(重新上传)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_UPDATE)
|
||||
FR updateBusinessUnzipTask(@Validated @RequestBody BusinessUnzipTaskUpdateDTO param);
|
||||
|
||||
/**
|
||||
* 取消业务解压任务
|
||||
* @param bizId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_CANCEL)
|
||||
FR cancelBusinessUnzipTask(@NotNull(message = "业务id不能为空") @RequestParam("bizId") Long bizId);
|
||||
|
||||
/**
|
||||
* 删除业务解压任务
|
||||
* @param bizId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_REMOVE)
|
||||
FR removeBusinessUnzipTask(@NotNull(message = "业务id不能为空") @RequestParam("bizId") Long bizId);
|
||||
|
||||
/**
|
||||
* 根据业务id列表查询业务解压任务列表
|
||||
* @param bizIds
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(BUSINESS_UNZIP_TASK_LIST)
|
||||
FR<List<BusinessUnzipTaskListVO>> getBusinessUnzipTasksByBizIds(@Validated @NotEmpty(message = "业务id列表不能为空") @RequestBody List<Long> bizIds);
|
||||
|
||||
/**
|
||||
* 查询解压明细列表
|
||||
* @param bizId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(BUSINESS_UNZIP_DETAIL_LIST)
|
||||
FR<List<BusinessUnzipDetailListVO>> queryBusinessUnzipDetail(@NotNull(message = "业务id不能为空") @RequestParam("bizId") Long bizId);
|
||||
|
||||
/**
|
||||
* 识别车辆运输凭证
|
||||
*
|
||||
* @param param 同一车牌文件夹下的附件objectKey列表
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(RECOGNITION_TRANSPORT_CERTIFICATE)
|
||||
FR<TransportCertificateVO> recognitionTransportCertificates(@Validated @RequestBody FileCertificateBatchRecognitionDTO param);
|
||||
|
||||
/**
|
||||
* 批量获取附件下载地址
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(FILE_URLS)
|
||||
FR<List<FileUrlVO>> getFileUrls(@Validated @RequestBody IdsDTO param);
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package org.springblade.file.feign;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import org.springblade.core.tool.api.FR;
|
||||
import org.springblade.file.pojo.dto.*;
|
||||
import org.springblade.file.pojo.entity.Attachment;
|
||||
import org.springblade.file.pojo.vo.*;
|
||||
import org.springblade.thirdparty.ocr.pojo.vo.TransportCertificateVO;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @date 2024/10/21
|
||||
*/
|
||||
@Component
|
||||
public class IFileClientFallback implements IFileClient, IFileUploadClient {
|
||||
|
||||
@Override
|
||||
public FR<List<Attachment>> getAttachment(String id) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR<AttachmentDetailVO> getAttachmentDetail(Long id) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR saveAndRemoveBusinessAttachment(BusinessAttachmentBatchAddDTO param) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR batchSaveAndRemoveBusinessAttachment(List<BusinessAttachmentAddDTO> params, Long bizId) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR batchSaveAndRemoveByParamBusinessAttachment(List<@Valid BusinessAttachmentAddDTO> params, @Valid @SpringQueryMap BusinessAttachmentDeleteDTO deleteParam) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR batchSaveAndRemoveBusinessAttachment(List<@Valid BusinessAttachmentAddDTO> params) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR removeBusinessAttachment(Long bizId) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR<List<BusinessAttachmentVO>> getBusinessAttachments(BusinessAttachmentQueryDTO param) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR saveBusinessUnzipTask(BusinessUnzipTaskAddDTO param) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR updateBusinessUnzipTask(BusinessUnzipTaskUpdateDTO param) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR cancelBusinessUnzipTask(Long bizId) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR removeBusinessUnzipTask(Long bizId) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR<List<BusinessUnzipTaskListVO>> getBusinessUnzipTasksByBizIds(List<Long> bizIds) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR<List<BusinessUnzipDetailListVO>> queryBusinessUnzipDetail(Long bizId) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR<TransportCertificateVO> recognitionTransportCertificates(@Validated @RequestBody FileCertificateBatchRecognitionDTO param) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR<List<FileUrlVO>> getFileUrls(IdsDTO param) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR<List<Attachment>> ossUpload(MultipartFile[] files) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FR<TempFileUrlVO> ossUploadTemp(MultipartFile file, Integer expires) {
|
||||
return FR.fail("获取数据失败");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.springblade.file.feign;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.tool.api.FR;
|
||||
import org.springblade.file.config.FeignFileUploadClientConfig;
|
||||
import org.springblade.file.pojo.entity.Attachment;
|
||||
import org.springblade.file.pojo.vo.TempFileUrlVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @date 2024/10/21
|
||||
*/
|
||||
@FeignClient(
|
||||
value = AppConstant.APPLICATION_FILE_NAME,
|
||||
fallback = IFileClientFallback.class,
|
||||
configuration = FeignFileUploadClientConfig.class
|
||||
)
|
||||
public interface IFileUploadClient {
|
||||
|
||||
String API_PREFIX = "/feign/client/file";
|
||||
String UPLOAD = API_PREFIX + "/ossUpload";
|
||||
String UPLOAD_TEMP = API_PREFIX + "/ossUploadTemp";
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
* @param files
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = UPLOAD, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
FR<List<Attachment>> ossUpload(@RequestPart("files") MultipartFile[] files);
|
||||
|
||||
/**
|
||||
* 上传临时文件,不保存到附件表,过期后自动删除
|
||||
* @param file
|
||||
* @param expires 过期时间,单位天,过期后自动删除
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = UPLOAD_TEMP, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
FR<TempFileUrlVO> ossUploadTemp(@RequestPart("file") MultipartFile file, @NotNull(message = "过期时间不能为空") @RequestParam(name = "expires", required = false) Integer expires);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务附件新增参数")
|
||||
@Builder
|
||||
public class BusinessAttachmentAddDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@NotNull(message = "业务id不能为空")
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@NotBlank(message = "业务code不能为空")
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@NotNull(message = "附件id不能为空")
|
||||
@Schema(description = "附件id")
|
||||
private Long attachmentId;
|
||||
/**
|
||||
* 附件描述
|
||||
*/
|
||||
@Schema(description = "附件描述")
|
||||
private String desc;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "业务附件批量新增参数")
|
||||
public class BusinessAttachmentBatchAddDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@NotNull(message = "业务id不能为空")
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
|
||||
/**
|
||||
* 明细列表
|
||||
*/
|
||||
@Schema(description = "明细列表")
|
||||
private List<@Valid BusinessAttachmentBatchAddDetailDTO> details;
|
||||
|
||||
/**
|
||||
* 是否先删除,默认 是
|
||||
*/
|
||||
@Schema(description = "是否先删除,默认 是")
|
||||
private boolean remove = true;
|
||||
|
||||
public BusinessAttachmentBatchAddDTO(Long bizId) {
|
||||
this.bizId = bizId;
|
||||
}
|
||||
|
||||
public BusinessAttachmentBatchAddDTO(Long bizId, String bizCode, Long attachmentId) {
|
||||
this.bizId = bizId;
|
||||
this.details = Lists.newArrayList(new BusinessAttachmentBatchAddDetailDTO(bizCode, attachmentId));
|
||||
}
|
||||
|
||||
public BusinessAttachmentBatchAddDTO addDetail(BusinessAttachmentBatchAddDetailDTO detail) {
|
||||
if (this.details == null) {
|
||||
this.details = new ArrayList<>();
|
||||
}
|
||||
this.details.add(detail);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BusinessAttachmentBatchAddDTO addDetail(String bizCode, Long attachmentId) {
|
||||
return this.addDetail(new BusinessAttachmentBatchAddDetailDTO(bizCode, attachmentId));
|
||||
}
|
||||
|
||||
public BusinessAttachmentBatchAddDTO addDetail(String bizCode, List<Long> attachmentIds) {
|
||||
return this.addDetail(new BusinessAttachmentBatchAddDetailDTO(bizCode, attachmentIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "业务附件批量新增明细参数")
|
||||
@Builder
|
||||
public class BusinessAttachmentBatchAddDetailDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@NotBlank(message = "业务编码不能为空")
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 附件id列表
|
||||
*/
|
||||
@NotEmpty(message = "附件id列表不能为空")
|
||||
@Schema(description = "附件id列表")
|
||||
private List<@NotNull(message = "附件id不能为空") Long> attachmentIds;
|
||||
|
||||
public BusinessAttachmentBatchAddDetailDTO(String bizCode, Long attachmentId) {
|
||||
this.bizCode = bizCode;
|
||||
this.attachmentIds = Lists.newArrayList(attachmentId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务附件删除参数
|
||||
* @author bfhuange
|
||||
* @since 2024/12/3
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "业务附件删除参数")
|
||||
public class BusinessAttachmentDeleteDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 业务id列表
|
||||
*/
|
||||
@Schema(description = "业务id列表")
|
||||
private List<Long> bizIds;
|
||||
/**
|
||||
* 业务code列表
|
||||
*/
|
||||
@Schema(description = "业务code列表")
|
||||
private List<String> bizCodes;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@Schema(description = "是否删除")
|
||||
private boolean delete = true;
|
||||
|
||||
public BusinessAttachmentDeleteDTO(Long bizId) {
|
||||
this.bizIds = Lists.newArrayList(bizId);
|
||||
}
|
||||
|
||||
public BusinessAttachmentDeleteDTO(Long bizId, String bizCode) {
|
||||
this.bizIds = Lists.newArrayList(bizId);
|
||||
if (StringUtil.isNotBlank(bizCode)) {
|
||||
this.bizCodes = Lists.newArrayList(bizCode);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "业务附件查询参数")
|
||||
public class BusinessAttachmentQueryDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 业务id列表
|
||||
*/
|
||||
@NotNull(message = "业务id列表不能为空")
|
||||
@Schema(description = "业务id列表")
|
||||
private List<@NotNull(message = "业务id不能为空") Long> bizIds;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 业务code列表
|
||||
*/
|
||||
@Schema(description = "业务code列表")
|
||||
private List<String> bizCodes;
|
||||
|
||||
public BusinessAttachmentQueryDTO(Long bizId) {
|
||||
this.bizIds = List.of(bizId);
|
||||
}
|
||||
|
||||
public BusinessAttachmentQueryDTO(List<Long> bizIds) {
|
||||
this.bizIds = bizIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 兼容历史参数
|
||||
* @param bizId
|
||||
*/
|
||||
public void setBizId(Long bizId) {
|
||||
if (this.bizIds == null) {
|
||||
this.bizIds = new ArrayList<>();
|
||||
}
|
||||
this.bizIds.add(bizId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springblade.file.pojo.enums.UnzipTask;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 业务解压任务新增参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务新增参数")
|
||||
public class BusinessUnzipTaskAddDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@NotNull(message = "业务id不能为空")
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 部门名称ID
|
||||
*/
|
||||
@Schema(description = "部门名称ID")
|
||||
private Long departmentId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@NotBlank(message = "业务code不能为空")
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode = UnzipTask.BizCode.WAYBILL.getCode();
|
||||
/**
|
||||
* 文档编号
|
||||
*/
|
||||
@Schema(description = "文档编号")
|
||||
private String docCode;
|
||||
/**
|
||||
* 关联类型,file_task 文件任务,attachment 附件
|
||||
*/
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件")
|
||||
private String relateType = UnzipTask.RelateType.FILE_TASK.getCode();
|
||||
/**
|
||||
* 关联id,文件任务id或附件id
|
||||
*/
|
||||
@NotNull(message = "关联id不能为空")
|
||||
@Schema(description = "关联id,文件任务id或附件id")
|
||||
private Long relateId;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务解压任务查询参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务查询参数")
|
||||
public class BusinessUnzipTaskQueryDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 文档编号(凭证批次号)
|
||||
*/
|
||||
@Schema(description = "文档编号(凭证批次号)")
|
||||
private String docCode;
|
||||
/**
|
||||
* 附件名称
|
||||
*/
|
||||
@Schema(description = "附件名称")
|
||||
private String attachmentName;
|
||||
/**
|
||||
* 状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停
|
||||
*/
|
||||
@Schema(description = "状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停")
|
||||
private String status;
|
||||
/**
|
||||
* 关联类型,file_task 文件任务,attachment 附件
|
||||
*/
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件", hidden = true)
|
||||
private String relateType;
|
||||
/**
|
||||
* 是否只查询当前用户
|
||||
*/
|
||||
@Schema(description = "是否只查询当前用户")
|
||||
private boolean currentUser;
|
||||
/**
|
||||
* 当前登录人id
|
||||
*/
|
||||
@Schema(hidden = true)
|
||||
private Long currentUserId;
|
||||
/**
|
||||
* 业务id列表
|
||||
*/
|
||||
@Schema(description = "业务id列表", hidden = true)
|
||||
private List<Long> bizIds;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springblade.file.pojo.enums.UnzipTask;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 业务解压任务更新参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务更新参数")
|
||||
public class BusinessUnzipTaskUpdateDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 关联id,文件任务id或附件id
|
||||
*/
|
||||
@NotNull(message = "关联id不能为空")
|
||||
@Schema(description = "关联id,文件任务id或附件id")
|
||||
private Long relateId;
|
||||
/**
|
||||
* 关联类型,file_task 文件任务,attachment 附件
|
||||
*/
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件", hidden = true)
|
||||
private String relateType = UnzipTask.RelateType.FILE_TASK.getCode();
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 凭证识别参数,依次调用单张识别
|
||||
* @author bfhuange
|
||||
* @since 2024/12/13
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "凭证附件参数")
|
||||
public class CertificateAttachmentDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 磅单ObjectKey
|
||||
*/
|
||||
@Schema(description = "磅单ObjectKey")
|
||||
private String poundObjectKey;
|
||||
/**
|
||||
* 车头ObjectKey
|
||||
*/
|
||||
@Schema(description = "车头ObjectKey")
|
||||
private String carFrontObjectKey;
|
||||
/**
|
||||
* 驾驶证ObjectKey
|
||||
*/
|
||||
@Schema(description = "驾驶证ObjectKey")
|
||||
private String driverLicenseObjectKey;
|
||||
/**
|
||||
* 行驶证ObjectKey
|
||||
*/
|
||||
@Schema(description = "行驶证ObjectKey")
|
||||
private String vehicleLicenseObjectKey;
|
||||
/**
|
||||
* 项目简称
|
||||
*/
|
||||
@Schema(description = "项目简称")
|
||||
private String projectAbbreviation;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 凭证批量识别参数,所有图像链接统一识别,不分类
|
||||
* @author bfhuange
|
||||
* @since 2025/3/13
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class FileCertificateBatchRecognitionDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 所有图像 obs key列表
|
||||
*/
|
||||
@NotEmpty(message = "图像 obs key列表不能为空")
|
||||
private List<String> objectKeys;
|
||||
/**
|
||||
* 项目简称
|
||||
*/
|
||||
private String projectAbbreviation;
|
||||
/**
|
||||
* 凭证编码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 目录名称
|
||||
*/
|
||||
private String dirName;
|
||||
|
||||
public FileCertificateBatchRecognitionDTO(List<String> objectKeys) {
|
||||
this.objectKeys = objectKeys;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件任务创建对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "文件任务创建对象")
|
||||
public class FileTaskCreateDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@NotBlank(message = "Md5不能为空")
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@NotBlank(message = "附件名不能为空")
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@NotNull(message = "附件大小不能为空")
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* 分段大小
|
||||
*/
|
||||
@NotNull(message = "分段大小不能为空")
|
||||
@Schema(description = "分段大小")
|
||||
private Integer chunkSize;
|
||||
|
||||
/**
|
||||
* 分段数量
|
||||
*/
|
||||
@NotNull(message = "分段数量不能为空")
|
||||
@Schema(description = "分段数量")
|
||||
private Integer chunkTotal;
|
||||
|
||||
/**
|
||||
* 是否强制创建新任务,默认 false,如果存在相同md5的任务,会创建失败,true则新创建一个任务
|
||||
*/
|
||||
@Schema(description = "是否强制创建新任务,默认 false,如果存在相同md5的任务,会创建失败,true则新创建一个任务")
|
||||
private boolean force;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springblade.file.pojo.vo.PartEtagVO;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件任务更新对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "文件任务更新对象")
|
||||
public class FileTaskUpdateDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 文件任务id
|
||||
*/
|
||||
@NotNull(message = "文件任务id不能为空")
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
/**
|
||||
* 段的ETag值。分段的Base64编码的128位MD5摘要,长度为32的字符串
|
||||
*/
|
||||
@NotBlank(message = "etag不能为空")
|
||||
@Schema(description = "etag")
|
||||
private String etag;
|
||||
/**
|
||||
* 段号。分段号可以是不连续的。取值范围是[1,10000]的非负整数
|
||||
*/
|
||||
@NotNull(message = "段号不能为空")
|
||||
@Schema(description = "段号")
|
||||
private Integer partNumber;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分段上传文件对象")
|
||||
public class FileUploadDTO {
|
||||
private MultipartFile multipartFile; // 文件对象
|
||||
private String md5; // 文件md5值
|
||||
private Long chunkTotal; // 分段总数
|
||||
private Long chunkSize; // 分段大小
|
||||
private Integer index; // 当前分段的位置
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springblade.file.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* id批量参数
|
||||
* @author bfhuange
|
||||
* @date 2024/10/29
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "id批量参数")
|
||||
public class IdsDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* id列表
|
||||
*/
|
||||
@NotEmpty(message = "id列表不能为空")
|
||||
@Schema(description = "id列表")
|
||||
private @Valid List<@NotNull(message = "id不能为空") Long> ids;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhaowei
|
||||
* @date 2024/8/16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("blade_attachment")
|
||||
@Schema(description = "附件对象")
|
||||
public class Attachment implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 压缩文件所在压缩包相对路径
|
||||
*/
|
||||
@Schema(description = "压缩文件所在压缩包相对路径")
|
||||
private String dir;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private long size;
|
||||
|
||||
/**
|
||||
* objectKey
|
||||
*/
|
||||
@Schema(description = "华为OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 创建人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 状态[0:未删除,1:删除]
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除 [0:未删除,1:删除]")
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_business_attachment")
|
||||
@Schema(description = "BusinessAttachment对象")
|
||||
public class BusinessAttachment implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@Schema(description = "附件id")
|
||||
private Long attachmentId;
|
||||
/**
|
||||
* 附件描述
|
||||
*/
|
||||
@Schema(description = "附件描述")
|
||||
@TableField(value = "`desc`")
|
||||
private String desc;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description = "租户ID")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 状态[0:未删除,1:删除]
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Integer isDeleted;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务解压明细表
|
||||
* </p>
|
||||
*
|
||||
* @author bfhuange
|
||||
* @since 2024-10-30
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_business_unzip_detail")
|
||||
@Schema(description = "BusinessUnzipDetail对象")
|
||||
public class BusinessUnzipDetail implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 业务解压任务id
|
||||
*/
|
||||
@Schema(description = "业务解压任务id")
|
||||
private Long businessUnzipTaskId;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@Schema(description = "附件id")
|
||||
private Long attachmentId;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 状态[0:未删除,1:删除]
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除 [0:未删除,1:删除]")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Integer isDeleted;
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务解压任务表
|
||||
* </p>
|
||||
*
|
||||
* @author bfhuange
|
||||
* @since 2024-10-28
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_business_unzip_task")
|
||||
@Schema(description = "业务解压任务表")
|
||||
public class BusinessUnzipTask implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 部门名称ID
|
||||
*/
|
||||
@Schema(description = "部门名称ID")
|
||||
private Long departmentId;
|
||||
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
|
||||
@Schema(description = "文档编号")
|
||||
private String docCode;
|
||||
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件")
|
||||
private String relateType;
|
||||
|
||||
@Schema(description = "关联id,文件任务id或附件id")
|
||||
private Long relateId;
|
||||
|
||||
@Schema(description = "状态 uploading:正在上传 unzipping:解压中 finished:已完成")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "租户ID")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String tenantId;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
@Schema(description = "是否已删除", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@TableLogic
|
||||
private Integer isDeleted;
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhaowei
|
||||
* @date 2024/8/23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("blade_file_task")
|
||||
@Schema(description = "文件上传任务对象")
|
||||
public class FileTask implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* OBS objectKey
|
||||
*/
|
||||
@Schema(description = "OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
@Schema(description = "文件类型")
|
||||
private String suffix;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* 分段大小
|
||||
*/
|
||||
@Schema(description = "分段大小")
|
||||
private Integer chunkSize;
|
||||
|
||||
/**
|
||||
* 分段数量
|
||||
*/
|
||||
@Schema(description = "分段数量")
|
||||
private Integer chunkTotal;
|
||||
|
||||
/**
|
||||
* 当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1
|
||||
*/
|
||||
@Schema(description = "当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1")
|
||||
private Integer currentIndex;
|
||||
|
||||
/**
|
||||
* 华为云初始化上传任务生成的uploadId
|
||||
*/
|
||||
@Schema(description = "华为云初始化上传任务生成的uploadId")
|
||||
private String uploadId;
|
||||
|
||||
/**
|
||||
* 状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停
|
||||
*/
|
||||
@Schema(description = "状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 状态[0:未删除,1:删除]
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除 [0:未删除,1:删除]")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package org.springblade.file.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhaowei
|
||||
* @date 2024/8/16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("blade_file_task_part")
|
||||
@Schema(description = "文件任务分段表")
|
||||
public class FileTaskPart implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 文件任务Id
|
||||
*/
|
||||
@Schema(description = "文件任务Id")
|
||||
private Long fileTaskId;
|
||||
|
||||
/**
|
||||
* 段号。分段号可以是不连续的。取值范围是[1,10000]的非负整数
|
||||
*/
|
||||
@Schema(description = "段号。分段号可以是不连续的。取值范围是[1,10000]的非负整数")
|
||||
private Integer partNumber;
|
||||
|
||||
/**
|
||||
* 段的ETag值。分段的Base64编码的128位MD5摘要,长度为32的字符串
|
||||
*/
|
||||
@Schema(description = "段的ETag值。分段的Base64编码的128位MD5摘要,长度为32的字符串")
|
||||
private String etag;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.springblade.file.pojo.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 文件任务状态
|
||||
* @author bfhuange
|
||||
* @date 2024/10/22
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum FileTaskStatus {
|
||||
/**
|
||||
* 正在上传
|
||||
*/
|
||||
UPLOADING("uploading", "正在上传"),
|
||||
/**
|
||||
* 上传完成
|
||||
*/
|
||||
COMPLETED("completed", "上传完成"),
|
||||
/**
|
||||
* 上传失败
|
||||
*/
|
||||
FAILED("failed", "上传失败"),
|
||||
/**
|
||||
* 已暂停
|
||||
*/
|
||||
PAUSED("paused", "已暂停"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package org.springblade.file.pojo.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 解压任务枚举类
|
||||
* @author bfhuange
|
||||
* @date 2024/10/27
|
||||
*/
|
||||
public class UnzipTask {
|
||||
|
||||
/**
|
||||
* 业务编码枚举
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum BizCode {
|
||||
/**
|
||||
* 运单
|
||||
*/
|
||||
WAYBILL("waybill", "运单"),
|
||||
/**
|
||||
* 基地
|
||||
*/
|
||||
WAREHOUSE("warehouse", "基地"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联类型枚举
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum RelateType {
|
||||
/**
|
||||
* 文件任务
|
||||
*/
|
||||
FILE_TASK("file_task", "文件任务"),
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
ATTACHMENT("attachment", "附件"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态枚举
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum Status {
|
||||
/**
|
||||
* 正在上传
|
||||
*/
|
||||
UPLOADING("uploading", "正在上传"),
|
||||
/**
|
||||
* 上传完成
|
||||
*/
|
||||
UPLOADED("uploaded", "上传完成"),
|
||||
/**
|
||||
* 正在解压
|
||||
*/
|
||||
UNZIPPING("unzipping", "正在解压"),
|
||||
/**
|
||||
* 解压失败
|
||||
*/
|
||||
UNZIP_FAIL("unzip_fail", "解压失败"),
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
FINISHED("finished", "已完成"),
|
||||
;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 附件详情对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "附件详情对象")
|
||||
public class AttachmentDetailVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* objectKey
|
||||
*/
|
||||
@Schema(description = "华为OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private long size;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Schema(description = "创建人")
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@Schema(description = "更新人")
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Schema(description = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 下载链接
|
||||
*/
|
||||
@Schema(description = "下载链接")
|
||||
private String url;
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务附件信息表 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2024-09-04
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务附件响应参数")
|
||||
public class BusinessAttachmentVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@Schema(description = "业务id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long bizId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 业务code名称
|
||||
*/
|
||||
@Schema(description = "业务code名称")
|
||||
private String bizCodeStr;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@Schema(description = "附件id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long attachmentId;
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private long size;
|
||||
/**
|
||||
* objectKey
|
||||
*/
|
||||
@Schema(description = "华为OBS objectKey")
|
||||
private String objectKey;
|
||||
/**
|
||||
* 附件描述
|
||||
*/
|
||||
@Schema(description = "附件描述")
|
||||
@Size(max = 100, message = "附件描述长度不能超过100")
|
||||
private String desc;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 上传人id
|
||||
*/
|
||||
@Schema(description = "上传人id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uploadUserId;
|
||||
/**
|
||||
* 上传人姓名
|
||||
*/
|
||||
@Schema(description = "上传人姓名")
|
||||
private String uploadUserName;
|
||||
/**
|
||||
* 上传人姓名
|
||||
*/
|
||||
@Schema(description = "上传人姓名")
|
||||
private String createUserName;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_TIME_MINI)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务解压任务明细对象
|
||||
* @author bfhuange
|
||||
* @date 2024/11/08
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务明细对象")
|
||||
public class BusinessUnzipDetailListVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@Schema(description = "附件id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long attachmentId;
|
||||
|
||||
//==========================附件属性=============================
|
||||
/**
|
||||
* 压缩文件所在压缩包相对路径
|
||||
*/
|
||||
@Schema(description = "压缩文件所在压缩包相对路径")
|
||||
private String dir;
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private long size;
|
||||
/**
|
||||
* objectKey
|
||||
*/
|
||||
@Schema(description = "华为OBS objectKey")
|
||||
private String objectKey;
|
||||
/**
|
||||
* 附件描述
|
||||
*/
|
||||
@Schema(description = "附件描述")
|
||||
@Size(max = 100, message = "附件描述长度不能超过100")
|
||||
private String desc;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 上传人id
|
||||
*/
|
||||
@Schema(description = "上传人id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uploadUserId;
|
||||
/**
|
||||
* 上传人姓名
|
||||
*/
|
||||
@Schema(description = "上传人姓名")
|
||||
private String uploadUserName;
|
||||
/**
|
||||
* 上传人姓名
|
||||
*/
|
||||
@Schema(description = "上传人姓名")
|
||||
private String createUserName;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_TIME_MINI)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务解压任务分页对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "业务解压任务分页对象")
|
||||
public class BusinessUnzipTaskListVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "业务id")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 业务code
|
||||
*/
|
||||
@Schema(description = "业务code")
|
||||
private String bizCode;
|
||||
/**
|
||||
* 文档编号
|
||||
*/
|
||||
@Schema(description = "文档编号")
|
||||
private String docCode;
|
||||
/**
|
||||
* 关联类型,file_task 文件任务,attachment 附件
|
||||
*/
|
||||
@Schema(description = "关联类型,file_task 文件任务,attachment 附件")
|
||||
private String relateType;
|
||||
/**
|
||||
* 关联id,文件任务id或附件id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "关联id,文件任务id或附件id")
|
||||
private Long relateId;
|
||||
|
||||
//==========================文件任务属性=============================
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* OBS objectKey
|
||||
*/
|
||||
@Schema(description = "OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
@Schema(description = "文件类型")
|
||||
private String suffix;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* 分段大小
|
||||
*/
|
||||
@Schema(description = "分段大小")
|
||||
private Integer chunkSize;
|
||||
|
||||
/**
|
||||
* 分段数量
|
||||
*/
|
||||
@Schema(description = "分段数量")
|
||||
private Integer chunkTotal;
|
||||
|
||||
/**
|
||||
* 当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1
|
||||
*/
|
||||
@Schema(description = "当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1")
|
||||
private Integer currentIndex;
|
||||
|
||||
/**
|
||||
* 华为云初始化上传任务生成的uploadId
|
||||
*/
|
||||
@Schema(description = "华为云初始化上传任务生成的uploadId")
|
||||
private String uploadId;
|
||||
|
||||
/**
|
||||
* 状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停
|
||||
*/
|
||||
@Schema(description = "状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 状态名称
|
||||
*/
|
||||
@Schema(description = "状态名称")
|
||||
private String statusStr;
|
||||
|
||||
/**
|
||||
* 创建人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件处理结果对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/30
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "文件处理结果对象")
|
||||
public class FileHandleVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 下载的压缩文件
|
||||
*/
|
||||
@Schema(description = "下载的压缩文件")
|
||||
private File downloadFile;
|
||||
/**
|
||||
* 解压目录
|
||||
*/
|
||||
@Schema(description = "解压目录")
|
||||
private File unzippedDir;
|
||||
/**
|
||||
* 解压后的文件列表
|
||||
*/
|
||||
@Schema(description = "解压后的文件列表")
|
||||
private List<File> unzippedFiles;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 文件任务更新结果
|
||||
* @author bfhuange
|
||||
* @date 2024/10/28
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(description = "文件任务更新结果")
|
||||
public class FileTaskUpdateVO extends FileTaskVO {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 文档编号(凭证批次号),如果有则返回,没有为空
|
||||
*/
|
||||
@Schema(description = "文档编号(凭证批次号),如果有则返回,没有为空")
|
||||
private String docCode;
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文件任务对象
|
||||
* @author bfhuange
|
||||
* @date 2024/10/22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "文件任务对象")
|
||||
public class FileTaskVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* OBS objectKey
|
||||
*/
|
||||
@Schema(description = "OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@Schema(description = "附件名")
|
||||
private String attachmentName;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
@Schema(description = "文件类型")
|
||||
private String suffix;
|
||||
|
||||
/**
|
||||
* 附件大小(单位:B)
|
||||
*/
|
||||
@Schema(description = "附件大小(单位:B)")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* 分段大小
|
||||
*/
|
||||
@Schema(description = "分段大小")
|
||||
private Integer chunkSize;
|
||||
|
||||
/**
|
||||
* 分段数量
|
||||
*/
|
||||
@Schema(description = "分段数量")
|
||||
private Integer chunkTotal;
|
||||
|
||||
/**
|
||||
* 当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1
|
||||
*/
|
||||
@Schema(description = "当前分段的位置(已上传完成的分段),从0开始,上传完第1段,为1")
|
||||
private Integer currentIndex;
|
||||
|
||||
/**
|
||||
* 华为云初始化上传任务生成的uploadId
|
||||
*/
|
||||
@Schema(description = "华为云初始化上传任务生成的uploadId")
|
||||
private String uploadId;
|
||||
|
||||
/**
|
||||
* 状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停
|
||||
*/
|
||||
@Schema(description = "状态 uploading:正在上传 completed:上传完成 failed:上传失败 paused:已暂停")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人")
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人-用户名称
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "创建人-用户名称")
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "更新人")
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件下载地址对象
|
||||
* @author bfhuange
|
||||
* @since 2025/4/22
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "文件下载地址对象")
|
||||
public class FileUrlVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
/**
|
||||
* 文件下载地址
|
||||
*/
|
||||
@Schema(description ="文件下载地址")
|
||||
private String url;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件对象
|
||||
* @author bfhuange
|
||||
* @date 2024/11/19
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "文件对象")
|
||||
public class FileVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* OBS objectKey
|
||||
*/
|
||||
@Schema(description = "OBS objectKey")
|
||||
private String objectKey;
|
||||
|
||||
/**
|
||||
* Md5
|
||||
*/
|
||||
@Schema(description = "Md5")
|
||||
private String md5;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 待合并的段
|
||||
* @author bfhuange
|
||||
* @date 2024/10/21
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class PartEtagVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 段的ETag值。分段的Base64编码的128位MD5摘要,长度为32的字符串
|
||||
*/
|
||||
private String etag;
|
||||
/**
|
||||
* 段号。分段号可以是不连续的。取值范围是[1,10000]的非负整数
|
||||
*/
|
||||
private Integer partNumber;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springblade.file.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件下载地址对象
|
||||
* @author bfhuange
|
||||
* @since 2025/4/22
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Schema(description = "临时文件下载地址对象")
|
||||
public class TempFileUrlVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* obs key
|
||||
*/
|
||||
@Schema(description = "obs key")
|
||||
private String objectKey;
|
||||
/**
|
||||
* 文件下载地址
|
||||
*/
|
||||
@Schema(description ="文件下载地址")
|
||||
private String url;
|
||||
}
|
||||
Reference in New Issue
Block a user