Commit 7aef30cbe84180286ae92f1eb31ff99169c8a79c

Authored by cherishsince
1 parent 591002f0

增加 chat role 删除

yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatRoleServiceImpl.java
... ... @@ -95,7 +95,10 @@ public class ChatRoleServiceImpl implements ChatRoleService {
95 95  
96 96 @Override
97 97 public void delete(Long chatRoleId) {
98   -
  98 + // 检查角色是否存在
  99 + validateChatRoleExists(chatRoleId);
  100 + // 删除
  101 + aiChatRoleMapper.deleteById(chatRoleId);
99 102 }
100 103  
101 104 private AiChatRoleDO validateChatRoleExists(Long id) {
... ... @@ -105,5 +108,4 @@ public class ChatRoleServiceImpl implements ChatRoleService {
105 108 }
106 109 return aiChatRoleDO;
107 110 }
108   -
109 111 }
... ...