|
@@ -130,6 +130,41 @@ public class FileUtils {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static String getSysLocalFileUrl() {
|
|
|
+ String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
|
|
|
+
|
|
|
+ if (sys_isonline.equals("1")) { //正式环境
|
|
|
+ if (SystemUtils.isMacOs()) {
|
|
|
+ file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isWindows()) {
|
|
|
+ file_path = "C://upload//";
|
|
|
+ }
|
|
|
+ } else if (sys_isonline.equals("2")) { //109测试环境
|
|
|
+ if (SystemUtils.isMacOs()) {
|
|
|
+ file_path = "/www/wwwroot/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isWindows()) {
|
|
|
+ file_path = "C://upload//";
|
|
|
+ }
|
|
|
+ } else if (sys_isonline.equals("20")) { //183
|
|
|
+ if (SystemUtils.isLinux()) {
|
|
|
+ file_path = "/home/www/wwwroot/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isMacOs()) {
|
|
|
+ file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isWindows()) {
|
|
|
+ file_path = "C://upload//";
|
|
|
+ }
|
|
|
+ } else { //本地环境
|
|
|
+ if (SystemUtils.isMacOs()) {
|
|
|
+ file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isWindows()) {
|
|
|
+ file_path = "C://upload//";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return file_path;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 压缩图片
|
|
|
*/
|
|
@@ -773,15 +808,6 @@ public class FileUtils {
|
|
|
return ossPath;
|
|
|
}
|
|
|
|
|
|
- public static String getSysLocalFileUrl() {
|
|
|
- String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
- if (SystemUtils.isMacOs()) {
|
|
|
- file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
- } else if (SystemUtils.isWindows()) {
|
|
|
- file_path = "C://upload//";
|
|
|
- }
|
|
|
- return file_path;
|
|
|
- }
|
|
|
|
|
|
public static void main11(String[] args) {
|
|
|
/* SpeechRecognizerDemo demo = new SpeechRecognizerDemo(appKey, id, secret, url);
|