From 49a1f6b88a0deebc005d7300a05abc6fd8e17484 Mon Sep 17 00:00:00 2001 From: JH <935007339@qq.com> Date: Sun, 28 Jan 2024 16:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=9F=E5=88=8A=E4=BF=AE=E6=94=B9=E7=BC=96?= =?UTF-8?q?=E5=8F=B7=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/luoo/music/service/CMSJournalService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java b/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java index 49903e8..58881e1 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java @@ -360,11 +360,11 @@ public class CMSJournalService { * @return */ public Result update(String id, String token, JournalAddModel param) { + Journal oldJournal = journalDao.findById(id).get(); List byJournalNo = journalDao.findByJournalNo(param.getJournalNo()); - if (byJournalNo.size() > 0) { + if (!oldJournal.getJournalNo().equals(param.getJournalNo()) && byJournalNo.size() > 0) { return Result.failed("更新失败,期刊编号已存在"); } - Journal oldJournal = journalDao.findById(id).get(); Journal journal = buildJournal(id, param, token); String srcKey = null; if (param.getImage().contains(Constants.TEMP_KEY_PREFIX)) {