短信通用版本修改中:对于文件路径的判断和文件绝对路径判断的修改

streaming
liuguijing 4 months ago
parent 6915001d02
commit becda30777

@ -912,11 +912,24 @@ public class SimUtil {
filePath = value;
}
}
if (StringUtils.isNotEmpty(fileStr)) {
if (StringUtils.isEmpty(filePath)) {
HashMap<String, String> hashMap = ValueTypeUtil.checkFilePathAndName(context, fileType);
filePath = hashMap.get(UpdateSysConfigUtil.FILEPATH);
fileName = hashMap.get(UpdateSysConfigUtil.FILENAME);
if (StringUtils.isEmpty(filePath) || StringUtils.isEmpty(fileName)) {
ifmessageCorrect = false;
} else {
filePath += fileName;
}
}
if (StringUtils.isNotEmpty(filePath)) {
byte[] decode = Base64.decode(fileStr, Base64.NO_WRAP);
FilesUtils.writeFile(filePath + fileName, decode);
FilesUtils.writeFile(filePath, decode);
}
} else {
ifmessageCorrect = false;
}
}
} catch (Exception ex) {
ex.printStackTrace();

Loading…
Cancel
Save