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