|
@@ -610,9 +610,13 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|
|
* @param filename
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String getFileStaticPath(String filename) {
|
|
|
+ public static String getFileStaticPath(String filename, String platform) {
|
|
|
filename = filename.replaceAll("\\\\", "/");
|
|
|
-// return filename.replace("/home/onemapfile/", "/file/statics/");
|
|
|
+ if ("windows".equals(platform)) {
|
|
|
+ return filename.replace("D:/onemapfile/", "/file/statics/");
|
|
|
+ } else if ("linux".equals(platform)) {
|
|
|
+ return filename.replace("/home/onemapfile/", "/file/statics/");
|
|
|
+ }
|
|
|
return filename.replace("D:/onemapfile/", "/file/statics/");
|
|
|
}
|
|
|
|
|
@@ -622,9 +626,13 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|
|
* @param filename
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String getFileAbsolutePath(String filename) {
|
|
|
+ public static String getFileAbsolutePath(String filename, String platform) {
|
|
|
filename = filename.replaceAll("\\\\", "/");
|
|
|
-// return filename.replace("/file/statics/", "/home/onemapfile/");
|
|
|
+ if ("windows".equals(platform)) {
|
|
|
+ return filename.replace("/file/statics/", "D:\\onemapfile\\");
|
|
|
+ } else if ("linux".equals(platform)) {
|
|
|
+ return filename.replace("/file/statics/", "/home/onemapfile/");
|
|
|
+ }
|
|
|
return filename.replace("/file/statics/", "D:\\onemapfile\\");
|
|
|
}
|
|
|
|
|
@@ -653,6 +661,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|
|
|
|
|
/**
|
|
|
* 获取纯英文字符串
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
public static String getStrUUID(Integer num) {
|