feat(user): 添加用户查询工具和测试数据接口

- 新增 QueryTool 类,提供 findAll 和 findAllByIdIn 方法用于查询用户
- 在 ChatClientConfiguration 中注册 QueryTool 为默认工具
- 创建 TestDataController,提供生成测试用户数据的接口- 新增 UserService 和 UserRepository,实现用户数据的批量插入和查询功能
- 将 ChatMessageDTO 从 model 包移动到 dto 包,优化包结构
-为 UserEntity 添加 createTime 和 updateTime 字段,完善实体类审计信息
- 新增 RedisConfig 配置类,为后续 Redis 功能做准备
This commit is contained in:
2025-10-23 18:08:30 +08:00
parent f8ff5808e5
commit 40c05838f7
9 changed files with 162 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
package com.hanserwei.snailsai.controller;
import com.hanserwei.snailsai.model.AIResponse;
import com.hanserwei.snailsai.model.ChatMessageDTO;
import com.hanserwei.snailsai.dto.ChatMessageDTO;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.chat.client.ChatClient;