镜像字段新增
parent
69131ae7c3
commit
d733a23096
|
@ -82,8 +82,11 @@ public class FileChunkController {
|
|||
@ApiImplicitParam(name = "file_id", value = "文件唯一标识符", required = true, dataType = "String", paramType = "query"),
|
||||
@ApiImplicitParam(name = "shard_index", value = "当前分片编号(从1开始)", required = true, dataType = "int", paramType = "query"),
|
||||
@ApiImplicitParam(name = "shard_total", value = "总分片数", required = true, dataType = "int", paramType = "query"),
|
||||
@ApiImplicitParam(name = "file_name", value = "原始文件名", required = true, dataType = "String", paramType = "query"),
|
||||
@ApiImplicitParam(name = "file_size", value = "文件总大小", required = true, dataType = "long", paramType = "query")
|
||||
@ApiImplicitParam(name = "file_name", value = "镜像原始文件名", required = true, dataType = "String", paramType = "query"),
|
||||
@ApiImplicitParam(name = "file_size", value = "文件总大小", required = true, dataType = "long", paramType = "query"),
|
||||
@ApiImplicitParam(name = "image_name", value = "镜像名称", required = true, dataType = "String", paramType = "query"),
|
||||
@ApiImplicitParam(name = "image_version", value = "镜像版本", required = true, dataType = "String", paramType = "query"),
|
||||
@ApiImplicitParam(name = "os_version", value = "操作系统", required = true, dataType = "String", paramType = "query")
|
||||
})
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "上传成功"),
|
||||
|
@ -97,8 +100,11 @@ public class FileChunkController {
|
|||
@RequestParam("shard_index") int chunkNumber,
|
||||
@RequestParam("shard_total") int totalChunks,
|
||||
@RequestParam("file_name") String fileName,
|
||||
@RequestParam("file_size") long totalSize) {
|
||||
|
||||
@RequestParam("image_name") String imageName,
|
||||
@RequestParam("file_size") long totalSize,
|
||||
@RequestParam("image_version") String imageVersion,
|
||||
@RequestParam("os_version") String osVersion
|
||||
) {
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
|
||||
try {
|
||||
|
@ -151,7 +157,10 @@ public class FileChunkController {
|
|||
fileUploadMap.remove(fileId);
|
||||
|
||||
Image image = new Image();
|
||||
image.setImageName(fileName);
|
||||
image.setImageName(imageName);
|
||||
image.setImageFileName(fileName);
|
||||
image.setImageVersion(imageVersion);
|
||||
image.setOsVersion(osVersion);
|
||||
image.setStoragePath(String.valueOf(finalFilePath));
|
||||
image.setImageStatus(1);
|
||||
int insert = imageMapper.insert(image);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.unisinsight.project.entity.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -12,77 +14,97 @@ import java.util.Date;
|
|||
*/
|
||||
@TableName(value ="image")
|
||||
@Data
|
||||
@ApiModel("镜像相关信息")
|
||||
public class Image implements Serializable {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 镜像名
|
||||
*/
|
||||
@TableField(value = "image_name")
|
||||
@ApiModelProperty("镜像名称")
|
||||
private String imageName;
|
||||
|
||||
/**
|
||||
* 镜像源文件名称
|
||||
*/
|
||||
@TableField(value = "image_file_name")
|
||||
@ApiModelProperty("镜像源文件名称")
|
||||
private String imageFileName;
|
||||
|
||||
/**
|
||||
* 镜像类型:1:VHD 2:VHDX 3:QCOW2
|
||||
*/
|
||||
@TableField(value = "image_type")
|
||||
@ApiModelProperty("镜像类型:1:VHD 2:VHDX 3:QCOW2")
|
||||
private Integer imageType;
|
||||
|
||||
/**
|
||||
* 镜像状态: 1-成功,2-失败,3-做种中
|
||||
*/
|
||||
@TableField(value = "image_status")
|
||||
@ApiModelProperty("镜像状态: 1-成功,2-失败,3-做种中")
|
||||
private Integer imageStatus;
|
||||
|
||||
/**
|
||||
* 镜像版本
|
||||
*/
|
||||
@TableField(value = "image_version")
|
||||
@ApiModelProperty("镜像版本")
|
||||
private String imageVersion;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
@TableField(value = "os_version")
|
||||
@ApiModelProperty("操作系统")
|
||||
private String osVersion;
|
||||
|
||||
/**
|
||||
* BT路径
|
||||
*/
|
||||
@TableField(value = "bt_path")
|
||||
@ApiModelProperty("BT路径")
|
||||
private String btPath;
|
||||
|
||||
/**
|
||||
* 镜像存储路径
|
||||
*/
|
||||
@TableField(value = "storage_path")
|
||||
@ApiModelProperty("镜像存储路径")
|
||||
private String storagePath;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_user")
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "update_user")
|
||||
@ApiModelProperty("更新人")
|
||||
private String updateUser;
|
||||
|
||||
/**
|
||||
|
@ -90,12 +112,14 @@ public class Image implements Serializable {
|
|||
*/
|
||||
@TableLogic
|
||||
@TableField(value = "deleted")
|
||||
@ApiModelProperty("是否删除:0-否,1-删除")
|
||||
private Integer deleted;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField(value = "description")
|
||||
@ApiModelProperty("描述")
|
||||
private String description;
|
||||
|
||||
@TableField(exist = false)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.unisinsight.project.entity.res;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
@ -26,10 +27,17 @@ public class ImageRes implements Serializable {
|
|||
/**
|
||||
* 镜像名
|
||||
*/
|
||||
@ApiModelProperty("镜像名")
|
||||
@ApiModelProperty("镜像名称")
|
||||
@JsonProperty("image_name")
|
||||
private String imageName;
|
||||
|
||||
/**
|
||||
* 镜像源文件名称
|
||||
*/
|
||||
@JsonProperty(value = "image_file_name")
|
||||
@ApiModelProperty("镜像源文件名称")
|
||||
private String imageFileName;
|
||||
|
||||
/**
|
||||
* 镜像类型
|
||||
*/
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<resultMap id="BaseResultMap" type="com.unisinsight.project.entity.dao.Image">
|
||||
<id property="id" column="id" />
|
||||
<result property="imageName" column="image_name" />
|
||||
<result property="imageFileName" column="image_file_name" />
|
||||
<result property="imageType" column="image_type" />
|
||||
<result property="imageStatus" column="image_status" />
|
||||
<result property="imageVersion" column="image_version" />
|
||||
|
@ -22,7 +23,7 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,image_name,image_type,image_status,image_version,os_version,
|
||||
id,image_name,image_file_name,image_type,image_status,image_version,os_version,
|
||||
bt_path,storage_path,create_time,create_user,update_time,
|
||||
update_user,deleted,description
|
||||
</sql>
|
||||
|
|
Loading…
Reference in New Issue