mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 09:11:52 +08:00
Merge remote-tracking branch 'origin/master-jdk21-ai' into master-jdk21-ai
This commit is contained in:
commit
c5aab1aebd
@ -50,8 +50,9 @@ public interface AiChatRoleMapper extends BaseMapperX<AiChatRoleDO> {
|
|||||||
|
|
||||||
default List<AiChatRoleDO> selectListGroupByCategory(Integer status) {
|
default List<AiChatRoleDO> selectListGroupByCategory(Integer status) {
|
||||||
return selectList(new LambdaQueryWrapperX<AiChatRoleDO>()
|
return selectList(new LambdaQueryWrapperX<AiChatRoleDO>()
|
||||||
|
.select(AiChatRoleDO::getCategory)
|
||||||
.eq(AiChatRoleDO::getStatus, status)
|
.eq(AiChatRoleDO::getStatus, status)
|
||||||
.apply("GROUP BY category"));
|
.groupBy(AiChatRoleDO::getCategory));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ public class AiChatRoleServiceImpl implements AiChatRoleService {
|
|||||||
@Override
|
@Override
|
||||||
public List<String> getChatRoleCategoryList() {
|
public List<String> getChatRoleCategoryList() {
|
||||||
List<AiChatRoleDO> list = chatRoleMapper.selectListGroupByCategory(CommonStatusEnum.ENABLE.getStatus());
|
List<AiChatRoleDO> list = chatRoleMapper.selectListGroupByCategory(CommonStatusEnum.ENABLE.getStatus());
|
||||||
return convertList(list, AiChatRoleDO::getName);
|
return convertList(list, AiChatRoleDO::getCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user