fix: ota上传回显
parent
da5d8ef4dc
commit
70a6d9b058
|
@ -1,7 +1,6 @@
|
||||||
package cc.iotkit.manager.dto.vo.ota;
|
package cc.iotkit.manager.dto.vo.ota;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
@ -15,9 +14,10 @@ import java.io.Serializable;
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
@ApiModel(value = "OtaPackageUploadVo")
|
@ApiModel(value = "OtaPackageUploadVo")
|
||||||
@AutoMapper(target = OtaPackageUploadVo.class)
|
|
||||||
public class OtaPackageUploadVo implements Serializable {
|
public class OtaPackageUploadVo implements Serializable {
|
||||||
private String url;
|
private String url;
|
||||||
private Long size;
|
private Long size;
|
||||||
private String md5;
|
private String md5;
|
||||||
|
private Long ossId;
|
||||||
|
private String originalName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,13 +65,15 @@ public class OtaService {
|
||||||
oss.setFileName(uploadResult.getFilename());
|
oss.setFileName(uploadResult.getFilename());
|
||||||
oss.setOriginalName(originalFileName);
|
oss.setOriginalName(originalFileName);
|
||||||
oss.setService(storage.getConfigKey());
|
oss.setService(storage.getConfigKey());
|
||||||
sysOssData.save(oss);
|
oss = sysOssData.save(oss);
|
||||||
|
|
||||||
String md5 = md5OfFile(file);
|
String md5 = md5OfFile(file);
|
||||||
OtaPackageUploadVo otaPackageUploadVo = new OtaPackageUploadVo();
|
OtaPackageUploadVo otaPackageUploadVo = new OtaPackageUploadVo();
|
||||||
otaPackageUploadVo.setUrl(uploadResult.getUrl());
|
otaPackageUploadVo.setUrl(uploadResult.getUrl());
|
||||||
otaPackageUploadVo.setSize(file.getSize());
|
otaPackageUploadVo.setSize(file.getSize());
|
||||||
otaPackageUploadVo.setMd5(md5);
|
otaPackageUploadVo.setMd5(md5);
|
||||||
|
otaPackageUploadVo.setOriginalName(originalFileName);
|
||||||
|
otaPackageUploadVo.setOssId(oss.getId());
|
||||||
return otaPackageUploadVo;
|
return otaPackageUploadVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue