serv-初始mapper
This commit is contained in:
262
schoolNewsServ/.doc/快速开始.md
Normal file
262
schoolNewsServ/.doc/快速开始.md
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
# 校园思政新闻平台 - 快速开始
|
||||||
|
|
||||||
|
## 📦 项目结构
|
||||||
|
|
||||||
|
```
|
||||||
|
school-news/
|
||||||
|
├── admin/ # 管理后台入口
|
||||||
|
├── api/ # API接口定义
|
||||||
|
│ ├── api-all/
|
||||||
|
│ ├── api-auth/
|
||||||
|
│ └── api-system/
|
||||||
|
├── auth/ # 认证模块
|
||||||
|
├── system/ # 系统管理模块(用户、权限、部门等)
|
||||||
|
├── news/ # 资源/新闻管理模块
|
||||||
|
├── study/ # 学习管理模块 🆕
|
||||||
|
├── usercenter/ # 个人中心模块 🆕
|
||||||
|
├── ai/ # 智能体模块 🆕
|
||||||
|
└── common/ # 公共模块
|
||||||
|
├── common-all/
|
||||||
|
├── common-annotation/
|
||||||
|
├── common-core/
|
||||||
|
├── common-dto/
|
||||||
|
├── common-exception/
|
||||||
|
├── common-jdbc/
|
||||||
|
├── common-redis/
|
||||||
|
└── common-util/
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🚀 快速开始
|
||||||
|
|
||||||
|
### 1. 环境要求
|
||||||
|
|
||||||
|
- **JDK**: 21+
|
||||||
|
- **Maven**: 3.8+
|
||||||
|
- **MySQL**: 8.0+
|
||||||
|
- **Redis**: 6.0+ (可选)
|
||||||
|
|
||||||
|
### 2. 数据库初始化
|
||||||
|
|
||||||
|
#### Windows环境
|
||||||
|
```cmd
|
||||||
|
cd .bin/mysql
|
||||||
|
init-database.bat
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Linux/Mac环境
|
||||||
|
```bash
|
||||||
|
cd .bin/mysql
|
||||||
|
chmod +x init-database.sh
|
||||||
|
./init-database.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 手动执行
|
||||||
|
```bash
|
||||||
|
cd .bin/mysql/sql
|
||||||
|
mysql -u root -p < createDB.sql
|
||||||
|
mysql -u root -p < createTableUser.sql
|
||||||
|
mysql -u root -p < createTablePermission.sql
|
||||||
|
mysql -u root -p < createTablePermissionControl.sql
|
||||||
|
mysql -u root -p < createTableResource.sql
|
||||||
|
mysql -u root -p < createTableCourse.sql
|
||||||
|
mysql -u root -p < createTableLearning.sql
|
||||||
|
mysql -u root -p < createTableUserCenter.sql
|
||||||
|
mysql -u root -p < createTableAI.sql
|
||||||
|
mysql -u root -p < createTableSystem.sql
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. 配置数据库连接
|
||||||
|
|
||||||
|
修改各模块的 `application.yml`:
|
||||||
|
```yaml
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
url: jdbc:mysql://localhost:3306/school_news
|
||||||
|
username: root
|
||||||
|
password: your_password
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. 编译项目
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mvn clean install
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. 启动服务
|
||||||
|
|
||||||
|
各模块端口分配:
|
||||||
|
- **admin**: 8080 (管理后台入口)
|
||||||
|
- **auth**: 8082 (认证服务)
|
||||||
|
- **system**: 8081 (系统管理)
|
||||||
|
- **study**: 8084 (学习管理) 🆕
|
||||||
|
- **usercenter**: 8085 (个人中心) 🆕
|
||||||
|
- **ai**: 8086 (智能体) 🆕
|
||||||
|
|
||||||
|
启动顺序建议:
|
||||||
|
1. auth (认证服务)
|
||||||
|
2. system (系统管理)
|
||||||
|
3. 其他业务模块
|
||||||
|
|
||||||
|
### 6. 访问系统
|
||||||
|
|
||||||
|
- **管理后台**: http://localhost:8080
|
||||||
|
- **默认账号**: admin
|
||||||
|
- **默认密码**: 查看 `.bin/mysql/sql/createTableUser.sql`
|
||||||
|
|
||||||
|
## 📋 模块功能说明
|
||||||
|
|
||||||
|
### system (系统管理) - 已有
|
||||||
|
- 用户管理
|
||||||
|
- 部门管理
|
||||||
|
- 角色管理
|
||||||
|
- 权限管理
|
||||||
|
- 菜单管理
|
||||||
|
|
||||||
|
### news (资源/新闻) - 待扩展
|
||||||
|
- 资源管理
|
||||||
|
- 分类管理
|
||||||
|
- Banner管理
|
||||||
|
- 推荐管理
|
||||||
|
- 标签管理
|
||||||
|
- 数据采集
|
||||||
|
|
||||||
|
### study (学习管理) - 新建 🆕
|
||||||
|
- 学习任务
|
||||||
|
- 任务分配
|
||||||
|
- 学习记录
|
||||||
|
- 学习统计
|
||||||
|
- 课程管理
|
||||||
|
- 章节管理
|
||||||
|
- 课程标签
|
||||||
|
- 权限控制
|
||||||
|
### usercenter (个人中心) - 新建 🆕
|
||||||
|
- 用户收藏
|
||||||
|
- 成就系统
|
||||||
|
- 积分系统
|
||||||
|
- 浏览记录
|
||||||
|
|
||||||
|
### ai (智能体) - 新建 🆕
|
||||||
|
- AI对话
|
||||||
|
- 知识库
|
||||||
|
- 文件问答
|
||||||
|
- 对话历史
|
||||||
|
|
||||||
|
## 🔧 开发指南
|
||||||
|
|
||||||
|
### 新增接口步骤
|
||||||
|
|
||||||
|
1. **定义API接口** (在api模块)
|
||||||
|
```java
|
||||||
|
// api-course/src/main/java/org/xyzh/api/course/CourseApi.java
|
||||||
|
public interface CourseApi {
|
||||||
|
@GetMapping("/course/list")
|
||||||
|
Object getCourseList(...);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **创建DTO** (在common-dto)
|
||||||
|
```java
|
||||||
|
// common/common-dto/src/main/java/org/xyzh/common/dto/course/TbCourse.java
|
||||||
|
public class TbCourse extends BaseDTO {
|
||||||
|
private String courseID;
|
||||||
|
private String name;
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **创建Mapper** (在业务模块)
|
||||||
|
```java
|
||||||
|
// course/src/main/java/org/xyzh/course/mapper/CourseMapper.java
|
||||||
|
@Mapper
|
||||||
|
public interface CourseMapper extends BaseMapper<TbCourse> {
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **创建Service** (在业务模块)
|
||||||
|
```java
|
||||||
|
// course/src/main/java/org/xyzh/course/service/CourseService.java
|
||||||
|
public interface CourseService {
|
||||||
|
}
|
||||||
|
|
||||||
|
// course/src/main/java/org/xyzh/course/service/impl/CourseServiceImpl.java
|
||||||
|
@Service
|
||||||
|
public class CourseServiceImpl implements CourseService {
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
5. **创建Controller** (在业务模块)
|
||||||
|
```java
|
||||||
|
// course/src/main/java/org/xyzh/course/controller/CourseController.java
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/course")
|
||||||
|
public class CourseController implements CourseApi {
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 权限控制使用
|
||||||
|
|
||||||
|
详见:[权限控制使用说明](.bin/mysql/sql/权限控制使用说明.md)
|
||||||
|
|
||||||
|
基本用法:
|
||||||
|
```java
|
||||||
|
// 检查用户对资源的权限
|
||||||
|
SELECT can_read, can_write, can_execute
|
||||||
|
FROM tb_resource_permission
|
||||||
|
WHERE resource_type = 2 -- 课程
|
||||||
|
AND resource_id = 'course_001'
|
||||||
|
AND (dept_id IS NULL OR dept_id = '用户部门')
|
||||||
|
AND (role_id IS NULL OR role_id IN ('用户角色'))
|
||||||
|
AND deleted = 0;
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📚 参考文档
|
||||||
|
|
||||||
|
### 数据库相关
|
||||||
|
- [表结构详细说明](.bin/mysql/sql/README.md)
|
||||||
|
- [表结构汇总](.bin/mysql/sql/表结构汇总.md)
|
||||||
|
- [ER关系图](.bin/mysql/sql/ER关系图.md)
|
||||||
|
- [使用说明](.bin/mysql/使用说明.md)
|
||||||
|
|
||||||
|
### 开发相关
|
||||||
|
- [模块创建完整指南](.doc/模块创建完整指南.md)
|
||||||
|
- [模块创建进度](.doc/模块创建进度.md)
|
||||||
|
- [需求文档](.doc/需求文档.md)
|
||||||
|
|
||||||
|
## ⚠️ 注意事项
|
||||||
|
|
||||||
|
1. **数据库编码**: 使用 utf8mb4
|
||||||
|
2. **主键生成**: 使用 UUID
|
||||||
|
3. **软删除**: 所有表使用 deleted 字段
|
||||||
|
4. **日志**: 使用 Log4j2,不要用 Logback
|
||||||
|
5. **权限**: 所有资源需配置权限控制
|
||||||
|
|
||||||
|
## 🐛 常见问题
|
||||||
|
|
||||||
|
### Q1: 启动时提示端口被占用
|
||||||
|
**A**: 修改对应模块的 `application.yml` 中的 `server.port`
|
||||||
|
|
||||||
|
### Q2: 数据库连接失败
|
||||||
|
**A**: 检查 MySQL 服务是否启动,用户名密码是否正确
|
||||||
|
|
||||||
|
### Q3: MyBatis找不到Mapper
|
||||||
|
**A**: 检查 `mybatis-plus.mapper-locations` 配置是否正确
|
||||||
|
|
||||||
|
### Q4: 权限检查失败
|
||||||
|
**A**: 确保在 `tb_resource_permission` 表中配置了相应的权限记录
|
||||||
|
|
||||||
|
## 📞 技术支持
|
||||||
|
|
||||||
|
遇到问题请参考:
|
||||||
|
1. 项目根目录下的 `.doc/` 文档
|
||||||
|
2. 数据库 SQL 脚本中的注释
|
||||||
|
3. 代码中的 JavaDoc 注释
|
||||||
|
|
||||||
|
## 🎯 后续计划
|
||||||
|
|
||||||
|
- [ ] 完成所有模块的业务代码
|
||||||
|
- [ ] 添加单元测试
|
||||||
|
- [ ] 集成Swagger文档
|
||||||
|
- [ ] 添加Redis缓存
|
||||||
|
- [ ] 性能优化
|
||||||
|
- [ ] 安全加固
|
||||||
|
|
||||||
267
schoolNewsServ/README.md
Normal file
267
schoolNewsServ/README.md
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
# 校园思政新闻平台
|
||||||
|
|
||||||
|
> 基于Spring Boot 3.x + MyBatis Plus + MySQL的校园思政学习管理系统
|
||||||
|
|
||||||
|
## 📖 项目简介
|
||||||
|
|
||||||
|
校园思政新闻平台是一个集资源管理、课程学习、任务管理、智能问答于一体的综合性思政学习平台,支持多部门、多角色的细粒度权限控制。
|
||||||
|
|
||||||
|
## ✨ 核心功能
|
||||||
|
|
||||||
|
### 🔐 基础模块
|
||||||
|
- **用户管理**: 用户信息、登录认证、权限管理
|
||||||
|
- **组织管理**: 部门层级、角色分配、权限配置
|
||||||
|
- **菜单管理**: 动态菜单、权限关联
|
||||||
|
|
||||||
|
### 📰 资源模块
|
||||||
|
- **资源管理**: 新闻文章发布、编辑、分类
|
||||||
|
- **Banner管理**: 轮播图配置、排序、跳转链接
|
||||||
|
- **资源推荐**: TOP资源配置、排序调整
|
||||||
|
- **标签管理**: 标签创建、资源标签关联
|
||||||
|
- **数据采集**: 自动采集配置、采集日志
|
||||||
|
|
||||||
|
### 🎓 课程模块
|
||||||
|
- **课程管理**: 课程创建、编辑、状态管理
|
||||||
|
- **章节管理**: 课程章节、内容编辑、视频上传
|
||||||
|
- **权限控制**: 基于部门/角色的课程访问权限
|
||||||
|
|
||||||
|
### 📚 学习模块
|
||||||
|
- **任务管理**: 学习任务创建、人员分配、进度跟踪
|
||||||
|
- **学习记录**: 详细的学习行为记录
|
||||||
|
- **学习统计**: 多维度学习数据统计分析
|
||||||
|
|
||||||
|
### 👤 个人中心
|
||||||
|
- **我的收藏**: 资源/课程收藏管理
|
||||||
|
- **成就系统**: 学习成就、勋章、等级
|
||||||
|
- **积分系统**: 积分获取、消费记录
|
||||||
|
- **学习记录**: 个人学习数据可视化
|
||||||
|
|
||||||
|
### 🤖 智能体
|
||||||
|
- **AI对话**: 基于知识库的智能问答
|
||||||
|
- **知识库**: 知识库管理、内容维护
|
||||||
|
- **文件问答**: 上传文件进行智能解读
|
||||||
|
- **对话历史**: 历史对话记录管理
|
||||||
|
|
||||||
|
## 🏗️ 技术架构
|
||||||
|
|
||||||
|
### 后端技术栈
|
||||||
|
- **框架**: Spring Boot 3.5.6
|
||||||
|
- **微服务**: Spring Cloud 2025.0.0
|
||||||
|
- **ORM**: MyBatis Plus 3.5.14
|
||||||
|
- **数据库**: MySQL 8.0+
|
||||||
|
- **缓存**: Redis 6.0+ (可选)
|
||||||
|
- **认证**: JWT
|
||||||
|
- **日志**: Log4j2
|
||||||
|
|
||||||
|
### 前端技术栈 (规划中)
|
||||||
|
- Vue 3
|
||||||
|
- Element Plus
|
||||||
|
- Axios
|
||||||
|
- Echarts
|
||||||
|
|
||||||
|
## 📦 项目结构
|
||||||
|
|
||||||
|
```
|
||||||
|
school-news/
|
||||||
|
├── admin/ # 管理后台入口 (8080)
|
||||||
|
├── api/ # API接口定义
|
||||||
|
│ ├── api-all/ # 全部API聚合
|
||||||
|
│ ├── api-auth/ # 认证API
|
||||||
|
│ ├── api-system/ # 系统管理API
|
||||||
|
│ ├── api-course/ # 课程API 🆕
|
||||||
|
│ ├── api-learning/ # 学习API 🆕
|
||||||
|
│ ├── api-usercenter/ # 个人中心API 🆕
|
||||||
|
│ └── api-ai/ # 智能体API 🆕
|
||||||
|
├── auth/ # 认证服务 (8082)
|
||||||
|
├── system/ # 系统管理 (8081)
|
||||||
|
├── news/ # 资源管理 (8087)
|
||||||
|
├── course/ # 课程管理 (8083) 🆕
|
||||||
|
├── learning/ # 学习管理 (8084) 🆕
|
||||||
|
├── usercenter/ # 个人中心 (8085) 🆕
|
||||||
|
├── ai/ # 智能体 (8086) 🆕
|
||||||
|
├── common/ # 公共模块
|
||||||
|
│ ├── common-all/ # 全部依赖聚合
|
||||||
|
│ ├── common-annotation/ # 注解
|
||||||
|
│ ├── common-core/ # 核心工具
|
||||||
|
│ ├── common-dto/ # 数据传输对象
|
||||||
|
│ ├── common-exception/ # 异常处理
|
||||||
|
│ ├── common-jdbc/ # JDBC配置
|
||||||
|
│ ├── common-redis/ # Redis配置
|
||||||
|
│ └── common-util/ # 工具类
|
||||||
|
├── .bin/ # 工具脚本
|
||||||
|
│ └── mysql/ # 数据库脚本
|
||||||
|
│ ├── init-database.bat/sh # 初始化脚本
|
||||||
|
│ └── sql/ # SQL文件
|
||||||
|
└── .doc/ # 项目文档
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🗄️ 数据库设计
|
||||||
|
|
||||||
|
### 数据库统计
|
||||||
|
- **总表数**: 50张表
|
||||||
|
- **用户管理**: 3张表
|
||||||
|
- **权限管理**: 9张表(含统一权限表)
|
||||||
|
- **资源管理**: 8张表
|
||||||
|
- **课程管理**: 3张表
|
||||||
|
- **学习管理**: 6张表
|
||||||
|
- **个人中心**: 6张表
|
||||||
|
- **智能体**: 6张表
|
||||||
|
- **系统管理**: 8张表
|
||||||
|
|
||||||
|
### 核心表
|
||||||
|
- `tb_sys_user` - 用户表
|
||||||
|
- `tb_resource_permission` - 统一资源权限控制表 ⭐
|
||||||
|
- `tb_resource` - 资源/新闻表
|
||||||
|
- `tb_course` - 课程表
|
||||||
|
- `tb_learning_task` - 学习任务表
|
||||||
|
- `tb_user_collection` - 用户收藏表
|
||||||
|
- `tb_ai_conversation` - AI对话表
|
||||||
|
|
||||||
|
## 🚀 快速开始
|
||||||
|
|
||||||
|
### 1. 环境准备
|
||||||
|
```bash
|
||||||
|
# 需要
|
||||||
|
JDK 21+
|
||||||
|
Maven 3.8+
|
||||||
|
MySQL 8.0+
|
||||||
|
|
||||||
|
# 可选
|
||||||
|
Redis 6.0+
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. 克隆项目
|
||||||
|
```bash
|
||||||
|
git clone <repository-url>
|
||||||
|
cd schoolNewsServ
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. 初始化数据库
|
||||||
|
```bash
|
||||||
|
# Windows
|
||||||
|
cd .bin/mysql
|
||||||
|
init-database.bat
|
||||||
|
|
||||||
|
# Linux/Mac
|
||||||
|
cd .bin/mysql
|
||||||
|
chmod +x init-database.sh
|
||||||
|
./init-database.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. 修改配置
|
||||||
|
修改各模块的 `application.yml`:
|
||||||
|
```yaml
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
url: jdbc:mysql://localhost:3306/school_news
|
||||||
|
username: root
|
||||||
|
password: your_password
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. 编译运行
|
||||||
|
```bash
|
||||||
|
# 编译
|
||||||
|
mvn clean install
|
||||||
|
|
||||||
|
# 运行(根据需要启动)
|
||||||
|
cd admin
|
||||||
|
mvn spring-boot:run
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. 访问系统
|
||||||
|
- 管理后台: http://localhost:8080
|
||||||
|
- 默认账号: admin
|
||||||
|
- 默认密码: 见 `.bin/mysql/sql/createTableUser.sql`
|
||||||
|
|
||||||
|
## 📚 文档目录
|
||||||
|
|
||||||
|
### 快速入门
|
||||||
|
- [快速开始](.doc/快速开始.md) - 项目启动指南
|
||||||
|
- [模块创建进度](.doc/模块创建进度.md) - 当前开发进度
|
||||||
|
|
||||||
|
### 开发文档
|
||||||
|
- [模块创建完整指南](.doc/模块创建完整指南.md) - 详细开发指南
|
||||||
|
- [新模块创建说明](.doc/新模块创建说明.md) - 模块说明
|
||||||
|
|
||||||
|
### 数据库文档
|
||||||
|
- [数据库表结构说明](.bin/mysql/sql/README.md) - 详细表结构
|
||||||
|
- [表结构汇总](.bin/mysql/sql/表结构汇总.md) - 表清单
|
||||||
|
- [ER关系图](.bin/mysql/sql/ER关系图.md) - 关系图解
|
||||||
|
- [权限控制使用说明](.bin/mysql/sql/权限控制使用说明.md) - 权限使用 ⭐
|
||||||
|
- [数据库使用说明](.bin/mysql/使用说明.md) - 初始化说明
|
||||||
|
|
||||||
|
### 需求文档
|
||||||
|
- [需求文档](.doc/需求文档.md) - 功能需求
|
||||||
|
|
||||||
|
## 🔑 权限控制
|
||||||
|
|
||||||
|
本系统采用**统一权限表**设计,支持灵活的权限控制:
|
||||||
|
|
||||||
|
### 权限模型
|
||||||
|
- **Owner(所有者)**: 资源创建者,通常拥有全部权限
|
||||||
|
- **Group(组)**: 部门或角色,可配置不同权限
|
||||||
|
- **Others(其他人)**: 公开访问权限
|
||||||
|
|
||||||
|
### 权限类型
|
||||||
|
- **读权限(4)**: 查看、浏览、阅读
|
||||||
|
- **写权限(2)**: 编辑、修改、删除
|
||||||
|
- **执行权限(1)**: 发布、审核、归档
|
||||||
|
|
||||||
|
### 使用示例
|
||||||
|
```sql
|
||||||
|
-- 查询用户对课程的权限
|
||||||
|
SELECT can_read, can_write, can_execute
|
||||||
|
FROM tb_resource_permission
|
||||||
|
WHERE resource_type = 2 -- 课程
|
||||||
|
AND resource_id = 'course_001'
|
||||||
|
AND (dept_id IS NULL OR dept_id = '用户部门ID')
|
||||||
|
AND (role_id IS NULL OR role_id IN ('用户角色ID列表'))
|
||||||
|
AND deleted = 0;
|
||||||
|
```
|
||||||
|
|
||||||
|
详见:[权限控制使用说明](.bin/mysql/sql/权限控制使用说明.md)
|
||||||
|
|
||||||
|
## 🎯 开发进度
|
||||||
|
|
||||||
|
- [x] 数据库设计(100%)
|
||||||
|
- [x] Maven项目结构(70%)
|
||||||
|
- [x] 基础模块(system, auth)
|
||||||
|
- [x] 新模块基础结构(course, learning, usercenter, ai)
|
||||||
|
- [ ] DTO实体类创建(0%)
|
||||||
|
- [ ] Mapper层开发(0%)
|
||||||
|
- [ ] Service层开发(0%)
|
||||||
|
- [ ] Controller层开发(0%)
|
||||||
|
- [ ] 前端开发(0%)
|
||||||
|
|
||||||
|
**当前总体完成度:约30%**
|
||||||
|
|
||||||
|
## 🤝 贡献指南
|
||||||
|
|
||||||
|
1. Fork 本仓库
|
||||||
|
2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
|
||||||
|
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
|
||||||
|
4. 推送到分支 (`git push origin feature/AmazingFeature`)
|
||||||
|
5. 提交 Pull Request
|
||||||
|
|
||||||
|
## 📄 开源协议
|
||||||
|
|
||||||
|
本项目采用 MIT 协议
|
||||||
|
|
||||||
|
## 👥 开发团队
|
||||||
|
|
||||||
|
- 后端开发: [@yslg]
|
||||||
|
- 数据库设计: [@system]
|
||||||
|
|
||||||
|
## 📞 联系方式
|
||||||
|
|
||||||
|
- Email: 3223905473@qq.com
|
||||||
|
- 项目地址: [GitHub](your-github-url)
|
||||||
|
|
||||||
|
## 🙏 致谢
|
||||||
|
|
||||||
|
感谢所有为本项目做出贡献的开发者!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
⭐ 如果这个项目对你有帮助,请给个Star支持一下!
|
||||||
|
|
||||||
85
schoolNewsServ/ai/pom.xml
Normal file
85
schoolNewsServ/ai/pom.xml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>school-news</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>ai</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>ai</name>
|
||||||
|
<description>智能体模块</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-ai</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>common-all</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-logging</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zaxxer</groupId>
|
||||||
|
<artifactId>HikariCP</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.ai.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.ai.TbAiAgentConfig;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 智能体配置数据访问层
|
||||||
|
* @filename AiAgentConfigMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AiAgentConfigMapper extends BaseMapper<TbAiAgentConfig> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询智能体配置列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbAiAgentConfig> 智能体配置列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbAiAgentConfig> selectAiAgentConfigs(TbAiAgentConfig filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.ai.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.ai.TbAiConversation;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 对话会话数据访问层
|
||||||
|
* @filename AiConversationMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AiConversationMapper extends BaseMapper<TbAiConversation> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询对话会话列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbAiConversation> 对话会话列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbAiConversation> selectAiConversations(TbAiConversation filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.ai.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.ai.TbAiKnowledge;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 知识库数据访问层
|
||||||
|
* @filename AiKnowledgeMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AiKnowledgeMapper extends BaseMapper<TbAiKnowledge> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询知识库列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbAiKnowledge> 知识库列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbAiKnowledge> selectAiKnowledges(TbAiKnowledge filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.ai.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.ai.TbAiMessage;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 对话消息数据访问层
|
||||||
|
* @filename AiMessageMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AiMessageMapper extends BaseMapper<TbAiMessage> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询对话消息列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbAiMessage> 对话消息列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbAiMessage> selectAiMessages(TbAiMessage filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.ai.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.ai.TbAiUploadFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 上传文件数据访问层
|
||||||
|
* @filename AiUploadFileMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AiUploadFileMapper extends BaseMapper<TbAiUploadFile> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询上传文件列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbAiUploadFile> 上传文件列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbAiUploadFile> selectAiUploadFiles(TbAiUploadFile filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.ai.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.ai.TbAiUsageStatistics;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description AI使用统计数据访问层
|
||||||
|
* @filename AiUsageStatisticsMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AiUsageStatisticsMapper extends BaseMapper<TbAiUsageStatistics> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询AI使用统计列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbAiUsageStatistics> AI使用统计列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbAiUsageStatistics> selectAiUsageStatistics(TbAiUsageStatistics filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.ai.mapper.AiAgentConfigMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.ai.TbAiAgentConfig">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||||
|
<result column="avatar" property="avatar" jdbcType="VARCHAR"/>
|
||||||
|
<result column="system_prompt" property="systemPrompt" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="model_name" property="modelName" jdbcType="VARCHAR"/>
|
||||||
|
<result column="model_provider" property="modelProvider" jdbcType="VARCHAR"/>
|
||||||
|
<result column="temperature" property="temperature" jdbcType="DECIMAL"/>
|
||||||
|
<result column="max_tokens" property="maxTokens" jdbcType="INTEGER"/>
|
||||||
|
<result column="top_p" property="topP" jdbcType="DECIMAL"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, name, avatar, system_prompt, model_name, model_provider, temperature,
|
||||||
|
max_tokens, top_p, status, creator, updater, create_time, update_time,
|
||||||
|
delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND name LIKE CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="modelName != null and modelName != ''">
|
||||||
|
AND model_name = #{modelName}
|
||||||
|
</if>
|
||||||
|
<if test="modelProvider != null and modelProvider != ''">
|
||||||
|
AND model_provider = #{modelProvider}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectAiAgentConfigs -->
|
||||||
|
<select id="selectAiAgentConfigs" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_ai_agent_config
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.ai.mapper.AiConversationMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.ai.TbAiConversation">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="user_id" property="userID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="title" property="title" jdbcType="VARCHAR"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="message_count" property="messageCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="last_message_time" property="lastMessageTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, user_id, title, status, message_count, last_message_time,
|
||||||
|
create_time, update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="userID != null and userID != ''">
|
||||||
|
AND user_id = #{userID}
|
||||||
|
</if>
|
||||||
|
<if test="title != null and title != ''">
|
||||||
|
AND title LIKE CONCAT('%', #{title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectAiConversations -->
|
||||||
|
<select id="selectAiConversations" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_ai_conversation
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY last_message_time DESC, create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.ai.mapper.AiKnowledgeMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.ai.TbAiKnowledge">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="title" property="title" jdbcType="VARCHAR"/>
|
||||||
|
<result column="content" property="content" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="source_type" property="sourceType" jdbcType="INTEGER"/>
|
||||||
|
<result column="source_id" property="sourceID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="file_name" property="fileName" jdbcType="VARCHAR"/>
|
||||||
|
<result column="file_path" property="filePath" jdbcType="VARCHAR"/>
|
||||||
|
<result column="category" property="category" jdbcType="VARCHAR"/>
|
||||||
|
<result column="tags" property="tags" jdbcType="VARCHAR"/>
|
||||||
|
<result column="vector_id" property="vectorID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, title, content, source_type, source_id, file_name, file_path,
|
||||||
|
category, tags, vector_id, status, creator, updater, create_time,
|
||||||
|
update_time, delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="title != null and title != ''">
|
||||||
|
AND title LIKE CONCAT('%', #{title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="sourceType != null">
|
||||||
|
AND source_type = #{sourceType}
|
||||||
|
</if>
|
||||||
|
<if test="sourceID != null and sourceID != ''">
|
||||||
|
AND source_id = #{sourceID}
|
||||||
|
</if>
|
||||||
|
<if test="category != null and category != ''">
|
||||||
|
AND category = #{category}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectAiKnowledges -->
|
||||||
|
<select id="selectAiKnowledges" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_ai_knowledge
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.ai.mapper.AiMessageMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.ai.TbAiMessage">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="conversation_id" property="conversationID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="user_id" property="userID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="role" property="role" jdbcType="VARCHAR"/>
|
||||||
|
<result column="content" property="content" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="file_ids" property="fileIDs" jdbcType="VARCHAR"/>
|
||||||
|
<result column="knowledge_ids" property="knowledgeIDs" jdbcType="VARCHAR"/>
|
||||||
|
<result column="token_count" property="tokenCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, conversation_id, user_id, role, content, file_ids, knowledge_ids,
|
||||||
|
token_count, create_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="conversationID != null and conversationID != ''">
|
||||||
|
AND conversation_id = #{conversationID}
|
||||||
|
</if>
|
||||||
|
<if test="userID != null and userID != ''">
|
||||||
|
AND user_id = #{userID}
|
||||||
|
</if>
|
||||||
|
<if test="role != null and role != ''">
|
||||||
|
AND role = #{role}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectAiMessages -->
|
||||||
|
<select id="selectAiMessages" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_ai_message
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.ai.mapper.AiUploadFileMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.ai.TbAiUploadFile">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="user_id" property="userID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="conversation_id" property="conversationID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="file_name" property="fileName" jdbcType="VARCHAR"/>
|
||||||
|
<result column="file_path" property="filePath" jdbcType="VARCHAR"/>
|
||||||
|
<result column="file_size" property="fileSize" jdbcType="BIGINT"/>
|
||||||
|
<result column="file_type" property="fileType" jdbcType="VARCHAR"/>
|
||||||
|
<result column="mime_type" property="mimeType" jdbcType="VARCHAR"/>
|
||||||
|
<result column="extracted_text" property="extractedText" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, user_id, conversation_id, file_name, file_path, file_size,
|
||||||
|
file_type, mime_type, extracted_text, status, create_time, update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="userID != null and userID != ''">
|
||||||
|
AND user_id = #{userID}
|
||||||
|
</if>
|
||||||
|
<if test="conversationID != null and conversationID != ''">
|
||||||
|
AND conversation_id = #{conversationID}
|
||||||
|
</if>
|
||||||
|
<if test="fileName != null and fileName != ''">
|
||||||
|
AND file_name LIKE CONCAT('%', #{fileName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="fileType != null and fileType != ''">
|
||||||
|
AND file_type = #{fileType}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectAiUploadFiles -->
|
||||||
|
<select id="selectAiUploadFiles" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_ai_upload_file
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.ai.mapper.AiUsageStatisticsMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.ai.TbAiUsageStatistics">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="user_id" property="userID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="stat_date" property="statDate" jdbcType="DATE"/>
|
||||||
|
<result column="conversation_count" property="conversationCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="message_count" property="messageCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="total_tokens" property="totalTokens" jdbcType="INTEGER"/>
|
||||||
|
<result column="file_count" property="fileCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, user_id, stat_date, conversation_count, message_count,
|
||||||
|
total_tokens, file_count, create_time, update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="userID != null and userID != ''">
|
||||||
|
AND user_id = #{userID}
|
||||||
|
</if>
|
||||||
|
<if test="statDate != null">
|
||||||
|
AND stat_date = #{statDate}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectAiUsageStatistics -->
|
||||||
|
<select id="selectAiUsageStatistics" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_ai_usage_statistics
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY stat_date DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
23
schoolNewsServ/api/api-ai/pom.xml
Normal file
23
schoolNewsServ/api/api-ai/pom.xml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-ai</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
<name>api-ai</name>
|
||||||
|
<description>智能体API接口定义</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -29,6 +29,22 @@
|
|||||||
<groupId>org.xyzh</groupId>
|
<groupId>org.xyzh</groupId>
|
||||||
<artifactId>api-system</artifactId>
|
<artifactId>api-system</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-news</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-study</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-usercenter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-ai</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
22
schoolNewsServ/api/api-news/pom.xml
Normal file
22
schoolNewsServ/api/api-news/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-news</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>api-news</name>
|
||||||
|
<description>新闻API接口定义</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target></properties>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.xyzh;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello world!");
|
||||||
|
}
|
||||||
|
}
|
||||||
21
schoolNewsServ/api/api-study/pom.xml
Normal file
21
schoolNewsServ/api/api-study/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-study</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.xyzh;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello world!");
|
||||||
|
}
|
||||||
|
}
|
||||||
23
schoolNewsServ/api/api-usercenter/pom.xml
Normal file
23
schoolNewsServ/api/api-usercenter/pom.xml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-usercenter</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
<name>api-usercenter</name>
|
||||||
|
<description>个人中心API接口定义</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -17,6 +17,10 @@
|
|||||||
<module>api-all</module>
|
<module>api-all</module>
|
||||||
<module>api-auth</module>
|
<module>api-auth</module>
|
||||||
<module>api-system</module>
|
<module>api-system</module>
|
||||||
|
<module>api-usercenter</module>
|
||||||
|
<module>api-ai</module>
|
||||||
|
<module>api-study</module>
|
||||||
|
<module>api-news</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -41,6 +45,31 @@
|
|||||||
<artifactId>api-system</artifactId>
|
<artifactId>api-system</artifactId>
|
||||||
<version>${school-news.version}</version>
|
<version>${school-news.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-course</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-study</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-usercenter</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-ai</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-news</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.xyzh.auth.service;
|
package org.xyzh.auth.service;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.xyzh.common.dto.log.TbSysLoginLog;
|
import org.xyzh.common.dto.system.TbSysLoginLog;
|
||||||
import org.xyzh.common.utils.IDUtils;
|
import org.xyzh.common.utils.IDUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import org.xyzh.common.core.domain.LoginDomain;
|
|||||||
import org.xyzh.common.core.domain.ResultDomain;
|
import org.xyzh.common.core.domain.ResultDomain;
|
||||||
import org.xyzh.common.core.enums.UserStatus;
|
import org.xyzh.common.core.enums.UserStatus;
|
||||||
import org.xyzh.common.dto.permission.TbSysPermission;
|
import org.xyzh.common.dto.permission.TbSysPermission;
|
||||||
|
import org.xyzh.common.dto.system.TbSysLoginLog;
|
||||||
import org.xyzh.common.dto.user.TbSysUser;
|
import org.xyzh.common.dto.user.TbSysUser;
|
||||||
import org.xyzh.common.dto.log.TbSysLoginLog;
|
|
||||||
import org.xyzh.common.dto.menu.TbSysMenu;
|
import org.xyzh.common.dto.menu.TbSysMenu;
|
||||||
import org.xyzh.common.exception.auth.AuthException;
|
import org.xyzh.common.exception.auth.AuthException;
|
||||||
import org.xyzh.common.utils.IDUtils;
|
import org.xyzh.common.utils.IDUtils;
|
||||||
|
|||||||
@@ -0,0 +1,171 @@
|
|||||||
|
package org.xyzh.common.dto.ai;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 智能体配置表
|
||||||
|
* @filename TbAiAgentConfig.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbAiAgentConfig extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 智能体名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 智能体头像
|
||||||
|
*/
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 系统提示词
|
||||||
|
*/
|
||||||
|
private String systemPrompt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 模型名称
|
||||||
|
*/
|
||||||
|
private String modelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 模型提供商
|
||||||
|
*/
|
||||||
|
private String modelProvider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 温度值
|
||||||
|
*/
|
||||||
|
private BigDecimal temperature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 最大tokens
|
||||||
|
*/
|
||||||
|
private Integer maxTokens;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Top P值
|
||||||
|
*/
|
||||||
|
private BigDecimal topP;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0禁用 1启用)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAvatar() {
|
||||||
|
return avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvatar(String avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSystemPrompt() {
|
||||||
|
return systemPrompt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSystemPrompt(String systemPrompt) {
|
||||||
|
this.systemPrompt = systemPrompt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModelName() {
|
||||||
|
return modelName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModelName(String modelName) {
|
||||||
|
this.modelName = modelName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModelProvider() {
|
||||||
|
return modelProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModelProvider(String modelProvider) {
|
||||||
|
this.modelProvider = modelProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTemperature() {
|
||||||
|
return temperature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemperature(BigDecimal temperature) {
|
||||||
|
this.temperature = temperature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMaxTokens() {
|
||||||
|
return maxTokens;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxTokens(Integer maxTokens) {
|
||||||
|
this.maxTokens = maxTokens;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTopP() {
|
||||||
|
return topP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTopP(BigDecimal topP) {
|
||||||
|
this.topP = topP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbAiAgentConfig{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", modelName='" + modelName + '\'' +
|
||||||
|
", modelProvider='" + modelProvider + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package org.xyzh.common.dto.ai;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 对话会话表
|
||||||
|
* @filename TbAiConversation.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbAiConversation extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 会话标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0已结束 1进行中)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 消息数量
|
||||||
|
*/
|
||||||
|
private Integer messageCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 最后消息时间
|
||||||
|
*/
|
||||||
|
private Date lastMessageTime;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMessageCount() {
|
||||||
|
return messageCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessageCount(Integer messageCount) {
|
||||||
|
this.messageCount = messageCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getLastMessageTime() {
|
||||||
|
return lastMessageTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastMessageTime(Date lastMessageTime) {
|
||||||
|
this.lastMessageTime = lastMessageTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbAiConversation{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", messageCount=" + messageCount +
|
||||||
|
", lastMessageTime=" + lastMessageTime +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,183 @@
|
|||||||
|
package org.xyzh.common.dto.ai;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 知识库表
|
||||||
|
* @filename TbAiKnowledge.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbAiKnowledge extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 知识标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 知识内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 来源类型(1手动添加 2文件导入 3资源同步)
|
||||||
|
*/
|
||||||
|
private Integer sourceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 来源ID
|
||||||
|
*/
|
||||||
|
private String sourceID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件名
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件路径
|
||||||
|
*/
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 分类
|
||||||
|
*/
|
||||||
|
private String category;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 标签(JSON数组)
|
||||||
|
*/
|
||||||
|
private String tags;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 向量ID(用于向量检索)
|
||||||
|
*/
|
||||||
|
private String vectorID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0禁用 1启用)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSourceType() {
|
||||||
|
return sourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceType(Integer sourceType) {
|
||||||
|
this.sourceType = sourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceID() {
|
||||||
|
return sourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceID(String sourceID) {
|
||||||
|
this.sourceID = sourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileName() {
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileName(String fileName) {
|
||||||
|
this.fileName = fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFilePath() {
|
||||||
|
return filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilePath(String filePath) {
|
||||||
|
this.filePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTags(String tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVectorID() {
|
||||||
|
return vectorID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVectorID(String vectorID) {
|
||||||
|
this.vectorID = vectorID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbAiKnowledge{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", sourceType=" + sourceType +
|
||||||
|
", category='" + category + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
package org.xyzh.common.dto.ai;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 对话消息表
|
||||||
|
* @filename TbAiMessage.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbAiMessage extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 会话ID
|
||||||
|
*/
|
||||||
|
private String conversationID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 角色(user用户 assistant助手 system系统)
|
||||||
|
*/
|
||||||
|
private String role;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 消息内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 关联文件ID(JSON数组)
|
||||||
|
*/
|
||||||
|
private String fileIDs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 引用知识ID(JSON数组)
|
||||||
|
*/
|
||||||
|
private String knowledgeIDs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Token数量
|
||||||
|
*/
|
||||||
|
private Integer tokenCount;
|
||||||
|
|
||||||
|
public String getConversationID() {
|
||||||
|
return conversationID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConversationID(String conversationID) {
|
||||||
|
this.conversationID = conversationID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRole() {
|
||||||
|
return role;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRole(String role) {
|
||||||
|
this.role = role;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileIDs() {
|
||||||
|
return fileIDs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileIDs(String fileIDs) {
|
||||||
|
this.fileIDs = fileIDs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKnowledgeIDs() {
|
||||||
|
return knowledgeIDs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKnowledgeIDs(String knowledgeIDs) {
|
||||||
|
this.knowledgeIDs = knowledgeIDs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTokenCount() {
|
||||||
|
return tokenCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTokenCount(Integer tokenCount) {
|
||||||
|
this.tokenCount = tokenCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbAiMessage{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", conversationID='" + conversationID + '\'' +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", role='" + role + '\'' +
|
||||||
|
", tokenCount=" + tokenCount +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
package org.xyzh.common.dto.ai;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 上传文件表
|
||||||
|
* @filename TbAiUploadFile.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbAiUploadFile extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 会话ID
|
||||||
|
*/
|
||||||
|
private String conversationID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件名
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件路径
|
||||||
|
*/
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件大小(字节)
|
||||||
|
*/
|
||||||
|
private Long fileSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件类型
|
||||||
|
*/
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description MIME类型
|
||||||
|
*/
|
||||||
|
private String mimeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 提取的文本内容
|
||||||
|
*/
|
||||||
|
private String extractedText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0处理中 1已完成 2失败)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConversationID() {
|
||||||
|
return conversationID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConversationID(String conversationID) {
|
||||||
|
this.conversationID = conversationID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileName() {
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileName(String fileName) {
|
||||||
|
this.fileName = fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFilePath() {
|
||||||
|
return filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilePath(String filePath) {
|
||||||
|
this.filePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFileSize() {
|
||||||
|
return fileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileSize(Long fileSize) {
|
||||||
|
this.fileSize = fileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileType() {
|
||||||
|
return fileType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileType(String fileType) {
|
||||||
|
this.fileType = fileType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMimeType() {
|
||||||
|
return mimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMimeType(String mimeType) {
|
||||||
|
this.mimeType = mimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExtractedText() {
|
||||||
|
return extractedText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExtractedText(String extractedText) {
|
||||||
|
this.extractedText = extractedText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbAiUploadFile{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", conversationID='" + conversationID + '\'' +
|
||||||
|
", fileName='" + fileName + '\'' +
|
||||||
|
", fileSize=" + fileSize +
|
||||||
|
", fileType='" + fileType + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
package org.xyzh.common.dto.ai;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description AI使用统计表
|
||||||
|
* @filename TbAiUsageStatistics.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbAiUsageStatistics extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 统计日期
|
||||||
|
*/
|
||||||
|
private Date statDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 会话数量
|
||||||
|
*/
|
||||||
|
private Integer conversationCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 消息数量
|
||||||
|
*/
|
||||||
|
private Integer messageCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 总Token数
|
||||||
|
*/
|
||||||
|
private Integer totalTokens;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 上传文件数
|
||||||
|
*/
|
||||||
|
private Integer fileCount;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStatDate() {
|
||||||
|
return statDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatDate(Date statDate) {
|
||||||
|
this.statDate = statDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getConversationCount() {
|
||||||
|
return conversationCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConversationCount(Integer conversationCount) {
|
||||||
|
this.conversationCount = conversationCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMessageCount() {
|
||||||
|
return messageCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessageCount(Integer messageCount) {
|
||||||
|
this.messageCount = messageCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTotalTokens() {
|
||||||
|
return totalTokens;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalTokens(Integer totalTokens) {
|
||||||
|
this.totalTokens = totalTokens;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFileCount() {
|
||||||
|
return fileCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileCount(Integer fileCount) {
|
||||||
|
this.fileCount = fileCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbAiUsageStatistics{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", statDate=" + statDate +
|
||||||
|
", conversationCount=" + conversationCount +
|
||||||
|
", messageCount=" + messageCount +
|
||||||
|
", totalTokens=" + totalTokens +
|
||||||
|
", fileCount=" + fileCount +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
package org.xyzh.common.dto.permission;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 统一资源权限控制表
|
||||||
|
* @filename TbResourcePermission.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbResourcePermission extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源类型(1资源/新闻 2课程 3课程章节 4学习任务)
|
||||||
|
*/
|
||||||
|
private Integer resourceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源ID
|
||||||
|
*/
|
||||||
|
private String resourceID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 部门ID(NULL表示不限制部门)
|
||||||
|
*/
|
||||||
|
private String deptID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 角色ID(NULL表示不限制角色)
|
||||||
|
*/
|
||||||
|
private String roleID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 读权限(0否 1是)
|
||||||
|
*/
|
||||||
|
private Boolean canRead;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 写权限(0否 1是)
|
||||||
|
*/
|
||||||
|
private Boolean canWrite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 执行权限(0否 1是)
|
||||||
|
*/
|
||||||
|
private Boolean canExecute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public Integer getResourceType() {
|
||||||
|
return resourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceType(Integer resourceType) {
|
||||||
|
this.resourceType = resourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceID() {
|
||||||
|
return resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceID(String resourceID) {
|
||||||
|
this.resourceID = resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptID() {
|
||||||
|
return deptID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptID(String deptID) {
|
||||||
|
this.deptID = deptID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoleID() {
|
||||||
|
return roleID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoleID(String roleID) {
|
||||||
|
this.roleID = roleID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getCanRead() {
|
||||||
|
return canRead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanRead(Boolean canRead) {
|
||||||
|
this.canRead = canRead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getCanWrite() {
|
||||||
|
return canWrite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanWrite(Boolean canWrite) {
|
||||||
|
this.canWrite = canWrite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getCanExecute() {
|
||||||
|
return canExecute;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanExecute(Boolean canExecute) {
|
||||||
|
this.canExecute = canExecute;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbResourcePermission{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", resourceType=" + resourceType +
|
||||||
|
", resourceID='" + resourceID + '\'' +
|
||||||
|
", deptID='" + deptID + '\'' +
|
||||||
|
", roleID='" + roleID + '\'' +
|
||||||
|
", canRead=" + canRead +
|
||||||
|
", canWrite=" + canWrite +
|
||||||
|
", canExecute=" + canExecute +
|
||||||
|
", creator='" + creator + '\'' +
|
||||||
|
", updater='" + updater + '\'' +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
", updateTime=" + getUpdateTime() +
|
||||||
|
", deleted=" + getDeleted() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
package org.xyzh.common.dto.resource;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Banner表
|
||||||
|
* @filename TbBanner.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbBanner extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Banner标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Banner图片URL
|
||||||
|
*/
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 链接类型(1资源 2课程 3外部链接)
|
||||||
|
*/
|
||||||
|
private Integer linkType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 关联ID(资源ID或课程ID)
|
||||||
|
*/
|
||||||
|
private String linkID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 外部链接URL
|
||||||
|
*/
|
||||||
|
private String linkUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 排序号
|
||||||
|
*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0禁用 1启用)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImageUrl() {
|
||||||
|
return imageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageUrl(String imageUrl) {
|
||||||
|
this.imageUrl = imageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLinkType() {
|
||||||
|
return linkType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLinkType(Integer linkType) {
|
||||||
|
this.linkType = linkType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLinkID() {
|
||||||
|
return linkID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLinkID(String linkID) {
|
||||||
|
this.linkID = linkID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLinkUrl() {
|
||||||
|
return linkUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLinkUrl(String linkUrl) {
|
||||||
|
this.linkUrl = linkUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderNum() {
|
||||||
|
return orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNum(Integer orderNum) {
|
||||||
|
this.orderNum = orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbBanner{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", imageUrl='" + imageUrl + '\'' +
|
||||||
|
", linkType=" + linkType +
|
||||||
|
", linkID='" + linkID + '\'' +
|
||||||
|
", linkUrl='" + linkUrl + '\'' +
|
||||||
|
", orderNum=" + orderNum +
|
||||||
|
", status=" + status +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
package org.xyzh.common.dto.resource;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 数据采集配置表
|
||||||
|
* @filename TbDataCollectionConfig.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbDataCollectionConfig extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 配置名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 采集源URL
|
||||||
|
*/
|
||||||
|
private String sourceUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 采集源类型
|
||||||
|
*/
|
||||||
|
private String sourceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 采集频率(daily每天 weekly每周)
|
||||||
|
*/
|
||||||
|
private String frequency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 默认分类ID
|
||||||
|
*/
|
||||||
|
private String categoryID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0禁用 1启用)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 最后采集时间
|
||||||
|
*/
|
||||||
|
private Date lastCollectTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceUrl() {
|
||||||
|
return sourceUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceUrl(String sourceUrl) {
|
||||||
|
this.sourceUrl = sourceUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceType() {
|
||||||
|
return sourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceType(String sourceType) {
|
||||||
|
this.sourceType = sourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFrequency() {
|
||||||
|
return frequency;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFrequency(String frequency) {
|
||||||
|
this.frequency = frequency;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategoryID() {
|
||||||
|
return categoryID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryID(String categoryID) {
|
||||||
|
this.categoryID = categoryID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getLastCollectTime() {
|
||||||
|
return lastCollectTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastCollectTime(Date lastCollectTime) {
|
||||||
|
this.lastCollectTime = lastCollectTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbDataCollectionConfig{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", sourceUrl='" + sourceUrl + '\'' +
|
||||||
|
", sourceType='" + sourceType + '\'' +
|
||||||
|
", frequency='" + frequency + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", lastCollectTime=" + lastCollectTime +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
package org.xyzh.common.dto.resource;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 数据采集记录表
|
||||||
|
* @filename TbDataCollectionLog.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbDataCollectionLog extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 配置ID
|
||||||
|
*/
|
||||||
|
private String configID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 采集数量
|
||||||
|
*/
|
||||||
|
private Integer collectCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 成功数量
|
||||||
|
*/
|
||||||
|
private Integer successCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 失败数量
|
||||||
|
*/
|
||||||
|
private Integer failCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0失败 1成功 2部分成功)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 采集消息
|
||||||
|
*/
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 采集时间
|
||||||
|
*/
|
||||||
|
private Date collectTime;
|
||||||
|
|
||||||
|
public String getConfigID() {
|
||||||
|
return configID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigID(String configID) {
|
||||||
|
this.configID = configID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCollectCount() {
|
||||||
|
return collectCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCollectCount(Integer collectCount) {
|
||||||
|
this.collectCount = collectCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSuccessCount() {
|
||||||
|
return successCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuccessCount(Integer successCount) {
|
||||||
|
this.successCount = successCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFailCount() {
|
||||||
|
return failCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFailCount(Integer failCount) {
|
||||||
|
this.failCount = failCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCollectTime() {
|
||||||
|
return collectTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCollectTime(Date collectTime) {
|
||||||
|
this.collectTime = collectTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbDataCollectionLog{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", configID='" + configID + '\'' +
|
||||||
|
", collectCount=" + collectCount +
|
||||||
|
", successCount=" + successCount +
|
||||||
|
", failCount=" + failCount +
|
||||||
|
", status=" + status +
|
||||||
|
", collectTime=" + collectTime +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,252 @@
|
|||||||
|
package org.xyzh.common.dto.resource;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源表
|
||||||
|
* @filename TbResource.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbResource extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源简介
|
||||||
|
*/
|
||||||
|
private String summary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 封面图片
|
||||||
|
*/
|
||||||
|
private String coverImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 分类ID
|
||||||
|
*/
|
||||||
|
private String categoryID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 作者
|
||||||
|
*/
|
||||||
|
private String author;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 来源
|
||||||
|
*/
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 来源URL
|
||||||
|
*/
|
||||||
|
private String sourceUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 浏览次数
|
||||||
|
*/
|
||||||
|
private Integer viewCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 点赞次数
|
||||||
|
*/
|
||||||
|
private Integer likeCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 收藏次数
|
||||||
|
*/
|
||||||
|
private Integer collectCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0草稿 1已发布 2下架)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 是否推荐
|
||||||
|
*/
|
||||||
|
private Boolean isRecommend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 是否轮播
|
||||||
|
*/
|
||||||
|
private Boolean isBanner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 发布时间
|
||||||
|
*/
|
||||||
|
private Date publishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSummary() {
|
||||||
|
return summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSummary(String summary) {
|
||||||
|
this.summary = summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCoverImage() {
|
||||||
|
return coverImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCoverImage(String coverImage) {
|
||||||
|
this.coverImage = coverImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategoryID() {
|
||||||
|
return categoryID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryID(String categoryID) {
|
||||||
|
this.categoryID = categoryID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuthor() {
|
||||||
|
return author;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuthor(String author) {
|
||||||
|
this.author = author;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(String source) {
|
||||||
|
this.source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceUrl() {
|
||||||
|
return sourceUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceUrl(String sourceUrl) {
|
||||||
|
this.sourceUrl = sourceUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getViewCount() {
|
||||||
|
return viewCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setViewCount(Integer viewCount) {
|
||||||
|
this.viewCount = viewCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLikeCount() {
|
||||||
|
return likeCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLikeCount(Integer likeCount) {
|
||||||
|
this.likeCount = likeCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCollectCount() {
|
||||||
|
return collectCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCollectCount(Integer collectCount) {
|
||||||
|
this.collectCount = collectCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIsRecommend() {
|
||||||
|
return isRecommend;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsRecommend(Boolean isRecommend) {
|
||||||
|
this.isRecommend = isRecommend;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIsBanner() {
|
||||||
|
return isBanner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsBanner(Boolean isBanner) {
|
||||||
|
this.isBanner = isBanner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getPublishTime() {
|
||||||
|
return publishTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublishTime(Date publishTime) {
|
||||||
|
this.publishTime = publishTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbResource{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", categoryID='" + categoryID + '\'' +
|
||||||
|
", author='" + author + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", viewCount=" + viewCount +
|
||||||
|
", likeCount=" + likeCount +
|
||||||
|
", isRecommend=" + isRecommend +
|
||||||
|
", publishTime=" + publishTime +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
package org.xyzh.common.dto.resource;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源分类表
|
||||||
|
* @filename TbResourceCategory.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbResourceCategory extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 分类唯一标识
|
||||||
|
*/
|
||||||
|
private String categoryID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 分类名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 父分类ID
|
||||||
|
*/
|
||||||
|
private String parentID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 分类描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 分类图标
|
||||||
|
*/
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 排序号
|
||||||
|
*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getCategoryID() {
|
||||||
|
return categoryID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryID(String categoryID) {
|
||||||
|
this.categoryID = categoryID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParentID() {
|
||||||
|
return parentID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentID(String parentID) {
|
||||||
|
this.parentID = parentID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon() {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcon(String icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderNum() {
|
||||||
|
return orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNum(Integer orderNum) {
|
||||||
|
this.orderNum = orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbResourceCategory{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", categoryID='" + categoryID + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", parentID='" + parentID + '\'' +
|
||||||
|
", orderNum=" + orderNum +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package org.xyzh.common.dto.resource;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源推荐表
|
||||||
|
* @filename TbResourceRecommend.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbResourceRecommend extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源ID
|
||||||
|
*/
|
||||||
|
private String resourceID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 排序号
|
||||||
|
*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 推荐理由
|
||||||
|
*/
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getResourceID() {
|
||||||
|
return resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceID(String resourceID) {
|
||||||
|
this.resourceID = resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderNum() {
|
||||||
|
return orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNum(Integer orderNum) {
|
||||||
|
this.orderNum = orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReason() {
|
||||||
|
return reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReason(String reason) {
|
||||||
|
this.reason = reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbResourceRecommend{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", resourceID='" + resourceID + '\'' +
|
||||||
|
", orderNum=" + orderNum +
|
||||||
|
", reason='" + reason + '\'' +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package org.xyzh.common.dto.resource;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源标签关联表
|
||||||
|
* @filename TbResourceTag.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbResourceTag extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源ID
|
||||||
|
*/
|
||||||
|
private String resourceID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 标签ID
|
||||||
|
*/
|
||||||
|
private String tagID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
public String getResourceID() {
|
||||||
|
return resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceID(String resourceID) {
|
||||||
|
this.resourceID = resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTagID() {
|
||||||
|
return tagID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTagID(String tagID) {
|
||||||
|
this.tagID = tagID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbResourceTag{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", resourceID='" + resourceID + '\'' +
|
||||||
|
", tagID='" + tagID + '\'' +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package org.xyzh.common.dto.resource;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 标签表
|
||||||
|
* @filename TbTag.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbTag extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 标签唯一标识
|
||||||
|
*/
|
||||||
|
private String tagID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 标签名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 标签颜色
|
||||||
|
*/
|
||||||
|
private String color;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 标签描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getTagID() {
|
||||||
|
return tagID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTagID(String tagID) {
|
||||||
|
this.tagID = tagID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColor() {
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColor(String color) {
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbTag{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", tagID='" + tagID + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", color='" + color + '\'' +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
package org.xyzh.common.dto.study;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程表
|
||||||
|
* @filename TbCourse.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbCourse extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程唯一标识
|
||||||
|
*/
|
||||||
|
private String courseID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程封面图片
|
||||||
|
*/
|
||||||
|
private String coverImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程时长(分钟)
|
||||||
|
*/
|
||||||
|
private Integer duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 授课老师
|
||||||
|
*/
|
||||||
|
private String teacher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0未上线 1已上线 2已下架)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 浏览次数
|
||||||
|
*/
|
||||||
|
private Integer viewCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习人数
|
||||||
|
*/
|
||||||
|
private Integer learnCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 排序号
|
||||||
|
*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getCourseID() {
|
||||||
|
return courseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCourseID(String courseID) {
|
||||||
|
this.courseID = courseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCoverImage() {
|
||||||
|
return coverImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCoverImage(String coverImage) {
|
||||||
|
this.coverImage = coverImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDuration(Integer duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTeacher() {
|
||||||
|
return teacher;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTeacher(String teacher) {
|
||||||
|
this.teacher = teacher;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getViewCount() {
|
||||||
|
return viewCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setViewCount(Integer viewCount) {
|
||||||
|
this.viewCount = viewCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLearnCount() {
|
||||||
|
return learnCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLearnCount(Integer learnCount) {
|
||||||
|
this.learnCount = learnCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderNum() {
|
||||||
|
return orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNum(Integer orderNum) {
|
||||||
|
this.orderNum = orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbCourse{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", courseID='" + courseID + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", coverImage='" + coverImage + '\'' +
|
||||||
|
", teacher='" + teacher + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", viewCount=" + viewCount +
|
||||||
|
", learnCount=" + learnCount +
|
||||||
|
", creator='" + creator + '\'' +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
package org.xyzh.common.dto.study;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程章节表
|
||||||
|
* @filename TbCourseChapter.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbCourseChapter extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程ID
|
||||||
|
*/
|
||||||
|
private String courseID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 章节名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 章节内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 视频URL
|
||||||
|
*/
|
||||||
|
private String videoUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 章节时长(分钟)
|
||||||
|
*/
|
||||||
|
private Integer duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 排序号
|
||||||
|
*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getCourseID() {
|
||||||
|
return courseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCourseID(String courseID) {
|
||||||
|
this.courseID = courseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideoUrl() {
|
||||||
|
return videoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoUrl(String videoUrl) {
|
||||||
|
this.videoUrl = videoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDuration(Integer duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderNum() {
|
||||||
|
return orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNum(Integer orderNum) {
|
||||||
|
this.orderNum = orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbCourseChapter{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", courseID='" + courseID + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", videoUrl='" + videoUrl + '\'' +
|
||||||
|
", duration=" + duration +
|
||||||
|
", orderNum=" + orderNum +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package org.xyzh.common.dto.study;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程标签关联表
|
||||||
|
* @filename TbCourseTag.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbCourseTag extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程ID
|
||||||
|
*/
|
||||||
|
private String courseID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 标签ID
|
||||||
|
*/
|
||||||
|
private String tagID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
public String getCourseID() {
|
||||||
|
return courseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCourseID(String courseID) {
|
||||||
|
this.courseID = courseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTagID() {
|
||||||
|
return tagID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTagID(String tagID) {
|
||||||
|
this.tagID = tagID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbCourseTag{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", courseID='" + courseID + '\'' +
|
||||||
|
", tagID='" + tagID + '\'' +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
package org.xyzh.common.dto.study;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习记录表
|
||||||
|
* @filename TbLearningRecord.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbLearningRecord extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源类型(1资源 2课程 3章节)
|
||||||
|
*/
|
||||||
|
private Integer resourceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源ID
|
||||||
|
*/
|
||||||
|
private String resourceID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务ID
|
||||||
|
*/
|
||||||
|
private String taskID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习时长(秒)
|
||||||
|
*/
|
||||||
|
private Integer duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习进度(0-100)
|
||||||
|
*/
|
||||||
|
private BigDecimal progress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 是否完成
|
||||||
|
*/
|
||||||
|
private Boolean isComplete;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 完成时间
|
||||||
|
*/
|
||||||
|
private Date completeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 最后学习时间
|
||||||
|
*/
|
||||||
|
private Date lastLearnTime;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getResourceType() {
|
||||||
|
return resourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceType(Integer resourceType) {
|
||||||
|
this.resourceType = resourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceID() {
|
||||||
|
return resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceID(String resourceID) {
|
||||||
|
this.resourceID = resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskID() {
|
||||||
|
return taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskID(String taskID) {
|
||||||
|
this.taskID = taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDuration(Integer duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getProgress() {
|
||||||
|
return progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProgress(BigDecimal progress) {
|
||||||
|
this.progress = progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIsComplete() {
|
||||||
|
return isComplete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsComplete(Boolean isComplete) {
|
||||||
|
this.isComplete = isComplete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCompleteTime() {
|
||||||
|
return completeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompleteTime(Date completeTime) {
|
||||||
|
this.completeTime = completeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getLastLearnTime() {
|
||||||
|
return lastLearnTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastLearnTime(Date lastLearnTime) {
|
||||||
|
this.lastLearnTime = lastLearnTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbLearningRecord{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", resourceType=" + resourceType +
|
||||||
|
", resourceID='" + resourceID + '\'' +
|
||||||
|
", taskID='" + taskID + '\'' +
|
||||||
|
", duration=" + duration +
|
||||||
|
", progress=" + progress +
|
||||||
|
", isComplete=" + isComplete +
|
||||||
|
", lastLearnTime=" + lastLearnTime +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
package org.xyzh.common.dto.study;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习统计表
|
||||||
|
* @filename TbLearningStatistics.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbLearningStatistics extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 统计日期
|
||||||
|
*/
|
||||||
|
private Date statDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 总学习时长(秒)
|
||||||
|
*/
|
||||||
|
private Integer totalDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习资源数量
|
||||||
|
*/
|
||||||
|
private Integer resourceCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习课程数量
|
||||||
|
*/
|
||||||
|
private Integer courseCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 完成数量
|
||||||
|
*/
|
||||||
|
private Integer completeCount;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStatDate() {
|
||||||
|
return statDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatDate(Date statDate) {
|
||||||
|
this.statDate = statDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTotalDuration() {
|
||||||
|
return totalDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalDuration(Integer totalDuration) {
|
||||||
|
this.totalDuration = totalDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getResourceCount() {
|
||||||
|
return resourceCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceCount(Integer resourceCount) {
|
||||||
|
this.resourceCount = resourceCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCourseCount() {
|
||||||
|
return courseCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCourseCount(Integer courseCount) {
|
||||||
|
this.courseCount = courseCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCompleteCount() {
|
||||||
|
return completeCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompleteCount(Integer completeCount) {
|
||||||
|
this.completeCount = completeCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbLearningStatistics{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", statDate=" + statDate +
|
||||||
|
", totalDuration=" + totalDuration +
|
||||||
|
", resourceCount=" + resourceCount +
|
||||||
|
", courseCount=" + courseCount +
|
||||||
|
", completeCount=" + completeCount +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
package org.xyzh.common.dto.study;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习任务表
|
||||||
|
* @filename TbLearningTask.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbLearningTask extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务唯一标识
|
||||||
|
*/
|
||||||
|
private String taskID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 结束时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0草稿 1进行中 2已结束)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getTaskID() {
|
||||||
|
return taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskID(String taskID) {
|
||||||
|
this.taskID = taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(Date startTime) {
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(Date endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbLearningTask{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", taskID='" + taskID + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", startTime=" + startTime +
|
||||||
|
", endTime=" + endTime +
|
||||||
|
", status=" + status +
|
||||||
|
", creator='" + creator + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
package org.xyzh.common.dto.study;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务课程关联表
|
||||||
|
* @filename TbTaskCourse.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbTaskCourse extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务ID
|
||||||
|
*/
|
||||||
|
private String taskID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程ID
|
||||||
|
*/
|
||||||
|
private String courseID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 是否必须完成
|
||||||
|
*/
|
||||||
|
private Boolean required;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 排序号
|
||||||
|
*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
public String getTaskID() {
|
||||||
|
return taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskID(String taskID) {
|
||||||
|
this.taskID = taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCourseID() {
|
||||||
|
return courseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCourseID(String courseID) {
|
||||||
|
this.courseID = courseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getRequired() {
|
||||||
|
return required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequired(Boolean required) {
|
||||||
|
this.required = required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderNum() {
|
||||||
|
return orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNum(Integer orderNum) {
|
||||||
|
this.orderNum = orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbTaskCourse{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", taskID='" + taskID + '\'' +
|
||||||
|
", courseID='" + courseID + '\'' +
|
||||||
|
", required=" + required +
|
||||||
|
", orderNum=" + orderNum +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
package org.xyzh.common.dto.study;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务资源关联表
|
||||||
|
* @filename TbTaskResource.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbTaskResource extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务ID
|
||||||
|
*/
|
||||||
|
private String taskID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源ID
|
||||||
|
*/
|
||||||
|
private String resourceID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 是否必须完成
|
||||||
|
*/
|
||||||
|
private Boolean required;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 排序号
|
||||||
|
*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
public String getTaskID() {
|
||||||
|
return taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskID(String taskID) {
|
||||||
|
this.taskID = taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceID() {
|
||||||
|
return resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceID(String resourceID) {
|
||||||
|
this.resourceID = resourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getRequired() {
|
||||||
|
return required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequired(Boolean required) {
|
||||||
|
this.required = required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderNum() {
|
||||||
|
return orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNum(Integer orderNum) {
|
||||||
|
this.orderNum = orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbTaskResource{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", taskID='" + taskID + '\'' +
|
||||||
|
", resourceID='" + resourceID + '\'' +
|
||||||
|
", required=" + required +
|
||||||
|
", orderNum=" + orderNum +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package org.xyzh.common.dto.study;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务用户表
|
||||||
|
* @filename TbTaskUser.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbTaskUser extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务ID
|
||||||
|
*/
|
||||||
|
private String taskID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 部门ID
|
||||||
|
*/
|
||||||
|
private String deptID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 完成状态(0未完成 1已完成)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 完成进度(0-100)
|
||||||
|
*/
|
||||||
|
private BigDecimal progress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 完成时间
|
||||||
|
*/
|
||||||
|
private Date completeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
public String getTaskID() {
|
||||||
|
return taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskID(String taskID) {
|
||||||
|
this.taskID = taskID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeptID() {
|
||||||
|
return deptID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptID(String deptID) {
|
||||||
|
this.deptID = deptID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getProgress() {
|
||||||
|
return progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProgress(BigDecimal progress) {
|
||||||
|
this.progress = progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCompleteTime() {
|
||||||
|
return completeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompleteTime(Date completeTime) {
|
||||||
|
this.completeTime = completeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbTaskUser{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", taskID='" + taskID + '\'' +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", deptID='" + deptID + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", progress=" + progress +
|
||||||
|
", completeTime=" + completeTime +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
package org.xyzh.common.dto.system;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 系统配置表
|
||||||
|
* @filename TbSysConfig.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbSysConfig extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 配置键
|
||||||
|
*/
|
||||||
|
private String configKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 配置值
|
||||||
|
*/
|
||||||
|
private String configValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 配置类型(string/number/boolean/json)
|
||||||
|
*/
|
||||||
|
private String configType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 配置分组
|
||||||
|
*/
|
||||||
|
private String configGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 配置描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 是否系统配置
|
||||||
|
*/
|
||||||
|
private Boolean isSystem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getConfigKey() {
|
||||||
|
return configKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigKey(String configKey) {
|
||||||
|
this.configKey = configKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigValue() {
|
||||||
|
return configValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigValue(String configValue) {
|
||||||
|
this.configValue = configValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigType() {
|
||||||
|
return configType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigType(String configType) {
|
||||||
|
this.configType = configType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigGroup() {
|
||||||
|
return configGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigGroup(String configGroup) {
|
||||||
|
this.configGroup = configGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIsSystem() {
|
||||||
|
return isSystem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsSystem(Boolean isSystem) {
|
||||||
|
this.isSystem = isSystem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbSysConfig{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", configKey='" + configKey + '\'' +
|
||||||
|
", configValue='" + configValue + '\'' +
|
||||||
|
", configType='" + configType + '\'' +
|
||||||
|
", configGroup='" + configGroup + '\'' +
|
||||||
|
", isSystem=" + isSystem +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,171 @@
|
|||||||
|
package org.xyzh.common.dto.system;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 字典数据表
|
||||||
|
* @filename TbSysDictData.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbSysDictData extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 字典类型
|
||||||
|
*/
|
||||||
|
private String dictType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 字典标签
|
||||||
|
*/
|
||||||
|
private String dictLabel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 字典值
|
||||||
|
*/
|
||||||
|
private String dictValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 排序
|
||||||
|
*/
|
||||||
|
private Integer dictSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 样式类
|
||||||
|
*/
|
||||||
|
private String cssClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 列表样式
|
||||||
|
*/
|
||||||
|
private String listClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 是否默认
|
||||||
|
*/
|
||||||
|
private Boolean isDefault;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0禁用 1启用)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getDictType() {
|
||||||
|
return dictType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDictType(String dictType) {
|
||||||
|
this.dictType = dictType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDictLabel() {
|
||||||
|
return dictLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDictLabel(String dictLabel) {
|
||||||
|
this.dictLabel = dictLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDictValue() {
|
||||||
|
return dictValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDictValue(String dictValue) {
|
||||||
|
this.dictValue = dictValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDictSort() {
|
||||||
|
return dictSort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDictSort(Integer dictSort) {
|
||||||
|
this.dictSort = dictSort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCssClass() {
|
||||||
|
return cssClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCssClass(String cssClass) {
|
||||||
|
this.cssClass = cssClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getListClass() {
|
||||||
|
return listClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListClass(String listClass) {
|
||||||
|
this.listClass = listClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIsDefault() {
|
||||||
|
return isDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsDefault(Boolean isDefault) {
|
||||||
|
this.isDefault = isDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbSysDictData{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", dictType='" + dictType + '\'' +
|
||||||
|
", dictLabel='" + dictLabel + '\'' +
|
||||||
|
", dictValue='" + dictValue + '\'' +
|
||||||
|
", dictSort=" + dictSort +
|
||||||
|
", status=" + status +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package org.xyzh.common.dto.system;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 字典类型表
|
||||||
|
* @filename TbSysDictType.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbSysDictType extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 字典类型
|
||||||
|
*/
|
||||||
|
private String dictType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 字典名称
|
||||||
|
*/
|
||||||
|
private String dictName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 状态(0禁用 1启用)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getDictType() {
|
||||||
|
return dictType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDictType(String dictType) {
|
||||||
|
this.dictType = dictType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDictName() {
|
||||||
|
return dictName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDictName(String dictName) {
|
||||||
|
this.dictName = dictName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbSysDictType{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", dictType='" + dictType + '\'' +
|
||||||
|
", dictName='" + dictName + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
package org.xyzh.common.dto.system;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件上传记录表
|
||||||
|
* @filename TbSysFile.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbSysFile extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件名
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 原始文件名
|
||||||
|
*/
|
||||||
|
private String originalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件路径
|
||||||
|
*/
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 访问URL
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件大小(字节)
|
||||||
|
*/
|
||||||
|
private Long fileSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 文件类型
|
||||||
|
*/
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description MIME类型
|
||||||
|
*/
|
||||||
|
private String mimeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 所属模块
|
||||||
|
*/
|
||||||
|
private String module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 业务ID
|
||||||
|
*/
|
||||||
|
private String businessID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 上传者
|
||||||
|
*/
|
||||||
|
private String uploader;
|
||||||
|
|
||||||
|
public String getFileName() {
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileName(String fileName) {
|
||||||
|
this.fileName = fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOriginalName() {
|
||||||
|
return originalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalName(String originalName) {
|
||||||
|
this.originalName = originalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFilePath() {
|
||||||
|
return filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilePath(String filePath) {
|
||||||
|
this.filePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileUrl() {
|
||||||
|
return fileUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileUrl(String fileUrl) {
|
||||||
|
this.fileUrl = fileUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFileSize() {
|
||||||
|
return fileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileSize(Long fileSize) {
|
||||||
|
this.fileSize = fileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileType() {
|
||||||
|
return fileType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileType(String fileType) {
|
||||||
|
this.fileType = fileType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMimeType() {
|
||||||
|
return mimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMimeType(String mimeType) {
|
||||||
|
this.mimeType = mimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModule() {
|
||||||
|
return module;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModule(String module) {
|
||||||
|
this.module = module;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBusinessID() {
|
||||||
|
return businessID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusinessID(String businessID) {
|
||||||
|
this.businessID = businessID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUploader() {
|
||||||
|
return uploader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUploader(String uploader) {
|
||||||
|
this.uploader = uploader;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbSysFile{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", fileName='" + fileName + '\'' +
|
||||||
|
", originalName='" + originalName + '\'' +
|
||||||
|
", fileSize=" + fileSize +
|
||||||
|
", fileType='" + fileType + '\'' +
|
||||||
|
", module='" + module + '\'' +
|
||||||
|
", businessID='" + businessID + '\'' +
|
||||||
|
", uploader='" + uploader + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.xyzh.common.dto.log;
|
package org.xyzh.common.dto.system;
|
||||||
import org.xyzh.common.dto.BaseDTO;
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
package org.xyzh.common.dto.system;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 系统通知表
|
||||||
|
* @filename TbSysNotification.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbSysNotification extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 通知类型(1系统通知 2任务通知 3成就通知)
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 通知标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 通知内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 链接类型(1资源 2课程 3任务)
|
||||||
|
*/
|
||||||
|
private Integer linkType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 链接ID
|
||||||
|
*/
|
||||||
|
private String linkID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 是否已读
|
||||||
|
*/
|
||||||
|
private Boolean isRead;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 阅读时间
|
||||||
|
*/
|
||||||
|
private Date readTime;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLinkType() {
|
||||||
|
return linkType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLinkType(Integer linkType) {
|
||||||
|
this.linkType = linkType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLinkID() {
|
||||||
|
return linkID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLinkID(String linkID) {
|
||||||
|
this.linkID = linkID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIsRead() {
|
||||||
|
return isRead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsRead(Boolean isRead) {
|
||||||
|
this.isRead = isRead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getReadTime() {
|
||||||
|
return readTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReadTime(Date readTime) {
|
||||||
|
this.readTime = readTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbSysNotification{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", type=" + type +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", linkType=" + linkType +
|
||||||
|
", linkID='" + linkID + '\'' +
|
||||||
|
", isRead=" + isRead +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,237 @@
|
|||||||
|
package org.xyzh.common.dto.system;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 操作日志表
|
||||||
|
* @filename TbSysOperationLog.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbSysOperationLog extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户名
|
||||||
|
*/
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 操作模块
|
||||||
|
*/
|
||||||
|
private String module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 操作类型
|
||||||
|
*/
|
||||||
|
private String operation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 请求方法
|
||||||
|
*/
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 请求URL
|
||||||
|
*/
|
||||||
|
private String requestUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 请求方式(GET/POST等)
|
||||||
|
*/
|
||||||
|
private String requestMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 请求参数
|
||||||
|
*/
|
||||||
|
private String requestParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 响应数据
|
||||||
|
*/
|
||||||
|
private String responseData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description IP地址
|
||||||
|
*/
|
||||||
|
private String ipAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description IP来源
|
||||||
|
*/
|
||||||
|
private String ipSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 浏览器
|
||||||
|
*/
|
||||||
|
private String browser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 操作系统
|
||||||
|
*/
|
||||||
|
private String os;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 操作状态(0失败 1成功)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 错误消息
|
||||||
|
*/
|
||||||
|
private String errorMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 执行时长(毫秒)
|
||||||
|
*/
|
||||||
|
private Integer executeTime;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModule() {
|
||||||
|
return module;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModule(String module) {
|
||||||
|
this.module = module;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOperation() {
|
||||||
|
return operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperation(String operation) {
|
||||||
|
this.operation = operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMethod() {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMethod(String method) {
|
||||||
|
this.method = method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRequestUrl() {
|
||||||
|
return requestUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequestUrl(String requestUrl) {
|
||||||
|
this.requestUrl = requestUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRequestMethod() {
|
||||||
|
return requestMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequestMethod(String requestMethod) {
|
||||||
|
this.requestMethod = requestMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRequestParams() {
|
||||||
|
return requestParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequestParams(String requestParams) {
|
||||||
|
this.requestParams = requestParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResponseData() {
|
||||||
|
return responseData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResponseData(String responseData) {
|
||||||
|
this.responseData = responseData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIpAddress() {
|
||||||
|
return ipAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIpAddress(String ipAddress) {
|
||||||
|
this.ipAddress = ipAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIpSource() {
|
||||||
|
return ipSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIpSource(String ipSource) {
|
||||||
|
this.ipSource = ipSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBrowser() {
|
||||||
|
return browser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrowser(String browser) {
|
||||||
|
this.browser = browser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOs() {
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOs(String os) {
|
||||||
|
this.os = os;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setErrorMessage(String errorMessage) {
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getExecuteTime() {
|
||||||
|
return executeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExecuteTime(Integer executeTime) {
|
||||||
|
this.executeTime = executeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbSysOperationLog{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", username='" + username + '\'' +
|
||||||
|
", module='" + module + '\'' +
|
||||||
|
", operation='" + operation + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", executeTime=" + executeTime +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package org.xyzh.common.dto.system;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 系统访问统计表
|
||||||
|
* @filename TbSysVisitStatistics.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbSysVisitStatistics extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 统计日期
|
||||||
|
*/
|
||||||
|
private Date statDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 总访问量
|
||||||
|
*/
|
||||||
|
private Integer totalVisits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 独立访客数
|
||||||
|
*/
|
||||||
|
private Integer uniqueVisitors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 新增用户数
|
||||||
|
*/
|
||||||
|
private Integer newUsers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 活跃用户数
|
||||||
|
*/
|
||||||
|
private Integer activeUsers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 页面浏览量
|
||||||
|
*/
|
||||||
|
private Integer pageViews;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 平均访问时长(秒)
|
||||||
|
*/
|
||||||
|
private Integer avgVisitDuration;
|
||||||
|
|
||||||
|
public Date getStatDate() {
|
||||||
|
return statDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatDate(Date statDate) {
|
||||||
|
this.statDate = statDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTotalVisits() {
|
||||||
|
return totalVisits;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalVisits(Integer totalVisits) {
|
||||||
|
this.totalVisits = totalVisits;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUniqueVisitors() {
|
||||||
|
return uniqueVisitors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUniqueVisitors(Integer uniqueVisitors) {
|
||||||
|
this.uniqueVisitors = uniqueVisitors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNewUsers() {
|
||||||
|
return newUsers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewUsers(Integer newUsers) {
|
||||||
|
this.newUsers = newUsers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getActiveUsers() {
|
||||||
|
return activeUsers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActiveUsers(Integer activeUsers) {
|
||||||
|
this.activeUsers = activeUsers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPageViews() {
|
||||||
|
return pageViews;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageViews(Integer pageViews) {
|
||||||
|
this.pageViews = pageViews;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAvgVisitDuration() {
|
||||||
|
return avgVisitDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvgVisitDuration(Integer avgVisitDuration) {
|
||||||
|
this.avgVisitDuration = avgVisitDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbSysVisitStatistics{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", statDate=" + statDate +
|
||||||
|
", totalVisits=" + totalVisits +
|
||||||
|
", uniqueVisitors=" + uniqueVisitors +
|
||||||
|
", newUsers=" + newUsers +
|
||||||
|
", activeUsers=" + activeUsers +
|
||||||
|
", pageViews=" + pageViews +
|
||||||
|
", avgVisitDuration=" + avgVisitDuration +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,186 @@
|
|||||||
|
package org.xyzh.common.dto.usercenter;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 成就表
|
||||||
|
* @filename TbAchievement.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbAchievement extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 成就唯一标识
|
||||||
|
*/
|
||||||
|
private String achievementID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 成就名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 成就描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 成就图标
|
||||||
|
*/
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 成就类型(1勋章 2等级)
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 成就等级
|
||||||
|
*/
|
||||||
|
private Integer level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 获取条件类型(1学习时长 2资源数量 3课程数量 4连续学习天数)
|
||||||
|
*/
|
||||||
|
private Integer conditionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 条件值
|
||||||
|
*/
|
||||||
|
private Integer conditionValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 获得积分
|
||||||
|
*/
|
||||||
|
private Integer points;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 排序号
|
||||||
|
*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
public String getAchievementID() {
|
||||||
|
return achievementID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAchievementID(String achievementID) {
|
||||||
|
this.achievementID = achievementID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon() {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcon(String icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(Integer level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getConditionType() {
|
||||||
|
return conditionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConditionType(Integer conditionType) {
|
||||||
|
this.conditionType = conditionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getConditionValue() {
|
||||||
|
return conditionValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConditionValue(Integer conditionValue) {
|
||||||
|
this.conditionValue = conditionValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPoints() {
|
||||||
|
return points;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPoints(Integer points) {
|
||||||
|
this.points = points;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderNum() {
|
||||||
|
return orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNum(Integer orderNum) {
|
||||||
|
this.orderNum = orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(String updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbAchievement{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", achievementID='" + achievementID + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", type=" + type +
|
||||||
|
", level=" + level +
|
||||||
|
", conditionType=" + conditionType +
|
||||||
|
", conditionValue=" + conditionValue +
|
||||||
|
", points=" + points +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package org.xyzh.common.dto.usercenter;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 积分记录表
|
||||||
|
* @filename TbPointsRecord.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbPointsRecord extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 积分变动
|
||||||
|
*/
|
||||||
|
private Integer points;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 类型(1获得 2消费)
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 来源类型(1学习资源 2学习课程 3完成任务 4获得成就)
|
||||||
|
*/
|
||||||
|
private Integer sourceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 来源ID
|
||||||
|
*/
|
||||||
|
private String sourceID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 说明
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPoints() {
|
||||||
|
return points;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPoints(Integer points) {
|
||||||
|
this.points = points;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSourceType() {
|
||||||
|
return sourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceType(Integer sourceType) {
|
||||||
|
this.sourceType = sourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceID() {
|
||||||
|
return sourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceID(String sourceID) {
|
||||||
|
this.sourceID = sourceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbPointsRecord{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", points=" + points +
|
||||||
|
", type=" + type +
|
||||||
|
", sourceType=" + sourceType +
|
||||||
|
", sourceID='" + sourceID + '\'' +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package org.xyzh.common.dto.usercenter;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户成就表
|
||||||
|
* @filename TbUserAchievement.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbUserAchievement extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 成就ID
|
||||||
|
*/
|
||||||
|
private String achievementID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 获得时间
|
||||||
|
*/
|
||||||
|
private Date obtainTime;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAchievementID() {
|
||||||
|
return achievementID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAchievementID(String achievementID) {
|
||||||
|
this.achievementID = achievementID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getObtainTime() {
|
||||||
|
return obtainTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setObtainTime(Date obtainTime) {
|
||||||
|
this.obtainTime = obtainTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbUserAchievement{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", achievementID='" + achievementID + '\'' +
|
||||||
|
", obtainTime=" + obtainTime +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package org.xyzh.common.dto.usercenter;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户浏览记录表
|
||||||
|
* @filename TbUserBrowseRecord.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbUserBrowseRecord extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 浏览类型(1资源 2课程)
|
||||||
|
*/
|
||||||
|
private Integer browseType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 浏览对象ID
|
||||||
|
*/
|
||||||
|
private String browseID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 浏览时间
|
||||||
|
*/
|
||||||
|
private Date browseTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description IP地址
|
||||||
|
*/
|
||||||
|
private String ipAddress;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBrowseType() {
|
||||||
|
return browseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrowseType(Integer browseType) {
|
||||||
|
this.browseType = browseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBrowseID() {
|
||||||
|
return browseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrowseID(String browseID) {
|
||||||
|
this.browseID = browseID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getBrowseTime() {
|
||||||
|
return browseTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrowseTime(Date browseTime) {
|
||||||
|
this.browseTime = browseTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIpAddress() {
|
||||||
|
return ipAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIpAddress(String ipAddress) {
|
||||||
|
this.ipAddress = ipAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbUserBrowseRecord{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", browseType=" + browseType +
|
||||||
|
", browseID='" + browseID + '\'' +
|
||||||
|
", browseTime=" + browseTime +
|
||||||
|
", ipAddress='" + ipAddress + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package org.xyzh.common.dto.usercenter;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户收藏表
|
||||||
|
* @filename TbUserCollection.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbUserCollection extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 收藏类型(1资源 2课程)
|
||||||
|
*/
|
||||||
|
private Integer collectionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 收藏对象ID
|
||||||
|
*/
|
||||||
|
private String collectionID;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCollectionType() {
|
||||||
|
return collectionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCollectionType(Integer collectionType) {
|
||||||
|
this.collectionType = collectionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCollectionID() {
|
||||||
|
return collectionID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCollectionID(String collectionID) {
|
||||||
|
this.collectionID = collectionID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbUserCollection{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", collectionType=" + collectionType +
|
||||||
|
", collectionID='" + collectionID + '\'' +
|
||||||
|
", createTime=" + getCreateTime() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package org.xyzh.common.dto.usercenter;
|
||||||
|
|
||||||
|
import org.xyzh.common.dto.BaseDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户积分表
|
||||||
|
* @filename TbUserPoints.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
public class TbUserPoints extends BaseDTO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户ID
|
||||||
|
*/
|
||||||
|
private String userID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 总积分
|
||||||
|
*/
|
||||||
|
private Integer totalPoints;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 当前积分
|
||||||
|
*/
|
||||||
|
private Integer currentPoints;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 用户等级
|
||||||
|
*/
|
||||||
|
private Integer level;
|
||||||
|
|
||||||
|
public String getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(String userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTotalPoints() {
|
||||||
|
return totalPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalPoints(Integer totalPoints) {
|
||||||
|
this.totalPoints = totalPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCurrentPoints() {
|
||||||
|
return currentPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrentPoints(Integer currentPoints) {
|
||||||
|
this.currentPoints = currentPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(Integer level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TbUserPoints{" +
|
||||||
|
"id=" + getID() +
|
||||||
|
", userID='" + userID + '\'' +
|
||||||
|
", totalPoints=" + totalPoints +
|
||||||
|
", currentPoints=" + currentPoints +
|
||||||
|
", level=" + level +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,4 +18,52 @@
|
|||||||
<maven.compiler.target>21</maven.compiler.target>
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-news</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>common-all</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-logging</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zaxxer</groupId>
|
||||||
|
<artifactId>HikariCP</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.news.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.resource.TbBanner;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Banner数据访问层
|
||||||
|
* @filename BannerMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface BannerMapper extends BaseMapper<TbBanner> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询Banner列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbBanner> Banner列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbBanner> selectBanners(TbBanner filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.news.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.resource.TbDataCollectionConfig;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 数据采集配置数据访问层
|
||||||
|
* @filename DataCollectionConfigMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface DataCollectionConfigMapper extends BaseMapper<TbDataCollectionConfig> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询数据采集配置列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbDataCollectionConfig> 数据采集配置列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbDataCollectionConfig> selectDataCollectionConfigs(TbDataCollectionConfig filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.news.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.resource.TbDataCollectionLog;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 数据采集记录数据访问层
|
||||||
|
* @filename DataCollectionLogMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface DataCollectionLogMapper extends BaseMapper<TbDataCollectionLog> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询数据采集记录列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbDataCollectionLog> 数据采集记录列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbDataCollectionLog> selectDataCollectionLogs(TbDataCollectionLog filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.news.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.resource.TbResourceCategory;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源分类数据访问层
|
||||||
|
* @filename ResourceCategoryMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ResourceCategoryMapper extends BaseMapper<TbResourceCategory> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询资源分类列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbResourceCategory> 资源分类列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbResourceCategory> selectResourceCategories(TbResourceCategory filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.news.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.resource.TbResource;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源数据访问层
|
||||||
|
* @filename ResourceMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ResourceMapper extends BaseMapper<TbResource> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询资源列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbResource> 资源列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbResource> selectResources(TbResource filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.news.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.resource.TbResourceRecommend;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源推荐数据访问层
|
||||||
|
* @filename ResourceRecommendMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ResourceRecommendMapper extends BaseMapper<TbResourceRecommend> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询资源推荐列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbResourceRecommend> 资源推荐列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbResourceRecommend> selectResourceRecommends(TbResourceRecommend filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.news.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.resource.TbResourceTag;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资源标签关联数据访问层
|
||||||
|
* @filename ResourceTagMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ResourceTagMapper extends BaseMapper<TbResourceTag> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询资源标签关联列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbResourceTag> 资源标签关联列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbResourceTag> selectResourceTags(TbResourceTag filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.news.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.resource.TbTag;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 标签数据访问层
|
||||||
|
* @filename TagMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TagMapper extends BaseMapper<TbTag> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询标签列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbTag> 标签列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbTag> selectTags(TbTag filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.news.mapper.BannerMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbBanner">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="title" property="title" jdbcType="VARCHAR"/>
|
||||||
|
<result column="image_url" property="imageUrl" jdbcType="VARCHAR"/>
|
||||||
|
<result column="link_type" property="linkType" jdbcType="INTEGER"/>
|
||||||
|
<result column="link_id" property="linkID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="link_url" property="linkUrl" jdbcType="VARCHAR"/>
|
||||||
|
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, title, image_url, link_type, link_id, link_url, order_num, status,
|
||||||
|
creator, updater, create_time, update_time, delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="title != null and title != ''">
|
||||||
|
AND title LIKE CONCAT('%', #{title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="linkType != null">
|
||||||
|
AND link_type = #{linkType}
|
||||||
|
</if>
|
||||||
|
<if test="linkID != null and linkID != ''">
|
||||||
|
AND link_id = #{linkID}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectBanners -->
|
||||||
|
<select id="selectBanners" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_banner
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY order_num ASC, create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.news.mapper.DataCollectionConfigMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbDataCollectionConfig">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||||
|
<result column="source_url" property="sourceUrl" jdbcType="VARCHAR"/>
|
||||||
|
<result column="source_type" property="sourceType" jdbcType="VARCHAR"/>
|
||||||
|
<result column="frequency" property="frequency" jdbcType="VARCHAR"/>
|
||||||
|
<result column="category_id" property="categoryID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="last_collect_time" property="lastCollectTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, name, source_url, source_type, frequency, category_id, status,
|
||||||
|
last_collect_time, creator, updater, create_time, update_time,
|
||||||
|
delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND name LIKE CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="sourceType != null and sourceType != ''">
|
||||||
|
AND source_type = #{sourceType}
|
||||||
|
</if>
|
||||||
|
<if test="frequency != null and frequency != ''">
|
||||||
|
AND frequency = #{frequency}
|
||||||
|
</if>
|
||||||
|
<if test="categoryID != null and categoryID != ''">
|
||||||
|
AND category_id = #{categoryID}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectDataCollectionConfigs -->
|
||||||
|
<select id="selectDataCollectionConfigs" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_data_collection_config
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.news.mapper.DataCollectionLogMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbDataCollectionLog">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="config_id" property="configID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="collect_count" property="collectCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="success_count" property="successCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="fail_count" property="failCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="message" property="message" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="collect_time" property="collectTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, config_id, collect_count, success_count, fail_count, status,
|
||||||
|
message, collect_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="configID != null and configID != ''">
|
||||||
|
AND config_id = #{configID}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectDataCollectionLogs -->
|
||||||
|
<select id="selectDataCollectionLogs" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_data_collection_log
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY collect_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.news.mapper.ResourceCategoryMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbResourceCategory">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="category_id" property="categoryID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||||
|
<result column="parent_id" property="parentID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="description" property="description" jdbcType="VARCHAR"/>
|
||||||
|
<result column="icon" property="icon" jdbcType="VARCHAR"/>
|
||||||
|
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, category_id, name, parent_id, description, icon, order_num,
|
||||||
|
creator, updater, create_time, update_time, delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="categoryID != null and categoryID != ''">
|
||||||
|
AND category_id = #{categoryID}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND name LIKE CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="parentID != null and parentID != ''">
|
||||||
|
AND parent_id = #{parentID}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectResourceCategories -->
|
||||||
|
<select id="selectResourceCategories" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_resource_category
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY order_num ASC, create_time ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.news.mapper.ResourceMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbResource">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="title" property="title" jdbcType="VARCHAR"/>
|
||||||
|
<result column="content" property="content" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="summary" property="summary" jdbcType="VARCHAR"/>
|
||||||
|
<result column="cover_image" property="coverImage" jdbcType="VARCHAR"/>
|
||||||
|
<result column="category_id" property="categoryID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="author" property="author" jdbcType="VARCHAR"/>
|
||||||
|
<result column="source" property="source" jdbcType="VARCHAR"/>
|
||||||
|
<result column="source_url" property="sourceUrl" jdbcType="VARCHAR"/>
|
||||||
|
<result column="view_count" property="viewCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="like_count" property="likeCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="collect_count" property="collectCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="is_recommend" property="isRecommend" jdbcType="BOOLEAN"/>
|
||||||
|
<result column="is_banner" property="isBanner" jdbcType="BOOLEAN"/>
|
||||||
|
<result column="publish_time" property="publishTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, title, content, summary, cover_image, category_id, author, source,
|
||||||
|
source_url, view_count, like_count, collect_count, status, is_recommend,
|
||||||
|
is_banner, publish_time, creator, updater, create_time, update_time,
|
||||||
|
delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="title != null and title != ''">
|
||||||
|
AND title LIKE CONCAT('%', #{title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="categoryID != null and categoryID != ''">
|
||||||
|
AND category_id = #{categoryID}
|
||||||
|
</if>
|
||||||
|
<if test="author != null and author != ''">
|
||||||
|
AND author LIKE CONCAT('%', #{author}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
<if test="isRecommend != null">
|
||||||
|
AND is_recommend = #{isRecommend}
|
||||||
|
</if>
|
||||||
|
<if test="isBanner != null">
|
||||||
|
AND is_banner = #{isBanner}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectResources -->
|
||||||
|
<select id="selectResources" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_resource
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY publish_time DESC, create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.news.mapper.ResourceRecommendMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbResourceRecommend">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="resource_id" property="resourceID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||||
|
<result column="reason" property="reason" jdbcType="VARCHAR"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, resource_id, order_num, reason, creator, updater, create_time,
|
||||||
|
update_time, delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="resourceID != null and resourceID != ''">
|
||||||
|
AND resource_id = #{resourceID}
|
||||||
|
</if>
|
||||||
|
<if test="reason != null and reason != ''">
|
||||||
|
AND reason LIKE CONCAT('%', #{reason}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectResourceRecommends -->
|
||||||
|
<select id="selectResourceRecommends" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_resource_recommend
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY order_num ASC, create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.news.mapper.ResourceTagMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbResourceTag">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="resource_id" property="resourceID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="tag_id" property="tagID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, resource_id, tag_id, creator, create_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="resourceID != null and resourceID != ''">
|
||||||
|
AND resource_id = #{resourceID}
|
||||||
|
</if>
|
||||||
|
<if test="tagID != null and tagID != ''">
|
||||||
|
AND tag_id = #{tagID}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectResourceTags -->
|
||||||
|
<select id="selectResourceTags" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_resource_tag
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
51
schoolNewsServ/news/src/main/resources/mapper/TagMapper.xml
Normal file
51
schoolNewsServ/news/src/main/resources/mapper/TagMapper.xml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.news.mapper.TagMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbTag">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="tag_id" property="tagID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||||
|
<result column="color" property="color" jdbcType="VARCHAR"/>
|
||||||
|
<result column="description" property="description" jdbcType="VARCHAR"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, tag_id, name, color, description, creator, updater, create_time,
|
||||||
|
update_time, delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="tagID != null and tagID != ''">
|
||||||
|
AND tag_id = #{tagID}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND name LIKE CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="color != null and color != ''">
|
||||||
|
AND color = #{color}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectTags -->
|
||||||
|
<select id="selectTags" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_tag
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -15,6 +15,9 @@
|
|||||||
<module>common</module>
|
<module>common</module>
|
||||||
<module>admin</module>
|
<module>admin</module>
|
||||||
<module>news</module>
|
<module>news</module>
|
||||||
|
<module>study</module>
|
||||||
|
<module>usercenter</module>
|
||||||
|
<module>ai</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -40,6 +43,9 @@
|
|||||||
<!-- JWT 依赖版本 -->
|
<!-- JWT 依赖版本 -->
|
||||||
<jjwt.version>0.11.5</jjwt.version>
|
<jjwt.version>0.11.5</jjwt.version>
|
||||||
|
|
||||||
|
<!-- BouncyCastle 依赖版本 -->
|
||||||
|
<bouncycastle.version>1.82</bouncycastle.version>
|
||||||
|
|
||||||
<!-- Log4j2 依赖版本 -->
|
<!-- Log4j2 依赖版本 -->
|
||||||
<log4j2.version>2.23.1</log4j2.version>
|
<log4j2.version>2.23.1</log4j2.version>
|
||||||
|
|
||||||
@@ -77,6 +83,31 @@
|
|||||||
<artifactId>system</artifactId>
|
<artifactId>system</artifactId>
|
||||||
<version>${school-news.version}</version>
|
<version>${school-news.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>news</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>course</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>study</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>usercenter</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>ai</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
<!-- Spring相关依赖 -->
|
<!-- Spring相关依赖 -->
|
||||||
<!-- 覆盖SpringFramework的依赖配置-->
|
<!-- 覆盖SpringFramework的依赖配置-->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
86
schoolNewsServ/study/pom.xml
Normal file
86
schoolNewsServ/study/pom.xml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>school-news</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>study</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>study</name>
|
||||||
|
<description>学习管理模块</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>api-study</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xyzh</groupId>
|
||||||
|
<artifactId>common-all</artifactId>
|
||||||
|
<version>${school-news.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-logging</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zaxxer</groupId>
|
||||||
|
<artifactId>HikariCP</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<!-- 禁用 Spring Boot 插件,因为 study 是 admin 的一部分 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.study.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.study.TbCourseChapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程章节数据访问层
|
||||||
|
* @filename CourseChapterMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CourseChapterMapper extends BaseMapper<TbCourseChapter> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询课程章节列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbCourseChapter> 课程章节列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbCourseChapter> selectCourseChapters(TbCourseChapter filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.study.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.study.TbCourse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程数据访问层
|
||||||
|
* @filename CourseMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CourseMapper extends BaseMapper<TbCourse> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询课程列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbCourse> 课程列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbCourse> selectCourses(TbCourse filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.study.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.study.TbCourseTag;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 课程标签关联数据访问层
|
||||||
|
* @filename CourseTagMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CourseTagMapper extends BaseMapper<TbCourseTag> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询课程标签关联列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbCourseTag> 课程标签关联列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbCourseTag> selectCourseTags(TbCourseTag filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.study.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.study.TbLearningRecord;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习记录数据访问层
|
||||||
|
* @filename LearningRecordMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LearningRecordMapper extends BaseMapper<TbLearningRecord> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询学习记录列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbLearningRecord> 学习记录列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbLearningRecord> selectLearningRecords(TbLearningRecord filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.study.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.study.TbLearningStatistics;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习统计数据访问层
|
||||||
|
* @filename LearningStatisticsMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LearningStatisticsMapper extends BaseMapper<TbLearningStatistics> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询学习统计列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbLearningStatistics> 学习统计列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbLearningStatistics> selectLearningStatistics(TbLearningStatistics filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.study.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.study.TbLearningTask;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 学习任务数据访问层
|
||||||
|
* @filename LearningTaskMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LearningTaskMapper extends BaseMapper<TbLearningTask> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询学习任务列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbLearningTask> 学习任务列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbLearningTask> selectLearningTasks(TbLearningTask filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.study.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.study.TbTaskCourse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务课程关联数据访问层
|
||||||
|
* @filename TaskCourseMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TaskCourseMapper extends BaseMapper<TbTaskCourse> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询任务课程关联列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbTaskCourse> 任务课程关联列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbTaskCourse> selectTaskCourses(TbTaskCourse filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.study.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.study.TbTaskResource;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务资源关联数据访问层
|
||||||
|
* @filename TaskResourceMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TaskResourceMapper extends BaseMapper<TbTaskResource> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询任务资源关联列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbTaskResource> 任务资源关联列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbTaskResource> selectTaskResources(TbTaskResource filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.xyzh.study.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.xyzh.common.dto.study.TbTaskUser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 任务用户数据访问层
|
||||||
|
* @filename TaskUserMapper.java
|
||||||
|
* @author system
|
||||||
|
* @copyright xyzh
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TaskUserMapper extends BaseMapper<TbTaskUser> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 查询任务用户列表
|
||||||
|
* @param filter 过滤条件
|
||||||
|
* @return List<TbTaskUser> 任务用户列表
|
||||||
|
* @author system
|
||||||
|
* @since 2025-10-15
|
||||||
|
*/
|
||||||
|
List<TbTaskUser> selectTaskUsers(TbTaskUser filter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.study.mapper.CourseChapterMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.study.TbCourseChapter">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="course_id" property="courseID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||||
|
<result column="content" property="content" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="video_url" property="videoUrl" jdbcType="VARCHAR"/>
|
||||||
|
<result column="duration" property="duration" jdbcType="INTEGER"/>
|
||||||
|
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, course_id, name, content, video_url, duration, order_num,
|
||||||
|
creator, updater, create_time, update_time, delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="courseID != null and courseID != ''">
|
||||||
|
AND course_id = #{courseID}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND name LIKE CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectCourseChapters -->
|
||||||
|
<select id="selectCourseChapters" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_course_chapter
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY order_num ASC, create_time ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.study.mapper.CourseMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.study.TbCourse">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="course_id" property="courseID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||||
|
<result column="cover_image" property="coverImage" jdbcType="VARCHAR"/>
|
||||||
|
<result column="description" property="description" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="content" property="content" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="duration" property="duration" jdbcType="INTEGER"/>
|
||||||
|
<result column="teacher" property="teacher" jdbcType="VARCHAR"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="view_count" property="viewCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="learn_count" property="learnCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, course_id, name, cover_image, description, content, duration,
|
||||||
|
teacher, status, view_count, learn_count, order_num, creator, updater,
|
||||||
|
create_time, update_time, delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="courseID != null and courseID != ''">
|
||||||
|
AND course_id = #{courseID}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND name LIKE CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="teacher != null and teacher != ''">
|
||||||
|
AND teacher LIKE CONCAT('%', #{teacher}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectCourses -->
|
||||||
|
<select id="selectCourses" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_course
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY order_num ASC, create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.study.mapper.CourseTagMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.study.TbCourseTag">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="course_id" property="courseID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="tag_id" property="tagID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, course_id, tag_id, creator, create_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="courseID != null and courseID != ''">
|
||||||
|
AND course_id = #{courseID}
|
||||||
|
</if>
|
||||||
|
<if test="tagID != null and tagID != ''">
|
||||||
|
AND tag_id = #{tagID}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectCourseTags -->
|
||||||
|
<select id="selectCourseTags" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_course_tag
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.study.mapper.LearningRecordMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.study.TbLearningRecord">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="user_id" property="userID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="resource_type" property="resourceType" jdbcType="INTEGER"/>
|
||||||
|
<result column="resource_id" property="resourceID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="task_id" property="taskID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="duration" property="duration" jdbcType="INTEGER"/>
|
||||||
|
<result column="progress" property="progress" jdbcType="DECIMAL"/>
|
||||||
|
<result column="is_complete" property="isComplete" jdbcType="BOOLEAN"/>
|
||||||
|
<result column="complete_time" property="completeTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="last_learn_time" property="lastLearnTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, user_id, resource_type, resource_id, task_id, duration, progress,
|
||||||
|
is_complete, complete_time, last_learn_time, create_time, update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="userID != null and userID != ''">
|
||||||
|
AND user_id = #{userID}
|
||||||
|
</if>
|
||||||
|
<if test="resourceType != null">
|
||||||
|
AND resource_type = #{resourceType}
|
||||||
|
</if>
|
||||||
|
<if test="resourceID != null and resourceID != ''">
|
||||||
|
AND resource_id = #{resourceID}
|
||||||
|
</if>
|
||||||
|
<if test="taskID != null and taskID != ''">
|
||||||
|
AND task_id = #{taskID}
|
||||||
|
</if>
|
||||||
|
<if test="isComplete != null">
|
||||||
|
AND is_complete = #{isComplete}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectLearningRecords -->
|
||||||
|
<select id="selectLearningRecords" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_learning_record
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY last_learn_time DESC, create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.study.mapper.LearningStatisticsMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.study.TbLearningStatistics">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="user_id" property="userID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="stat_date" property="statDate" jdbcType="DATE"/>
|
||||||
|
<result column="total_duration" property="totalDuration" jdbcType="INTEGER"/>
|
||||||
|
<result column="resource_count" property="resourceCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="course_count" property="courseCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="complete_count" property="completeCount" jdbcType="INTEGER"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, user_id, stat_date, total_duration, resource_count, course_count,
|
||||||
|
complete_count, create_time, update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="userID != null and userID != ''">
|
||||||
|
AND user_id = #{userID}
|
||||||
|
</if>
|
||||||
|
<if test="statDate != null">
|
||||||
|
AND stat_date = #{statDate}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectLearningStatistics -->
|
||||||
|
<select id="selectLearningStatistics" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_learning_statistics
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY stat_date DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.study.mapper.LearningTaskMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.study.TbLearningTask">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="task_id" property="taskID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||||
|
<result column="description" property="description" jdbcType="LONGVARCHAR"/>
|
||||||
|
<result column="start_time" property="startTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="end_time" property="endTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, task_id, name, description, start_time, end_time, status,
|
||||||
|
creator, updater, create_time, update_time, delete_time, deleted
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
deleted = 0
|
||||||
|
<if test="taskID != null and taskID != ''">
|
||||||
|
AND task_id = #{taskID}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND name LIKE CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectLearningTasks -->
|
||||||
|
<select id="selectLearningTasks" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_learning_task
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.study.mapper.TaskCourseMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.study.TbTaskCourse">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="task_id" property="taskID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="course_id" property="courseID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="required" property="required" jdbcType="BOOLEAN"/>
|
||||||
|
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, task_id, course_id, required, order_num, creator, create_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="taskID != null and taskID != ''">
|
||||||
|
AND task_id = #{taskID}
|
||||||
|
</if>
|
||||||
|
<if test="courseID != null and courseID != ''">
|
||||||
|
AND course_id = #{courseID}
|
||||||
|
</if>
|
||||||
|
<if test="required != null">
|
||||||
|
AND required = #{required}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectTaskCourses -->
|
||||||
|
<select id="selectTaskCourses" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_task_course
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY order_num ASC, create_time ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.study.mapper.TaskResourceMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.study.TbTaskResource">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="task_id" property="taskID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="resource_id" property="resourceID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="required" property="required" jdbcType="BOOLEAN"/>
|
||||||
|
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, task_id, resource_id, required, order_num, creator, create_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="taskID != null and taskID != ''">
|
||||||
|
AND task_id = #{taskID}
|
||||||
|
</if>
|
||||||
|
<if test="resourceID != null and resourceID != ''">
|
||||||
|
AND resource_id = #{resourceID}
|
||||||
|
</if>
|
||||||
|
<if test="required != null">
|
||||||
|
AND required = #{required}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectTaskResources -->
|
||||||
|
<select id="selectTaskResources" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_task_resource
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY order_num ASC, create_time ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.xyzh.study.mapper.TaskUserMapper">
|
||||||
|
|
||||||
|
<!-- 基础结果映射 -->
|
||||||
|
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.study.TbTaskUser">
|
||||||
|
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||||
|
<result column="task_id" property="taskID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="user_id" property="userID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="dept_id" property="deptID" jdbcType="VARCHAR"/>
|
||||||
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
<result column="progress" property="progress" jdbcType="DECIMAL"/>
|
||||||
|
<result column="complete_time" property="completeTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 基础字段 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, task_id, user_id, dept_id, status, progress, complete_time,
|
||||||
|
creator, create_time, update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 通用条件 -->
|
||||||
|
<sql id="Where_Clause">
|
||||||
|
<where>
|
||||||
|
<if test="taskID != null and taskID != ''">
|
||||||
|
AND task_id = #{taskID}
|
||||||
|
</if>
|
||||||
|
<if test="userID != null and userID != ''">
|
||||||
|
AND user_id = #{userID}
|
||||||
|
</if>
|
||||||
|
<if test="deptID != null and deptID != ''">
|
||||||
|
AND dept_id = #{deptID}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- selectTaskUsers -->
|
||||||
|
<select id="selectTaskUsers" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM tb_task_user
|
||||||
|
<include refid="Where_Clause"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user