期刊图片保存至music路径下

main
JH 10 months ago
parent 864cce7960
commit abffc680cc

@ -94,7 +94,7 @@ public class CMSJournalService {
response.setId(item.getId());
response.setJournalNo(item.getJournalNo());
response.setTitle(item.getTitle());
response.setImage(Constants.IMAGE_RESOURCE_PREFIX + item.getImage());
response.setImage(Constants.MUSIC_RESOURCE_PREFIX + item.getImage());
response.setCreateTime(item.getCreateTime().format(Constants.formatter));
response.setState(item.getState());
response.setIsPublish(item.getIsPublish());
@ -232,7 +232,7 @@ public class CMSJournalService {
String image = param.getImage();
String suffix = image.substring(image.lastIndexOf(Constants.DOT));
String destKeySuffix = String.format("%05d/00%s", Integer.parseInt(param.getJournalNo()), suffix);
String destKey = Constants.IMAGE_KEY_PREFIX + destKeySuffix;
String destKey = Constants.MUSIC_RESOURCE_PREFIX + destKeySuffix;
int copy = s3Service.copy(Constants.BUCKET, srcKey, destKey);
if (copy > 0) {
return destKeySuffix;
@ -374,7 +374,7 @@ public class CMSJournalService {
srcKey = param.getImage().substring(param.getImage().indexOf(Constants.TEMP_KEY_PREFIX));
} else {
if (!oldJournal.getJournalNo().equals(param.getJournalNo())) {
srcKey = param.getImage().substring(param.getImage().indexOf(Constants.IMAGE_KEY_PREFIX));
srcKey = param.getImage().substring(param.getImage().indexOf(Constants.MUSIC_KEY_PREFIX));
}
}
if (StringUtils.isNotBlank(srcKey)) {

Loading…
Cancel
Save