diff --git a/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/history/service/impl/KbHistoryServiceImpl.java b/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/history/service/impl/KbHistoryServiceImpl.java index d236df3..cca755c 100644 --- a/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/history/service/impl/KbHistoryServiceImpl.java +++ b/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/history/service/impl/KbHistoryServiceImpl.java @@ -72,6 +72,11 @@ public class KbHistoryServiceImpl implements IKbHistoryService { */ @Override public int updateKbHistory(KbHistory kbHistory) { + if (StrUtil.isNotBlank(kbHistory.getFileName())) { + kbHistory.setFileFormat(FileTypeUtils.getFileChinaType(kbHistory.getFileName())); + kbHistory.setUploadTime(new Date()); + kbHistory.setUploadId(SecurityUtils.getUserId()); + } return kbHistoryMapper.updateKbHistory(kbHistory); } diff --git a/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbCeramicsServiceImpl.java b/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbCeramicsServiceImpl.java index 199c350..1f01050 100644 --- a/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbCeramicsServiceImpl.java +++ b/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbCeramicsServiceImpl.java @@ -76,6 +76,11 @@ public class KbCeramicsServiceImpl implements IKbCeramicsService @Override public int updateKbCeramics(KbCeramics kbCeramics) { + if (StrUtil.isNotBlank(kbCeramics.getFileName())) { + kbCeramics.setFileFormat(FileTypeUtils.getFileChinaType(kbCeramics.getFileName())); + kbCeramics.setUploadTime(new Date()); + kbCeramics.setUploadId(SecurityUtils.getUserId()); + } return kbCeramicsMapper.updateKbCeramics(kbCeramics); } diff --git a/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbChemicalIndustryServiceImpl.java b/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbChemicalIndustryServiceImpl.java index 2734041..deee940 100644 --- a/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbChemicalIndustryServiceImpl.java +++ b/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbChemicalIndustryServiceImpl.java @@ -76,6 +76,11 @@ public class KbChemicalIndustryServiceImpl implements IKbChemicalIndustryService @Override public int updateKbChemicalIndustry(KbChemicalIndustry kbChemicalIndustry) { + if (StrUtil.isNotBlank(kbChemicalIndustry.getFileName())) { + kbChemicalIndustry.setFileFormat(FileTypeUtils.getFileChinaType(kbChemicalIndustry.getFileName())); + kbChemicalIndustry.setUploadTime(new Date()); + kbChemicalIndustry.setUploadId(SecurityUtils.getUserId()); + } return kbChemicalIndustryMapper.updateKbChemicalIndustry(kbChemicalIndustry); } diff --git a/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbPapermakingServiceImpl.java b/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbPapermakingServiceImpl.java index af9f636..dc041ab 100644 --- a/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbPapermakingServiceImpl.java +++ b/inspur-service/inspur-knowledgeBase/src/main/java/com/inspur/industry/service/impl/KbPapermakingServiceImpl.java @@ -76,6 +76,11 @@ public class KbPapermakingServiceImpl implements IKbPapermakingService @Override public int updateKbPapermaking(KbPapermaking kbPapermaking) { + if (StrUtil.isNotBlank(kbPapermaking.getFileName())) { + kbPapermaking.setFileFormat(FileTypeUtils.getFileChinaType(kbPapermaking.getFileName())); + kbPapermaking.setUploadTime(new Date()); + kbPapermaking.setUploadId(SecurityUtils.getUserId()); + } return kbPapermakingMapper.updateKbPapermaking(kbPapermaking); }