Compare commits
No commits in common. "387b2866b6ef999abc7f736c3da1571745f78bda" and "ac0e8094d31ad89314f38ccfa7e2042307cc9b0c" have entirely different histories.
387b2866b6
...
ac0e8094d3
|
|
@ -120,10 +120,6 @@ public class DirectiveAsyncMQDto implements Serializable {
|
||||||
* 即时指令图标
|
* 即时指令图标
|
||||||
*/
|
*/
|
||||||
private String immediateFile;
|
private String immediateFile;
|
||||||
/**
|
|
||||||
* 即时指令焦点图标
|
|
||||||
*/
|
|
||||||
private String immediateFileFocus;
|
|
||||||
/**
|
/**
|
||||||
* 指令音频文件md5
|
* 指令音频文件md5
|
||||||
*/
|
*/
|
||||||
|
|
@ -144,10 +140,7 @@ public class DirectiveAsyncMQDto implements Serializable {
|
||||||
* 即时指令图标md5
|
* 即时指令图标md5
|
||||||
*/
|
*/
|
||||||
private java.lang.String immediateFileMd5;
|
private java.lang.String immediateFileMd5;
|
||||||
/**
|
|
||||||
* 即时指令焦点图标md5
|
|
||||||
*/
|
|
||||||
private java.lang.String immediateFileFocusMd5;
|
|
||||||
|
|
||||||
//分类标签中文名称
|
//分类标签中文名称
|
||||||
private String instructionName;
|
private String instructionName;
|
||||||
|
|
|
||||||
|
|
@ -200,11 +200,6 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "即时指令图标")
|
@ApiModelProperty(value = "即时指令图标")
|
||||||
private java.lang.String immediateFile;
|
private java.lang.String immediateFile;
|
||||||
/**
|
|
||||||
* 即时指令焦点图标
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "即时指令图标")
|
|
||||||
private java.lang.String immediateFileFocus;
|
|
||||||
/**
|
/**
|
||||||
* 指令音频文件md5
|
* 指令音频文件md5
|
||||||
*/
|
*/
|
||||||
|
|
@ -236,20 +231,12 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "即时指令图标md5")
|
@ApiModelProperty(value = "即时指令图标md5")
|
||||||
private java.lang.String immediateFileMd5;
|
private java.lang.String immediateFileMd5;
|
||||||
/**
|
|
||||||
* 即时指令图标md5
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "即时指令图标md5")
|
|
||||||
private java.lang.String immediateFileFocusMd5;
|
|
||||||
|
|
||||||
//即时指令图标是否变更
|
//即时指令图标是否变更
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private boolean immediateFileChanged;
|
private boolean immediateFileChanged;
|
||||||
|
|
||||||
//即时指令焦点图标是否变更
|
|
||||||
@TableField(exist = false)
|
|
||||||
private boolean immediateFileFocusChanged;
|
|
||||||
|
|
||||||
//合并单元格用:类别合并的行数
|
//合并单元格用:类别合并的行数
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer categoryRowSpan;
|
private Integer categoryRowSpan;
|
||||||
|
|
|
||||||
|
|
@ -32,13 +32,11 @@
|
||||||
<result property="previewFile" column="preview_file"/>
|
<result property="previewFile" column="preview_file"/>
|
||||||
<result property="previewFileSmall" column="preview_file_small"/>
|
<result property="previewFileSmall" column="preview_file_small"/>
|
||||||
<result property="immediateFile" column="immediate_file"/>
|
<result property="immediateFile" column="immediate_file"/>
|
||||||
<result property="immediateFileFocus" column="immediate_file_focus"/>
|
|
||||||
<result property="mp3FileMd5" column="mp3_file_md5"/>
|
<result property="mp3FileMd5" column="mp3_file_md5"/>
|
||||||
<result property="mp4FileMd5" column="mp4_file_md5"/>
|
<result property="mp4FileMd5" column="mp4_file_md5"/>
|
||||||
<result property="previewFileMd5" column="preview_file_md5"/>
|
<result property="previewFileMd5" column="preview_file_md5"/>
|
||||||
<result property="previewFileSmallMd5" column="preview_file_small_md5"/>
|
<result property="previewFileSmallMd5" column="preview_file_small_md5"/>
|
||||||
<result property="immediateFileMd5" column="immediate_file_md5"/>
|
<result property="immediateFileMd5" column="immediate_file_md5"/>
|
||||||
<result property="immediateFileFocusMd5" column="immediate_file_focus_md5"/>
|
|
||||||
|
|
||||||
<collection property="bodyTagList" ofType="com.nu.modules.directivetag.body.entity.DirectiveBodyTag">
|
<collection property="bodyTagList" ofType="com.nu.modules.directivetag.body.entity.DirectiveBodyTag">
|
||||||
<id property="id" column="bodyTagId"/>
|
<id property="id" column="bodyTagId"/>
|
||||||
|
|
@ -81,13 +79,11 @@
|
||||||
c.preview_file,
|
c.preview_file,
|
||||||
c.preview_file_small,
|
c.preview_file_small,
|
||||||
c.immediate_file,
|
c.immediate_file,
|
||||||
c.immediate_file_focus,
|
|
||||||
c.mp3_file_md5,
|
c.mp3_file_md5,
|
||||||
c.mp4_file_md5,
|
c.mp4_file_md5,
|
||||||
c.preview_file_md5,
|
c.preview_file_md5,
|
||||||
c.preview_file_small_md5,
|
c.preview_file_small_md5,
|
||||||
c.immediate_file_md5,
|
c.immediate_file_md5,
|
||||||
c.immediate_file_focus_md5,
|
|
||||||
bodytag.id as bodyTagId,
|
bodytag.id as bodyTagId,
|
||||||
bodytag.tag_name as bodyTagName,
|
bodytag.tag_name as bodyTagName,
|
||||||
emotag.id as emotionTagId,
|
emotag.id as emotionTagId,
|
||||||
|
|
|
||||||
|
|
@ -287,8 +287,6 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
String previewFileSmall = configServiceDirective.getPreviewFileSmall();
|
String previewFileSmall = configServiceDirective.getPreviewFileSmall();
|
||||||
//即时指令图标
|
//即时指令图标
|
||||||
String immediateFile = configServiceDirective.getImmediateFile();
|
String immediateFile = configServiceDirective.getImmediateFile();
|
||||||
//即时指令焦点图标
|
|
||||||
String immediateFileFocus = configServiceDirective.getImmediateFileFocus();
|
|
||||||
//指令音频文件
|
//指令音频文件
|
||||||
String mp3File = configServiceDirective.getMp3File();
|
String mp3File = configServiceDirective.getMp3File();
|
||||||
//指令视频文件
|
//指令视频文件
|
||||||
|
|
@ -298,7 +296,6 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
Map<String, String> newPreviewFileMap = NuFileUtils.processFile(mediaFileSavePath, previewFile);
|
Map<String, String> newPreviewFileMap = NuFileUtils.processFile(mediaFileSavePath, previewFile);
|
||||||
Map<String, String> newPreviewFileSmallMap = NuFileUtils.processFile(mediaFileSavePath, previewFileSmall);
|
Map<String, String> newPreviewFileSmallMap = NuFileUtils.processFile(mediaFileSavePath, previewFileSmall);
|
||||||
Map<String, String> newImmediateFileMap = NuFileUtils.processFile(mediaFileSavePath, immediateFile);
|
Map<String, String> newImmediateFileMap = NuFileUtils.processFile(mediaFileSavePath, immediateFile);
|
||||||
Map<String, String> newImmediateFileFocusMap = NuFileUtils.processFile(mediaFileSavePath, immediateFileFocus);
|
|
||||||
Map<String, String> newMp3FileMap = NuFileUtils.processFile(mediaFileSavePath, mp3File);
|
Map<String, String> newMp3FileMap = NuFileUtils.processFile(mediaFileSavePath, mp3File);
|
||||||
Map<String, String> newMp4FileMap = NuFileUtils.processFile(mediaFileSavePath, mp4File);
|
Map<String, String> newMp4FileMap = NuFileUtils.processFile(mediaFileSavePath, mp4File);
|
||||||
|
|
||||||
|
|
@ -315,10 +312,6 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
configServiceDirective.setImmediateFile(newImmediateFileMap.get("path"));
|
configServiceDirective.setImmediateFile(newImmediateFileMap.get("path"));
|
||||||
configServiceDirective.setImmediateFileMd5(newImmediateFileMap.get("md5"));
|
configServiceDirective.setImmediateFileMd5(newImmediateFileMap.get("md5"));
|
||||||
}
|
}
|
||||||
if (newImmediateFileFocusMap != null) {
|
|
||||||
configServiceDirective.setImmediateFileFocus(newImmediateFileFocusMap.get("path"));
|
|
||||||
configServiceDirective.setImmediateFileFocusMd5(newImmediateFileFocusMap.get("md5"));
|
|
||||||
}
|
|
||||||
if (newMp3FileMap != null) {
|
if (newMp3FileMap != null) {
|
||||||
configServiceDirective.setMp3File(newMp3FileMap.get("path"));
|
configServiceDirective.setMp3File(newMp3FileMap.get("path"));
|
||||||
configServiceDirective.setMp3FileMd5(newMp3FileMap.get("md5"));
|
configServiceDirective.setMp3FileMd5(newMp3FileMap.get("md5"));
|
||||||
|
|
|
||||||
|
|
@ -218,32 +218,6 @@ public class DirectiveMQListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//处理即时指令焦点图标
|
|
||||||
if (StringUtils.isNotBlank(dto.getImmediateFileFocusMd5()) && !dto.getImmediateFileFocusMd5().equals(currentDirective.getImmediateFileFocusMd5())) {
|
|
||||||
String immediateFileFocus = dto.getImmediateFileFocus();
|
|
||||||
if (StringUtils.isNotBlank(immediateFileFocus)) {
|
|
||||||
String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(immediateFileFocus, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey();
|
|
||||||
if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) {
|
|
||||||
upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1);
|
|
||||||
}
|
|
||||||
String filePath = immediateFileFocus.substring(0, immediateFileFocus.lastIndexOf("/"));
|
|
||||||
String fileName = immediateFileFocus.substring(immediateFileFocus.lastIndexOf("/") + 1);
|
|
||||||
if (filePath.startsWith("/") || filePath.startsWith("\\")) {
|
|
||||||
filePath = filePath.substring(1);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName);
|
|
||||||
configServiceDirective.setImmediateFileFocus(dto.getImmediateFileFocus());//即时指令图标
|
|
||||||
configServiceDirective.setImmediateFileFocusMd5(dto.getImmediateFileFocusMd5());
|
|
||||||
} catch (Exception e) {
|
|
||||||
MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog();
|
|
||||||
mediaAsyncErrorLog.setMediaid(immediateFileFocus);
|
|
||||||
mediaAsyncErrorLogService.save(mediaAsyncErrorLog);
|
|
||||||
e.printStackTrace();
|
|
||||||
throw new RuntimeException("即时指令焦点图标文件拉取错误,指令id" + dto.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//处理指令音频文件
|
//处理指令音频文件
|
||||||
if (StringUtils.isNotBlank(dto.getMp3FileMd5()) && !dto.getMp3FileMd5().equals(currentDirective.getMp3FileMd5())) {
|
if (StringUtils.isNotBlank(dto.getMp3FileMd5()) && !dto.getMp3FileMd5().equals(currentDirective.getMp3FileMd5())) {
|
||||||
String mp3File = dto.getMp3File();
|
String mp3File = dto.getMp3File();
|
||||||
|
|
@ -599,14 +573,12 @@ public class DirectiveMQListener {
|
||||||
directive.setPreviewFile(null);
|
directive.setPreviewFile(null);
|
||||||
directive.setPreviewFileSmall(null);
|
directive.setPreviewFileSmall(null);
|
||||||
directive.setImmediateFile(null);
|
directive.setImmediateFile(null);
|
||||||
directive.setImmediateFileFocus(null);
|
|
||||||
directive.setMp3File(null);
|
directive.setMp3File(null);
|
||||||
directive.setMp4File(null);
|
directive.setMp4File(null);
|
||||||
directive.setServiceContent(null);
|
directive.setServiceContent(null);
|
||||||
directive.setPreviewFileMd5(null);
|
directive.setPreviewFileMd5(null);
|
||||||
directive.setPreviewFileSmallMd5(null);
|
directive.setPreviewFileSmallMd5(null);
|
||||||
directive.setImmediateFileMd5(null);
|
directive.setImmediateFileMd5(null);
|
||||||
directive.setImmediateFileFocusMd5(null);
|
|
||||||
directive.setMp3FileMd5(null);
|
directive.setMp3FileMd5(null);
|
||||||
directive.setMp4FileMd5(null);
|
directive.setMp4FileMd5(null);
|
||||||
needAddDirectiveList.add(directive);
|
needAddDirectiveList.add(directive);
|
||||||
|
|
@ -1012,32 +984,6 @@ public class DirectiveMQListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//处理即时指令焦点图标
|
|
||||||
if (StringUtils.isNotBlank(dto.getImmediateFileFocusMd5()) && !dto.getImmediateFileFocusMd5().equals(currentDirective.getImmediateFileFocusMd5())) {
|
|
||||||
String immediateFileFocus = dto.getImmediateFileFocus();
|
|
||||||
if (StringUtils.isNotBlank(immediateFileFocus)) {
|
|
||||||
String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(immediateFileFocus, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey();
|
|
||||||
if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) {
|
|
||||||
upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1);
|
|
||||||
}
|
|
||||||
String filePath = immediateFileFocus.substring(0, immediateFileFocus.lastIndexOf("/"));
|
|
||||||
String fileName = immediateFileFocus.substring(immediateFileFocus.lastIndexOf("/") + 1);
|
|
||||||
if (filePath.startsWith("/") || filePath.startsWith("\\")) {
|
|
||||||
filePath = filePath.substring(1);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName);
|
|
||||||
configServiceDirective.setImmediateFileFocus(dto.getImmediateFileFocus());//即时指令图标
|
|
||||||
configServiceDirective.setImmediateFileFocusMd5(dto.getImmediateFileFocusMd5());
|
|
||||||
} catch (Exception e) {
|
|
||||||
MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog();
|
|
||||||
mediaAsyncErrorLog.setMediaid(immediateFileFocus);
|
|
||||||
mediaAsyncErrorLogService.save(mediaAsyncErrorLog);
|
|
||||||
e.printStackTrace();
|
|
||||||
throw new RuntimeException("即时指令图标文件拉取错误,指令id" + dto.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//处理指令音频文件
|
//处理指令音频文件
|
||||||
if (StringUtils.isNotBlank(dto.getMp3FileMd5()) && !dto.getMp3FileMd5().equals(currentDirective.getMp3FileMd5())) {
|
if (StringUtils.isNotBlank(dto.getMp3FileMd5()) && !dto.getMp3FileMd5().equals(currentDirective.getMp3FileMd5())) {
|
||||||
String mp3File = dto.getMp3File();
|
String mp3File = dto.getMp3File();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue