feat:修改OTA升级

V0.5.x
荭琪枫 2023-06-27 23:04:34 +08:00
parent e5ba3865ab
commit 1bd2a9ac9d
2 changed files with 5 additions and 7 deletions

View File

@ -3,7 +3,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.Builder;
import lombok.Data;
import java.io.Serializable;
@ -14,7 +13,6 @@ import java.io.Serializable;
* @Description:
*/
@Data
@Builder
@ExcelIgnoreUnannotated
@ApiModel(value = "OtaPackageUploadVo")
@AutoMapper(target = OtaPackageUploadVo.class)

View File

@ -59,11 +59,11 @@ public class OtaService {
ossTemplate.putObject(buckName, objectName, inputStream);
String url = "https://" + region + "/" + objectName;
String md5 = md5OfFile(file);
return OtaPackageUploadVo.builder()
.url(url)
.size(size)
.md5(md5)
.build();
OtaPackageUploadVo otaPackageUploadVo = new OtaPackageUploadVo();
otaPackageUploadVo.setUrl(url);
otaPackageUploadVo.setSize(size);
otaPackageUploadVo.setMd5(md5);
return otaPackageUploadVo;
}
public static String md5OfFile(MultipartFile multipartFile) throws Exception {