Commit 12d3c0a9af9ba7733a10830f1b03ecaa965abae2
1 parent
99b6f240
【优化】AI 角色分类,处理 role 空情况
Showing
1 changed file
with
1 additions
and
1 deletions
yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/model/AiChatRoleServiceImpl.java
| @@ -137,7 +137,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { | @@ -137,7 +137,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService { | ||
| 137 | @Override | 137 | @Override |
| 138 | public List<String> getChatRoleCategoryList() { | 138 | public List<String> getChatRoleCategoryList() { |
| 139 | List<AiChatRoleDO> list = chatRoleMapper.selectListGroupByCategory(CommonStatusEnum.ENABLE.getStatus()); | 139 | List<AiChatRoleDO> list = chatRoleMapper.selectListGroupByCategory(CommonStatusEnum.ENABLE.getStatus()); |
| 140 | - return convertList(list, AiChatRoleDO::getCategory, role -> StrUtil.isNotBlank(role.getCategory())); | 140 | + return convertList(list, AiChatRoleDO::getCategory, role -> role != null && StrUtil.isNotBlank(role.getCategory())); |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | } | 143 | } |