dji-sdk / DJI-Cloud-API-Demo

MIT License
112 stars 84 forks source link

demo中航线上传为啥读取templateId字段,赋值给数据库中的templateTypes? #20

Closed Noah1991 closed 1 year ago

Noah1991 commented 1 year ago

com.dji.sample.wayline.service.impl.WaylineFileServiceImpl

Optional validKmzFile(MultipartFile file)函数

return Optional.of(WaylineFileDTO.builder() .droneModelKey(String.format("%s-%s-%s", DeviceDomainEnum.SUB_DEVICE.getVal(), type, subType)) .payloadModelKeys(List.of(String.format("%s-%s-%s",DeviceDomainEnum.PAYLOAD.getVal(), payloadType, payloadSubType))) .objectKey(OssConfiguration.objectDirPrefix + File.separator + filename) .name(filename.substring(0, filename.lastIndexOf(WAYLINE_FILE_SUFFIX))) .sign(DigestUtils.md5DigestAsHex(file.getInputStream())) .templateTypes(List.of(Integer.parseInt(templateId))) .build());

这里为什么读取templateId字段,赋值给templateTypes,这个templateTypes是什么含义?航线文件中有templateType这个字段,这之间有什么联系吗?

DJIsean commented 1 year ago

https://github.com/dji-sdk/DJI-Cloud-API-Demo/commit/694b9483c7a551626244cbc222c602ea9ff74094 已修复