Commit Graph

21 Commits

Author SHA1 Message Date
Chaos
6e2de46157 refactor(user): 重构用户相关接口与实现
- 修改application.yaml中logic-not-delete-value为"null"
- 删除RoleController中无用的RoleResponse导入
- 修改RoleController的@GetMapping注解路径为/options
- UserController使用构造器注入替代@Autowired并添加@RequiredArgsConstructor
- UserController的@RequestMapping从/api/user改为/api/users
- UserController的获取用户列表接口路径从/all改为/并增加分页参数说明
- UserController新增根据ID获取用户信息接口GET /{id}
- UserController的重置用户密码接口路径从/setUserPassword改为/{userId}/password
- 删除UserController中已废弃的更新用户名接口/updateUsername
- UserController的获取当前用户信息接口路径从/profile改为/me
- UserController的更新用户信息接口路径从/profile改为/me
- UserController新增更新用户名接口PUT /me/username并标记为@Deprecated
- UserController的设置用户昵称接口路径改为/{userId}/nickname
- UserProfileService接口中的findUserWithRoles方法重命名为findUserWithRolesByUsername
- UserProfileService接口新增findUserWithRolesById方法定义
- UserProfileServiceImpl实现类中删除无用RoleResponse导入
- UserProfileServiceImpl中findUserWithRoles方法重命名为findUserWithRolesByUsername
- UserProfileServiceImpl中实现findUserWithRolesById方法逻辑并增加空值校验
2025-11-29 09:01:50 +08:00
Chaos
b479304687 feat(device): 实现设备创建时关联DNS映射配置
- 新增InterfaceDnsMapping实体及Mapper依赖注入
- 设备创建接口支持网络接口地址配置及DNS服务器绑定
- 优化事务管理,增强异常回滚机制
- 空值校验完善,避免空指针异常
- DNS服务查询逻辑优化,使用Map提高查找效率
- 增加数据库DNS记录不存在的错误码定义
2025-11-29 07:23:00 +08:00
chaos
1e09ce9f54 feat(device): 添加设备创建时关联DNS服务器功能
- 在DeviceServiceImpl中注入DnsServerService依赖
- 设备创建流程中增加DNS服务器名称列表的处理逻辑
- 调用DnsServerService根据DNS名称列表获取对应ID列表
- 新增DnsServerService接口及实现类DnsServerServiceImpl
- 实现根据单个或多个DNS名称查询对应服务器ID的方法
- 在ErrorCode中新增DNS相关错误码定义
2025-11-29 06:41:26 +08:00
Chaos
cc70d867c1 feat(device): 完善设备及网络接口管理功能
- 新增网络接口及地址配置相关实体类与映射
- 扩展 CreateDeviceRequest 支持嵌套接口与地址配置
- 调整设备类型实体类字段并增强逻辑删除支持
- 优化数据表结构,分离接口属性与地址配置
- 新增 DNS 服务器及相关映射实体支持
- 实现设备创建事务中同步保存接口与地址信息
- 调整 MyBatis Plus 逻辑删除配置与时间字段类型
- 重构 data.sql 初始化脚本,完善表间外键约束
2025-11-28 21:46:52 +08:00
Chaos
647d5733ac refactor(role): refactor role management API and service
- Remove unused imports and simplify controller annotations
- Change request mapping path from /api/role to /api/roles
- Update assignRolesToUser endpoint to use POST /users
- Update revokeRolesFromUser endpoint to use DELETE /users
- Modify getAllRoles method to return OptionResponse instead of RoleResponse
- Simplify database query in RoleServiceImpl using lambda query wrapper
- Add proper authorization checks for all role management endpoints
- Remove redundant getUserRole method with duplicate logic
2025-11-28 17:01:02 +08:00
Chaos
f0d6279949 feat(device): add device type options endpoint
- Added new GET /options endpoint to retrieve device type options
- Implemented getDeviceTypeOptions method in DeviceTypeController
- Updated DeviceTypeServiceImpl to map device types to OptionResponse
- Removed unused LambdaQueryWrapper and todo comment
- Added Java documentation for the new endpoint
2025-11-28 14:06:12 +08:00
Chaos
af8959220a feat(device): refactor device management API and implement CRUD operations
- Rename CreateDriveRequest to CreateDeviceRequest
- Add DeviceQueryRequest for pagination and filtering
- Add UpdateDeviceRequest for device updates
- Refactor DeviceController with RESTful endpoints
- Implement getAllDevices with pagination and search
- Implement createDevice endpoint
- Implement updateDevice endpoint
- Implement deleteDevice endpoint
- Remove real delete endpoint
- Add DeviceResponse and OptionResponse DTOs
- Update DeviceService interface and implementation
- Add device type options endpoint
- Update device type controller mappings
2025-11-27 17:11:57 +08:00
Chaos
79ef40bd34 feat(role): 新增获取用户角色接口
- 在RoleController中新增getUserRole方法,用于获取所有用户角色
- 添加RoleService接口及其实现类RoleServiceImpl
- 创建RoleResponse DTO并优化UserProfileResponse中的角色映射逻辑
- 引入RoleService依赖并配置相关注解以支持新功能
- 实现角色数据的查询与转换,返回标准ApiResult格式结果
2025-11-26 06:25:31 +08:00
Chaos
a5a23a6b52 feat(auth): add user profile to auth token response
- Add jwt configuration in application.yaml
- Include user profile information in authentication response
- Implement user profile response DTO with role mapping
- Fix typo in UserProfileService interface and implementation class names
- Add pagination support for user list endpoint
- Configure MyBatis Plus interceptor for MariaDB
- Add MyBatis Plus JSQLParser dependency
- Implement page-based user retrieval with role information
- Remove obsolete MyBatis configuration class
- Update controller to use paginated user data
- Replace manual user conversion with constructor mapping
- Rename UserProfileServcie to UserProfileService consistently
2025-11-24 17:10:01 +08:00
Chaos
b2c6cfe90a feat(user): implement user profile management functionality
- Add user nickname update endpoint with validation
- Introduce user profile update endpoint supporting nickname and password changes
- Create UserProfileResponse DTO with nickname field
- Add SetUserNicknameRequest DTO for nickname updates
- Implement UserProfileUpdateRequest DTO for profile modifications
- Refactor UserService to UserProfileService with enhanced capabilities
- Update UserMapper to include nickname in result mapping
- Add new error codes for nickname and profile update failures
- Modify CORS configuration to allow requests from localhost:5173
- Remove obsolete AppConfig RestTemplate bean definition
- Rename UserinfoResponse to UserProfileResponse for consistency
- Adjust controller endpoints to use updated service and DTOs
- Add transactional support for user profile updates
- Improve error handling for user-related operations
2025-11-21 17:14:50 +08:00
Chaos
d4bbaf6715 feat(device): 实现设备逻辑删除与真实删除功能
- 添加设备逻辑删除接口,更新查询SQL过滤已删除数据
- 添加设备真实删除接口,需管理员权限
- 在DeviceService中实现逻辑删除与真实删除方法
- 在DeviceMapper中添加逻辑删除SQL语句
- 新增设备相关错误码:删除失败、类型删除失败等
- 更新UserController中修改密码与更新用户名接口的请求方式为PUT
- 优化DeviceController中创建设备与查询设备接口的注解使用
- 引入Spring Security注解支持接口权限控制
2025-11-21 07:30:17 +08:00
Chaos
72a1e4d309 feat(device): 添加设备类型管理功能
- 在Device实体中添加了deviceType字段,并使用@TableField注解标记为非数据库字段
- 新增DeviceType实体类,用于表示设备类型信息
- 创建DeviceTypeController控制器,提供获取所有设备类型的接口
- 新增DeviceTypeService接口及其实现类DeviceTypeServiceImpl,实现设备类型相关业务逻辑
- 添加DriveTypeMapper接口,继承BaseMapper以支持对DeviceType的数据库操作
- 在ErrorCode常量类中增加了设备相关的错误码:DEVICE_NOT_FOUND和DEVICE_TYPE_NOT_FOUND
- 更新DeviceController,引入DeviceTypeResponse并优化代码结构
- 在DeviceMapper中新增selectOneWithTypeById方法,通过MyBatis注解实现关联查询设备及其类型信息
2025-11-21 06:54:12 +08:00
Chaos
e23434ab48 feat(device): 添加设备管理功能模块
- 新增设备实体类 Device 及其对应的数据传输对象 CreateDriveRequest 和 DeviceResponse
- 创建设备相关的控制器 DeviceController 并实现新建设备接口
- 实现设备服务接口 DeviceService 及其具体实现类 DeviceServiceImpl
- 添加设备数据访问层接口 DeviceMapper
- 在数据库初始化脚本中增加设备相关表结构定义,包括设备类型表、设备表和网络接口表
- 更新应用配置文件以激活开发环境配置
- 修复图片上传时获取原始文件名的问题
- 修改用户角色分配相关接口方法命名以提高语义清晰度
2025-11-21 06:29:50 +08:00
chaos
8dd0efa09e feat(database): 重构用户角色关联及权限体系
- 新增 BizException 构造函数支持自定义消息
- 优化 SQL 脚本结构,明确表设计最佳实践
- 修改 t_user、t_role 等表字段类型与索引策略
- 引入代理主键 id 到关联表 t_user_role 和 t_role_permission
- 更新 UserRole 实体类适配 MyBatis-Plus 主键策略
- 增强 UserRoleService 接口功能,支持分配和撤销角色
- 实现批量操作和事务控制提升数据一致性
- 添加安全注解 @PreAuthorize 控制接口访问权限
- 修正 Mapper 注解并优化参数命名提高可读性
- 扩展 ErrorCode 常量增强错误描述准确性
2025-11-20 23:01:30 +08:00
Chaos
e46b820fca 功能(auth):实现用户注册并分配默认角色
- 添加AppConfig类以启用事务管理
- 在application.yaml中配置默认角色代码
- 在AuthServiceImpl中注入RoleMapper和defRoleCode
- 在注册过程中为新用户分配默认角色
- 添加用户注册和登录事件的日志记录
- 在登录过程中处理异常并进行适当的错误日志记录
- 创建用户、角色、权限及关联关系的数据库表
- 添加用户角色实体类和用户-角色关系映射器
- 实现用户角色服务以管理用户角色分配
- 添加通过SetUserRoleRequest设置用户角色的API端点
- 更新用户实体类并添加适当的字段和注解
- 实现包含角色信息的用户信息查询方法
- 将用户转换逻辑重构为可复用方法
- 为SetUserRoleRequest DTO添加校验约束}```
2025-11-20 17:19:52 +08:00
Chaos
7dc0d26d9b feat(user): 添加更新用户名功能并优化安全配置
- 在 ErrorCode 中新增 USER_UPDATE_USERNAME_FAILED 错误码
- JwtAuthenticationTokenFilter 中增加当前用户名属性设置
- RestAuthenticationEntryPoint 返回状态码改为 403 并更新错误信息
- 新增 UpdateUsernameRequest DTO 用于接收用户名更新请求
- UserController 添加 updateUsername 接口支持修改用户名
- UserInfoService 和其实现类中增加 updateUsername 方法逻辑
- 引入 tokenHead 配置项以支持 JWT 相关操作
2025-11-18 22:32:51 +08:00
Chaos
8fc7f6554d refactor(auth):重构认证模块并增强验证机制
- 重命名并调整 DTO 类结构,将 LoginRequest 和 RegisterRequest 迁移至 request 包- 引入 AuthLoginRequest 和 AuthRegisterRequest 并添加字段验证注解
- 更新 AuthController 使用新的 DTO 并增加 @Valid 参数校验
- 修改 AuthService 接口及实现类,接收 User 实体而非 RegisterRequest
- 添加全局异常处理器 GlobalExceptionHandler 处理参数校验和业务异常
- 新增 ErrorCode 枚举统一管理错误码和消息
- 引入 UserConverter 组件用于 DTO 到实体的转换
- 增强用户注册与登录逻辑,完善异常处理和错误提示
- 移除旧的 BadCredentialsException 捕获逻辑
- 调整 pom.xml 添加 spring-boot-starter-validation 和相关依赖
- 更新 User 实体类,添加完整字段映射和角色关联配置
- 新增 UserInfoService 及其实现,提供用户管理和密码设置功能
-优化 UserMapper 查询方法,支持联表查询用户及其角色信息
- 删除无用的 HLSController 控制器
- 完善 ImageController 文件上传逻辑并更新响应结构
- 添加用户名和密码格式验证工具类 PasswordValidate 和 UsernameValidate
2025-11-18 16:44:43 +08:00
Chaos
da1bdafbb2 feat(image): add image upload functionality
- Created FileUploadResponse DTO for image upload responses
- Implemented ImageController with upload endpoint
- Defined ImageService interface for image operations
- Added ImageServiceImpl with placeholder upload logic
- Updated pom.xml to include chaos_api_domain dependency
2025-11-18 07:27:28 +08:00
Chaos
c6d18d4979 refactor(video): 移除视频处理相关功能模块
- 删除 RabbitMQ 配置类及相关队列、交换机定义
- 移除视频控制器及其分片上传、合并处理接口
- 删除视频文件上传服务接口及实现类
- 移除视频处理服务接口及实现类
- 删除相关的 DTO 数据传输对象类
- 清理配置文件中 RabbitMQ 连接信息
2025-11-10 19:34:14 +08:00
Chaos
3683a9d8e0 feat(chaos): 实现视频分片上传和后台处理功能- 新增视频上传相关控制器、服务接口和实现类
- 实现了视频分片上传、合并和后台处理的逻辑
- 添加了 RabbitMQ 消息队列配置和消息转换器
-优化了 JWT 认证过滤器和日志记录
- 新增了跨域配置
2025-07-20 07:17:30 +08:00
chaos
1810632e60 feat(项目结构): 重构项目模块并添加新功能
-重命名 c_portal 模块为 chaos_api_common
- 新增 chaos_api_domain、chaos_api_interface、chaos_api_service、chaos_api_data、chaos_api_web 和 chaos_api_websocket 模块
- 更新项目依赖,包括 Spring Boot、MyBatis-Plus 和 MySQL连接器
- 移除旧的 PortalApplication 类,创建新的 ChaosApiWebApplication 类作为项目入口
2025-07-15 11:17:53 +08:00