From c6aec917c20657118c1bb0b3d1f16f43a12bad69 Mon Sep 17 00:00:00 2001 From: litianxiang Date: Mon, 19 Jan 2026 16:40:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:style=E4=B8=BAall=E6=97=B6=EF=BC=8Clike?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ai/da/service/impl/DesignServiceImpl.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java b/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java index 246cc306..41d36c62 100644 --- a/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java @@ -1140,12 +1140,12 @@ public class DesignServiceImpl extends ServiceImpl impleme userPreference.setPath(designItemDetail.getPath()); SysFile sysFile = sysFileService.getOne(new LambdaQueryWrapper().eq(SysFile::getUrl, designItemDetail.getPath())); userPreference.setAccountId(userHolder.getId()); - if (sysFile != null){ - userPreference.setCategory(sysFile.getLevel3Type().toLowerCase()+"_"+sysFile.getLevel2Type().toLowerCase()); + if (sysFile != null) { + userPreference.setCategory(sysFile.getLevel3Type().toLowerCase() + "_" + sysFile.getLevel2Type().toLowerCase()); userPreference.setStyle(sysFile.getStyle()); - }else { - log.error("sysFile not found:{}",designItemDetail.getPath()); - SendEmailUtil.commonExceptionReminder("url在sysFile里找不到"+designItemDetail.getPath(), new String[]{"litianxiangxtt@163.com"}); + } else { + log.error("sysFile not found:{}", designItemDetail.getPath()); + SendEmailUtil.commonExceptionReminder("url在sysFile里找不到" + designItemDetail.getPath(), new String[]{"litianxiangxtt@163.com"}); continue; } @@ -1154,6 +1154,10 @@ public class DesignServiceImpl extends ServiceImpl impleme .toLocalDateTime()); userPreference.setDesignItemId(designItem.getId()); userPreference.setProjectId(projectId); + if (workspaceRelStyles != null) { + //查不到记录,style应该是all + userPreference.setWorkspaceRelStyleId(0L); + } userPreference.setWorkspaceRelStyleId(workspaceRelStyles.get(0).getStyleId()); userPreferenceMapper.insert(userPreference); }