Commit ab1d5b4ae719e16660283cedd4c754653024281a
1 parent
faacc44d
2022年10月1日19:30:38 修改主题文件夹名称保存方式
Showing
3 changed files
with
5 additions
and
6 deletions
fw-dalaran-server/src/main/java/cn/fw/dalaran/server/task/OtherTask.java
@@ -48,9 +48,8 @@ public class OtherTask { | @@ -48,9 +48,8 @@ public class OtherTask { | ||
48 | sb.append("activityTheme"); | 48 | sb.append("activityTheme"); |
49 | sb.append(File.separator); | 49 | sb.append(File.separator); |
50 | sb.append(item.getId()); | 50 | sb.append(item.getId()); |
51 | - sb.append("「"); | 51 | + sb.append("#"); |
52 | sb.append(item.getTheme()); | 52 | sb.append(item.getTheme()); |
53 | - sb.append("」"); | ||
54 | String dirPath = sb.toString(); | 53 | String dirPath = sb.toString(); |
55 | File file = new File(dirPath); | 54 | File file = new File(dirPath); |
56 | if (file.isDirectory()) | 55 | if (file.isDirectory()) |
fw-dalaran-service/src/main/java/cn/fw/dalaran/service/biz/CommonBizService.java
@@ -981,7 +981,7 @@ public class CommonBizService { | @@ -981,7 +981,7 @@ public class CommonBizService { | ||
981 | imageFile2 = ImageUtils.convertFileByUrl(coverUrl, itemId); | 981 | imageFile2 = ImageUtils.convertFileByUrl(coverUrl, itemId); |
982 | String tempDir = common.getActivityThemeCoverDir(); | 982 | String tempDir = common.getActivityThemeCoverDir(); |
983 | File file = new File(ImageUtils.modifyResolution1(imageFile2.getPath(), | 983 | File file = new File(ImageUtils.modifyResolution1(imageFile2.getPath(), |
984 | - tempDir + "activityTheme" + File.separator + themeId + "「" + theme + "」" + File.separator + account + File.separator + (Objects.equals(type, 1) ? "video" : "live"), | 984 | + tempDir + "activityTheme" + File.separator + themeId + "#" + theme + File.separator + account + File.separator + (Objects.equals(type, 1) ? "video" : "live"), |
985 | "fw_theme_cover_" + itemId, | 985 | "fw_theme_cover_" + itemId, |
986 | 512, 512)); | 986 | 512, 512)); |
987 | if (imageFile2.delete()) { | 987 | if (imageFile2.delete()) { |
@@ -1004,7 +1004,7 @@ public class CommonBizService { | @@ -1004,7 +1004,7 @@ public class CommonBizService { | ||
1004 | */ | 1004 | */ |
1005 | private File findLocalCacheImageUser(String theme, Long themeId, String account, String itemId, Integer type) { | 1005 | private File findLocalCacheImageUser(String theme, Long themeId, String account, String itemId, Integer type) { |
1006 | String tempDir = common.getActivityThemeCoverDir(); | 1006 | String tempDir = common.getActivityThemeCoverDir(); |
1007 | - File file = new File(tempDir + File.separator + "activityTheme" + File.separator + themeId + "「" + theme + "」" + File.separator + account + File.separator + (Objects.equals(type, 1) ? "video" : "live")); | 1007 | + File file = new File(tempDir + File.separator + "activityTheme" + File.separator + themeId + "#" + theme + File.separator + account + File.separator + (Objects.equals(type, 1) ? "video" : "live")); |
1008 | if (!file.exists()) { | 1008 | if (!file.exists()) { |
1009 | boolean mkdirs = file.mkdirs(); | 1009 | boolean mkdirs = file.mkdirs(); |
1010 | if (mkdirs) | 1010 | if (mkdirs) |
@@ -1029,7 +1029,7 @@ public class CommonBizService { | @@ -1029,7 +1029,7 @@ public class CommonBizService { | ||
1029 | */ | 1029 | */ |
1030 | private File findLocalCacheImageTheme(String theme, Long themeId, String fileId) { | 1030 | private File findLocalCacheImageTheme(String theme, Long themeId, String fileId) { |
1031 | String tempDir = common.getActivityThemeCoverDir(); | 1031 | String tempDir = common.getActivityThemeCoverDir(); |
1032 | - File file = new File(tempDir + "activityTheme" + File.separator + themeId + "「" + theme + "」" + File.separator + "settingCover"); | 1032 | + File file = new File(tempDir + "activityTheme" + File.separator + themeId + "#" + theme + File.separator + "settingCover"); |
1033 | if (!file.exists()) { | 1033 | if (!file.exists()) { |
1034 | boolean mkdirs = file.mkdirs(); | 1034 | boolean mkdirs = file.mkdirs(); |
1035 | if (mkdirs) | 1035 | if (mkdirs) |
fw-dalaran-service/src/main/java/cn/fw/dalaran/service/data/impl/ActivityThemeServiceImpl.java
@@ -365,7 +365,7 @@ public class ActivityThemeServiceImpl extends ServiceImpl<ActivityThemeDao, Acti | @@ -365,7 +365,7 @@ public class ActivityThemeServiceImpl extends ServiceImpl<ActivityThemeDao, Acti | ||
365 | String fileId = item.getFid(); | 365 | String fileId = item.getFid(); |
366 | File downloadFile = ImageUtils.convertFileByUrl(serverAddr + fileId, fileId); | 366 | File downloadFile = ImageUtils.convertFileByUrl(serverAddr + fileId, fileId); |
367 | ImageUtils.modifyResolution1(downloadFile.getPath(), | 367 | ImageUtils.modifyResolution1(downloadFile.getPath(), |
368 | - tempDir + "activityTheme" + File.separator + activityTheme.getId() + "「" + activityTheme.getTheme() + "」" + File.separator + "settingCover", | 368 | + tempDir + "activityTheme" + File.separator + activityTheme.getId() + "#" + activityTheme.getTheme() + File.separator + "settingCover", |
369 | "fw_theme_cover_" + fileId, | 369 | "fw_theme_cover_" + fileId, |
370 | 512, 512); | 370 | 512, 512); |
371 | boolean result = downloadFile.delete(); | 371 | boolean result = downloadFile.delete(); |