修改sdk

This commit is contained in:
ajaxfan
2021-04-09 09:11:53 +08:00
parent 1a6ad756c6
commit 36855664a2
2 changed files with 23 additions and 0 deletions

View File

@ -78,6 +78,26 @@ public class ModelConvertor {
});
}
/**
* @param json
* @return
*/
public Optional<byte[]> toByteArray(String json) {
return Optional.ofNullable(json).map(content -> {
try {
Optional<SysStorageVO> op = tpDownPO(content);
if (op.isPresent()) {
return op.get().getFileStream();
}
} catch (JsonProcessingException e) {
log.error(json);
log.error(e.getMessage());
}
return null;
});
}
/**
* @param json
* @return

View File

@ -14,6 +14,9 @@ public class SysStorageVO {
/* 业务id */
private String objectId;
/* 文件流 */
private byte[] fileStream;
/* 文件唯一标识 */
private String fileName;