Commit 3f1ab603453d69a8e46f4d1f382ba78e7664e192

Authored by ljq
2 parents f3e9b931 6e0df3f6

Merge remote-tracking branch 'origin/lggj' into lggj

src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
@@ -1128,8 +1128,8 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ @@ -1128,8 +1128,8 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ
1128 1128
1129 // 文本转语音并进行分割 1129 // 文本转语音并进行分割
1130 // 音频存放及压缩文件路径 1130 // 音频存放及压缩文件路径
1131 - String linePath = String.format(linePathPattern, lineId), voicePath = String.format("%s%s.zip", linePath, lineId);  
1132 - // 先清理历史生成的文件 1131 + String linePath = String.format(linePathPattern, lineId);
  1132 + // 先清理历史生成的文件
1133 cleanHistoryAudio(new File(linePath)); 1133 cleanHistoryAudio(new File(linePath));
1134 for (String language : languages) { 1134 for (String language : languages) {
1135 try { 1135 try {
@@ -1159,7 +1159,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ @@ -1159,7 +1159,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ
1159 } 1159 }
1160 merge(lineId, "0", seq, seqs, languages); 1160 merge(lineId, "0", seq, seqs, languages);
1161 } 1161 }
1162 - //zipAudio(String.format("%s%s/", linePath, "0"), voicePath);  
1163 zipAudio(linePath, lineId, "0"); 1162 zipAudio(linePath, lineId, "0");
1164 1163
1165 // 线路区间 1164 // 线路区间
@@ -1204,7 +1203,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ @@ -1204,7 +1203,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ
1204 merge(lineId, subLineId, seq, map1, languages); 1203 merge(lineId, subLineId, seq, map1, languages);
1205 } 1204 }
1206 1205
1207 - //zipAudio(String.format("%s%s/", linePath, subLineId), String.format("%s%s-%s.zip", linePath, lineId, subLineId));  
1208 zipAudio(linePath, lineId, subLineId); 1206 zipAudio(linePath, lineId, subLineId);
1209 } 1207 }
1210 } 1208 }
@@ -1231,7 +1229,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ @@ -1231,7 +1229,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ
1231 private void zipAudio(String linePath, String lineId, String subLineId) throws Exception { 1229 private void zipAudio(String linePath, String lineId, String subLineId) throws Exception {
1232 String s = "0".equals(subLineId) ? "" : String.format("-%s", subLineId); 1230 String s = "0".equals(subLineId) ? "" : String.format("-%s", subLineId);
1233 String subLinePath = String.format("%s%s/", linePath, subLineId), voicePath = String.format("%s%s%s.zip", linePath, lineId, s); 1231 String subLinePath = String.format("%s%s/", linePath, subLineId), voicePath = String.format("%s%s%s.zip", linePath, lineId, s);
1234 - String pack = String.format("%s%s\\", lineId, s); 1232 + String pack = String.format("%s%s/", lineId, s);
1235 File file = new File(subLinePath); 1233 File file = new File(subLinePath);
1236 ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(voicePath)); 1234 ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(voicePath));
1237 ZipEntry zipEntry = new ZipEntry(pack); 1235 ZipEntry zipEntry = new ZipEntry(pack);