feat:修改OTA升级
parent
e5ba3865ab
commit
1bd2a9ac9d
|
@ -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)
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue