From 67e7432837f66e7b3ecc9598b46c049c05ee588a Mon Sep 17 00:00:00 2001 From: wangys <3401275564@qq.com> Date: Wed, 15 Oct 2025 13:11:19 +0800 Subject: [PATCH] =?UTF-8?q?serv-=E5=88=9D=E5=A7=8Bmapper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schoolNewsServ/.doc/快速开始.md | 262 +++++++++++++++++ schoolNewsServ/README.md | 267 ++++++++++++++++++ schoolNewsServ/ai/pom.xml | 85 ++++++ .../xyzh/ai/mapper/AiAgentConfigMapper.java | 27 ++ .../xyzh/ai/mapper/AiConversationMapper.java | 27 ++ .../org/xyzh/ai/mapper/AiKnowledgeMapper.java | 27 ++ .../org/xyzh/ai/mapper/AiMessageMapper.java | 27 ++ .../xyzh/ai/mapper/AiUploadFileMapper.java | 27 ++ .../ai/mapper/AiUsageStatisticsMapper.java | 27 ++ .../resources/mapper/AiAgentConfigMapper.xml | 60 ++++ .../resources/mapper/AiConversationMapper.xml | 47 +++ .../resources/mapper/AiKnowledgeMapper.xml | 64 +++++ .../main/resources/mapper/AiMessageMapper.xml | 48 ++++ .../resources/mapper/AiUploadFileMapper.xml | 57 ++++ .../mapper/AiUsageStatisticsMapper.xml | 45 +++ schoolNewsServ/api/api-ai/pom.xml | 23 ++ schoolNewsServ/api/api-all/pom.xml | 16 ++ schoolNewsServ/api/api-news/pom.xml | 22 ++ .../api-news/src/main/java/org/xyzh/Main.java | 7 + schoolNewsServ/api/api-study/pom.xml | 21 ++ .../src/main/java/org/xyzh/Main.java | 7 + schoolNewsServ/api/api-usercenter/pom.xml | 23 ++ schoolNewsServ/api/pom.xml | 29 ++ .../xyzh/auth/service/LoginLogService.java | 2 +- .../xyzh/auth/service/LoginServiceImpl.java | 2 +- .../xyzh/common/dto/ai/TbAiAgentConfig.java | 171 +++++++++++ .../xyzh/common/dto/ai/TbAiConversation.java | 93 ++++++ .../org/xyzh/common/dto/ai/TbAiKnowledge.java | 183 ++++++++++++ .../org/xyzh/common/dto/ai/TbAiMessage.java | 118 ++++++++ .../xyzh/common/dto/ai/TbAiUploadFile.java | 145 ++++++++++ .../common/dto/ai/TbAiUsageStatistics.java | 107 +++++++ .../dto/permission/TbResourcePermission.java | 152 ++++++++++ .../xyzh/common/dto/resource/TbBanner.java | 146 ++++++++++ .../dto/resource/TbDataCollectionConfig.java | 146 ++++++++++ .../dto/resource/TbDataCollectionLog.java | 120 ++++++++ .../xyzh/common/dto/resource/TbResource.java | 252 +++++++++++++++++ .../dto/resource/TbResourceCategory.java | 131 +++++++++ .../dto/resource/TbResourceRecommend.java | 91 ++++++ .../common/dto/resource/TbResourceTag.java | 64 +++++ .../org/xyzh/common/dto/resource/TbTag.java | 104 +++++++ .../org/xyzh/common/dto/study/TbCourse.java | 201 +++++++++++++ .../common/dto/study/TbCourseChapter.java | 132 +++++++++ .../xyzh/common/dto/study/TbCourseTag.java | 65 +++++ .../common/dto/study/TbLearningRecord.java | 149 ++++++++++ .../dto/study/TbLearningStatistics.java | 107 +++++++ .../xyzh/common/dto/study/TbLearningTask.java | 133 +++++++++ .../xyzh/common/dto/study/TbTaskCourse.java | 92 ++++++ .../xyzh/common/dto/study/TbTaskResource.java | 92 ++++++ .../org/xyzh/common/dto/study/TbTaskUser.java | 121 ++++++++ .../xyzh/common/dto/system/TbSysConfig.java | 131 +++++++++ .../xyzh/common/dto/system/TbSysDictData.java | 171 +++++++++++ .../xyzh/common/dto/system/TbSysDictType.java | 104 +++++++ .../org/xyzh/common/dto/system/TbSysFile.java | 159 +++++++++++ .../dto/{log => system}/TbSysLoginLog.java | 2 +- .../common/dto/system/TbSysNotification.java | 134 +++++++++ .../common/dto/system/TbSysOperationLog.java | 237 ++++++++++++++++ .../dto/system/TbSysVisitStatistics.java | 121 ++++++++ .../common/dto/usercenter/TbAchievement.java | 186 ++++++++++++ .../common/dto/usercenter/TbPointsRecord.java | 106 +++++++ .../dto/usercenter/TbUserAchievement.java | 65 +++++ .../dto/usercenter/TbUserBrowseRecord.java | 93 ++++++ .../dto/usercenter/TbUserCollection.java | 65 +++++ .../common/dto/usercenter/TbUserPoints.java | 78 +++++ schoolNewsServ/news/pom.xml | 48 ++++ .../org/xyzh/news/mapper/BannerMapper.java | 27 ++ .../mapper/DataCollectionConfigMapper.java | 27 ++ .../news/mapper/DataCollectionLogMapper.java | 27 ++ .../news/mapper/ResourceCategoryMapper.java | 27 ++ .../org/xyzh/news/mapper/ResourceMapper.java | 27 ++ .../news/mapper/ResourceRecommendMapper.java | 27 ++ .../xyzh/news/mapper/ResourceTagMapper.java | 27 ++ .../java/org/xyzh/news/mapper/TagMapper.java | 27 ++ .../main/resources/mapper/BannerMapper.xml | 57 ++++ .../mapper/DataCollectionConfigMapper.xml | 61 ++++ .../mapper/DataCollectionLogMapper.xml | 44 +++ .../mapper/ResourceCategoryMapper.xml | 53 ++++ .../main/resources/mapper/ResourceMapper.xml | 73 +++++ .../mapper/ResourceRecommendMapper.xml | 47 +++ .../resources/mapper/ResourceTagMapper.xml | 40 +++ .../src/main/resources/mapper/TagMapper.xml | 51 ++++ schoolNewsServ/pom.xml | 31 ++ schoolNewsServ/study/pom.xml | 86 ++++++ .../study/mapper/CourseChapterMapper.java | 27 ++ .../org/xyzh/study/mapper/CourseMapper.java | 27 ++ .../xyzh/study/mapper/CourseTagMapper.java | 27 ++ .../study/mapper/LearningRecordMapper.java | 27 ++ .../mapper/LearningStatisticsMapper.java | 27 ++ .../xyzh/study/mapper/LearningTaskMapper.java | 27 ++ .../xyzh/study/mapper/TaskCourseMapper.java | 27 ++ .../xyzh/study/mapper/TaskResourceMapper.java | 27 ++ .../org/xyzh/study/mapper/TaskUserMapper.java | 27 ++ .../resources/mapper/CourseChapterMapper.xml | 50 ++++ .../main/resources/mapper/CourseMapper.xml | 62 ++++ .../main/resources/mapper/CourseTagMapper.xml | 40 +++ .../resources/mapper/LearningRecordMapper.xml | 57 ++++ .../mapper/LearningStatisticsMapper.xml | 45 +++ .../resources/mapper/LearningTaskMapper.xml | 53 ++++ .../resources/mapper/TaskCourseMapper.xml | 45 +++ .../resources/mapper/TaskResourceMapper.xml | 45 +++ .../main/resources/mapper/TaskUserMapper.xml | 52 ++++ .../xyzh/system/mapper/SysConfigMapper.java | 27 ++ .../xyzh/system/mapper/SysDictDataMapper.java | 27 ++ .../xyzh/system/mapper/SysDictTypeMapper.java | 27 ++ .../org/xyzh/system/mapper/SysFileMapper.java | 27 ++ .../system/mapper/SysNotificationMapper.java | 27 ++ .../system/mapper/SysOperationLogMapper.java | 27 ++ .../mapper/SysVisitStatisticsMapper.java | 27 ++ .../main/resources/mapper/SysConfigMapper.xml | 56 ++++ .../resources/mapper/SysDictDataMapper.xml | 63 +++++ .../resources/mapper/SysDictTypeMapper.xml | 51 ++++ .../main/resources/mapper/SysFileMapper.xml | 57 ++++ .../mapper/SysNotificationMapper.xml | 58 ++++ .../mapper/SysOperationLogMapper.xml | 67 +++++ .../mapper/SysVisitStatisticsMapper.xml | 43 +++ schoolNewsServ/usercenter/pom.xml | 86 ++++++ .../usercenter/mapper/AchievementMapper.java | 27 ++ .../usercenter/mapper/PointsRecordMapper.java | 27 ++ .../mapper/UserAchievementMapper.java | 27 ++ .../mapper/UserBrowseRecordMapper.java | 27 ++ .../mapper/UserCollectionMapper.java | 27 ++ .../usercenter/mapper/UserPointsMapper.java | 27 ++ .../resources/mapper/AchievementMapper.xml | 64 +++++ .../resources/mapper/PointsRecordMapper.xml | 49 ++++ .../mapper/UserAchievementMapper.xml | 39 +++ .../mapper/UserBrowseRecordMapper.xml | 47 +++ .../resources/mapper/UserCollectionMapper.xml | 43 +++ .../resources/mapper/UserPointsMapper.xml | 42 +++ 127 files changed, 8628 insertions(+), 3 deletions(-) create mode 100644 schoolNewsServ/.doc/快速开始.md create mode 100644 schoolNewsServ/README.md create mode 100644 schoolNewsServ/ai/pom.xml create mode 100644 schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiAgentConfigMapper.java create mode 100644 schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiConversationMapper.java create mode 100644 schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiKnowledgeMapper.java create mode 100644 schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiMessageMapper.java create mode 100644 schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiUploadFileMapper.java create mode 100644 schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiUsageStatisticsMapper.java create mode 100644 schoolNewsServ/ai/src/main/resources/mapper/AiAgentConfigMapper.xml create mode 100644 schoolNewsServ/ai/src/main/resources/mapper/AiConversationMapper.xml create mode 100644 schoolNewsServ/ai/src/main/resources/mapper/AiKnowledgeMapper.xml create mode 100644 schoolNewsServ/ai/src/main/resources/mapper/AiMessageMapper.xml create mode 100644 schoolNewsServ/ai/src/main/resources/mapper/AiUploadFileMapper.xml create mode 100644 schoolNewsServ/ai/src/main/resources/mapper/AiUsageStatisticsMapper.xml create mode 100644 schoolNewsServ/api/api-ai/pom.xml create mode 100644 schoolNewsServ/api/api-news/pom.xml create mode 100644 schoolNewsServ/api/api-news/src/main/java/org/xyzh/Main.java create mode 100644 schoolNewsServ/api/api-study/pom.xml create mode 100644 schoolNewsServ/api/api-study/src/main/java/org/xyzh/Main.java create mode 100644 schoolNewsServ/api/api-usercenter/pom.xml create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiAgentConfig.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiConversation.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiKnowledge.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiMessage.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiUploadFile.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiUsageStatistics.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/permission/TbResourcePermission.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbBanner.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbDataCollectionConfig.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbDataCollectionLog.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResource.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceCategory.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceRecommend.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceTag.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbTag.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourse.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourseChapter.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourseTag.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningRecord.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningStatistics.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningTask.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskCourse.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskResource.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskUser.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysConfig.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysDictData.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysDictType.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysFile.java rename schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/{log => system}/TbSysLoginLog.java (99%) create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysNotification.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysOperationLog.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysVisitStatistics.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbAchievement.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbPointsRecord.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserAchievement.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserBrowseRecord.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserCollection.java create mode 100644 schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserPoints.java create mode 100644 schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/BannerMapper.java create mode 100644 schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/DataCollectionConfigMapper.java create mode 100644 schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/DataCollectionLogMapper.java create mode 100644 schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceCategoryMapper.java create mode 100644 schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceMapper.java create mode 100644 schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceRecommendMapper.java create mode 100644 schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceTagMapper.java create mode 100644 schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/TagMapper.java create mode 100644 schoolNewsServ/news/src/main/resources/mapper/BannerMapper.xml create mode 100644 schoolNewsServ/news/src/main/resources/mapper/DataCollectionConfigMapper.xml create mode 100644 schoolNewsServ/news/src/main/resources/mapper/DataCollectionLogMapper.xml create mode 100644 schoolNewsServ/news/src/main/resources/mapper/ResourceCategoryMapper.xml create mode 100644 schoolNewsServ/news/src/main/resources/mapper/ResourceMapper.xml create mode 100644 schoolNewsServ/news/src/main/resources/mapper/ResourceRecommendMapper.xml create mode 100644 schoolNewsServ/news/src/main/resources/mapper/ResourceTagMapper.xml create mode 100644 schoolNewsServ/news/src/main/resources/mapper/TagMapper.xml create mode 100644 schoolNewsServ/study/pom.xml create mode 100644 schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseChapterMapper.java create mode 100644 schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseMapper.java create mode 100644 schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseTagMapper.java create mode 100644 schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningRecordMapper.java create mode 100644 schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningStatisticsMapper.java create mode 100644 schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningTaskMapper.java create mode 100644 schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskCourseMapper.java create mode 100644 schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskResourceMapper.java create mode 100644 schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskUserMapper.java create mode 100644 schoolNewsServ/study/src/main/resources/mapper/CourseChapterMapper.xml create mode 100644 schoolNewsServ/study/src/main/resources/mapper/CourseMapper.xml create mode 100644 schoolNewsServ/study/src/main/resources/mapper/CourseTagMapper.xml create mode 100644 schoolNewsServ/study/src/main/resources/mapper/LearningRecordMapper.xml create mode 100644 schoolNewsServ/study/src/main/resources/mapper/LearningStatisticsMapper.xml create mode 100644 schoolNewsServ/study/src/main/resources/mapper/LearningTaskMapper.xml create mode 100644 schoolNewsServ/study/src/main/resources/mapper/TaskCourseMapper.xml create mode 100644 schoolNewsServ/study/src/main/resources/mapper/TaskResourceMapper.xml create mode 100644 schoolNewsServ/study/src/main/resources/mapper/TaskUserMapper.xml create mode 100644 schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysConfigMapper.java create mode 100644 schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysDictDataMapper.java create mode 100644 schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysDictTypeMapper.java create mode 100644 schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysFileMapper.java create mode 100644 schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysNotificationMapper.java create mode 100644 schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysOperationLogMapper.java create mode 100644 schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysVisitStatisticsMapper.java create mode 100644 schoolNewsServ/system/src/main/resources/mapper/SysConfigMapper.xml create mode 100644 schoolNewsServ/system/src/main/resources/mapper/SysDictDataMapper.xml create mode 100644 schoolNewsServ/system/src/main/resources/mapper/SysDictTypeMapper.xml create mode 100644 schoolNewsServ/system/src/main/resources/mapper/SysFileMapper.xml create mode 100644 schoolNewsServ/system/src/main/resources/mapper/SysNotificationMapper.xml create mode 100644 schoolNewsServ/system/src/main/resources/mapper/SysOperationLogMapper.xml create mode 100644 schoolNewsServ/system/src/main/resources/mapper/SysVisitStatisticsMapper.xml create mode 100644 schoolNewsServ/usercenter/pom.xml create mode 100644 schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/AchievementMapper.java create mode 100644 schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/PointsRecordMapper.java create mode 100644 schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserAchievementMapper.java create mode 100644 schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserBrowseRecordMapper.java create mode 100644 schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserCollectionMapper.java create mode 100644 schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserPointsMapper.java create mode 100644 schoolNewsServ/usercenter/src/main/resources/mapper/AchievementMapper.xml create mode 100644 schoolNewsServ/usercenter/src/main/resources/mapper/PointsRecordMapper.xml create mode 100644 schoolNewsServ/usercenter/src/main/resources/mapper/UserAchievementMapper.xml create mode 100644 schoolNewsServ/usercenter/src/main/resources/mapper/UserBrowseRecordMapper.xml create mode 100644 schoolNewsServ/usercenter/src/main/resources/mapper/UserCollectionMapper.xml create mode 100644 schoolNewsServ/usercenter/src/main/resources/mapper/UserPointsMapper.xml diff --git a/schoolNewsServ/.doc/快速开始.md b/schoolNewsServ/.doc/快速开始.md new file mode 100644 index 0000000..a3239d5 --- /dev/null +++ b/schoolNewsServ/.doc/快速开始.md @@ -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 { +} +``` + +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缓存 +- [ ] 性能优化 +- [ ] 安全加固 + diff --git a/schoolNewsServ/README.md b/schoolNewsServ/README.md new file mode 100644 index 0000000..8a65e92 --- /dev/null +++ b/schoolNewsServ/README.md @@ -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 +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支持一下! + diff --git a/schoolNewsServ/ai/pom.xml b/schoolNewsServ/ai/pom.xml new file mode 100644 index 0000000..2c49edb --- /dev/null +++ b/schoolNewsServ/ai/pom.xml @@ -0,0 +1,85 @@ + + + 4.0.0 + + org.xyzh + school-news + ${school-news.version} + + + org.xyzh + ai + ${school-news.version} + jar + ai + 智能体模块 + + + 21 + 21 + + + + + org.xyzh + api-ai + ${school-news.version} + + + + org.xyzh + common-all + ${school-news.version} + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + + com.baomidou + mybatis-plus-spring-boot3-starter + + + + com.mysql + mysql-connector-j + + + + com.zaxxer + HikariCP + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + + org.projectlombok + lombok + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + diff --git a/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiAgentConfigMapper.java b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiAgentConfigMapper.java new file mode 100644 index 0000000..85add0c --- /dev/null +++ b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiAgentConfigMapper.java @@ -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 { + + /** + * @description 查询智能体配置列表 + * @param filter 过滤条件 + * @return List 智能体配置列表 + * @author system + * @since 2025-10-15 + */ + List selectAiAgentConfigs(TbAiAgentConfig filter); +} diff --git a/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiConversationMapper.java b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiConversationMapper.java new file mode 100644 index 0000000..68a76f7 --- /dev/null +++ b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiConversationMapper.java @@ -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 { + + /** + * @description 查询对话会话列表 + * @param filter 过滤条件 + * @return List 对话会话列表 + * @author system + * @since 2025-10-15 + */ + List selectAiConversations(TbAiConversation filter); +} diff --git a/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiKnowledgeMapper.java b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiKnowledgeMapper.java new file mode 100644 index 0000000..fc6b06b --- /dev/null +++ b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiKnowledgeMapper.java @@ -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 { + + /** + * @description 查询知识库列表 + * @param filter 过滤条件 + * @return List 知识库列表 + * @author system + * @since 2025-10-15 + */ + List selectAiKnowledges(TbAiKnowledge filter); +} diff --git a/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiMessageMapper.java b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiMessageMapper.java new file mode 100644 index 0000000..7197294 --- /dev/null +++ b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiMessageMapper.java @@ -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 { + + /** + * @description 查询对话消息列表 + * @param filter 过滤条件 + * @return List 对话消息列表 + * @author system + * @since 2025-10-15 + */ + List selectAiMessages(TbAiMessage filter); +} diff --git a/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiUploadFileMapper.java b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiUploadFileMapper.java new file mode 100644 index 0000000..52da81e --- /dev/null +++ b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiUploadFileMapper.java @@ -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 { + + /** + * @description 查询上传文件列表 + * @param filter 过滤条件 + * @return List 上传文件列表 + * @author system + * @since 2025-10-15 + */ + List selectAiUploadFiles(TbAiUploadFile filter); +} diff --git a/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiUsageStatisticsMapper.java b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiUsageStatisticsMapper.java new file mode 100644 index 0000000..fff06a7 --- /dev/null +++ b/schoolNewsServ/ai/src/main/java/org/xyzh/ai/mapper/AiUsageStatisticsMapper.java @@ -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 { + + /** + * @description 查询AI使用统计列表 + * @param filter 过滤条件 + * @return List AI使用统计列表 + * @author system + * @since 2025-10-15 + */ + List selectAiUsageStatistics(TbAiUsageStatistics filter); +} diff --git a/schoolNewsServ/ai/src/main/resources/mapper/AiAgentConfigMapper.xml b/schoolNewsServ/ai/src/main/resources/mapper/AiAgentConfigMapper.xml new file mode 100644 index 0000000..ea6ba85 --- /dev/null +++ b/schoolNewsServ/ai/src/main/resources/mapper/AiAgentConfigMapper.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + id, name, avatar, system_prompt, model_name, model_provider, temperature, + max_tokens, top_p, status, creator, updater, create_time, update_time, + delete_time, deleted + + + + + + deleted = 0 + + AND name LIKE CONCAT('%', #{name}, '%') + + + AND model_name = #{modelName} + + + AND model_provider = #{modelProvider} + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/ai/src/main/resources/mapper/AiConversationMapper.xml b/schoolNewsServ/ai/src/main/resources/mapper/AiConversationMapper.xml new file mode 100644 index 0000000..364276b --- /dev/null +++ b/schoolNewsServ/ai/src/main/resources/mapper/AiConversationMapper.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + id, user_id, title, status, message_count, last_message_time, + create_time, update_time + + + + + + + AND user_id = #{userID} + + + AND title LIKE CONCAT('%', #{title}, '%') + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/ai/src/main/resources/mapper/AiKnowledgeMapper.xml b/schoolNewsServ/ai/src/main/resources/mapper/AiKnowledgeMapper.xml new file mode 100644 index 0000000..41ae7da --- /dev/null +++ b/schoolNewsServ/ai/src/main/resources/mapper/AiKnowledgeMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + deleted = 0 + + AND title LIKE CONCAT('%', #{title}, '%') + + + AND source_type = #{sourceType} + + + AND source_id = #{sourceID} + + + AND category = #{category} + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/ai/src/main/resources/mapper/AiMessageMapper.xml b/schoolNewsServ/ai/src/main/resources/mapper/AiMessageMapper.xml new file mode 100644 index 0000000..3ca9a33 --- /dev/null +++ b/schoolNewsServ/ai/src/main/resources/mapper/AiMessageMapper.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + id, conversation_id, user_id, role, content, file_ids, knowledge_ids, + token_count, create_time + + + + + + + AND conversation_id = #{conversationID} + + + AND user_id = #{userID} + + + AND role = #{role} + + + + + + + + diff --git a/schoolNewsServ/ai/src/main/resources/mapper/AiUploadFileMapper.xml b/schoolNewsServ/ai/src/main/resources/mapper/AiUploadFileMapper.xml new file mode 100644 index 0000000..0e45cb8 --- /dev/null +++ b/schoolNewsServ/ai/src/main/resources/mapper/AiUploadFileMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + id, user_id, conversation_id, file_name, file_path, file_size, + file_type, mime_type, extracted_text, status, create_time, update_time + + + + + + + AND user_id = #{userID} + + + AND conversation_id = #{conversationID} + + + AND file_name LIKE CONCAT('%', #{fileName}, '%') + + + AND file_type = #{fileType} + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/ai/src/main/resources/mapper/AiUsageStatisticsMapper.xml b/schoolNewsServ/ai/src/main/resources/mapper/AiUsageStatisticsMapper.xml new file mode 100644 index 0000000..c19dc3b --- /dev/null +++ b/schoolNewsServ/ai/src/main/resources/mapper/AiUsageStatisticsMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + id, user_id, stat_date, conversation_count, message_count, + total_tokens, file_count, create_time, update_time + + + + + + + AND user_id = #{userID} + + + AND stat_date = #{statDate} + + + + + + + + diff --git a/schoolNewsServ/api/api-ai/pom.xml b/schoolNewsServ/api/api-ai/pom.xml new file mode 100644 index 0000000..1254bcc --- /dev/null +++ b/schoolNewsServ/api/api-ai/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + org.xyzh + api + ${school-news.version} + + + org.xyzh + api-ai + ${school-news.version} + api-ai + 智能体API接口定义 + + + 21 + 21 + + + diff --git a/schoolNewsServ/api/api-all/pom.xml b/schoolNewsServ/api/api-all/pom.xml index 8981a47..1f7ffad 100644 --- a/schoolNewsServ/api/api-all/pom.xml +++ b/schoolNewsServ/api/api-all/pom.xml @@ -29,6 +29,22 @@ org.xyzh api-system + + org.xyzh + api-news + + + org.xyzh + api-study + + + org.xyzh + api-usercenter + + + org.xyzh + api-ai + \ No newline at end of file diff --git a/schoolNewsServ/api/api-news/pom.xml b/schoolNewsServ/api/api-news/pom.xml new file mode 100644 index 0000000..d58a0fc --- /dev/null +++ b/schoolNewsServ/api/api-news/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + org.xyzh + api + ${school-news.version} + + + org.xyzh + api-news + ${school-news.version} + jar + api-news + 新闻API接口定义 + + + 21 + 21 + \ No newline at end of file diff --git a/schoolNewsServ/api/api-news/src/main/java/org/xyzh/Main.java b/schoolNewsServ/api/api-news/src/main/java/org/xyzh/Main.java new file mode 100644 index 0000000..f660b7a --- /dev/null +++ b/schoolNewsServ/api/api-news/src/main/java/org/xyzh/Main.java @@ -0,0 +1,7 @@ +package org.xyzh; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/schoolNewsServ/api/api-study/pom.xml b/schoolNewsServ/api/api-study/pom.xml new file mode 100644 index 0000000..1ee0bf2 --- /dev/null +++ b/schoolNewsServ/api/api-study/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + org.xyzh + api + ${school-news.version} + + + org.xyzh + api-study + ${school-news.version} + + + 21 + 21 + + + \ No newline at end of file diff --git a/schoolNewsServ/api/api-study/src/main/java/org/xyzh/Main.java b/schoolNewsServ/api/api-study/src/main/java/org/xyzh/Main.java new file mode 100644 index 0000000..f660b7a --- /dev/null +++ b/schoolNewsServ/api/api-study/src/main/java/org/xyzh/Main.java @@ -0,0 +1,7 @@ +package org.xyzh; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/schoolNewsServ/api/api-usercenter/pom.xml b/schoolNewsServ/api/api-usercenter/pom.xml new file mode 100644 index 0000000..d653fea --- /dev/null +++ b/schoolNewsServ/api/api-usercenter/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + org.xyzh + api + ${school-news.version} + + + org.xyzh + api-usercenter + ${school-news.version} + api-usercenter + 个人中心API接口定义 + + + 21 + 21 + + + diff --git a/schoolNewsServ/api/pom.xml b/schoolNewsServ/api/pom.xml index f4e0439..2cf0650 100644 --- a/schoolNewsServ/api/pom.xml +++ b/schoolNewsServ/api/pom.xml @@ -17,6 +17,10 @@ api-all api-auth api-system + api-usercenter + api-ai + api-study + api-news @@ -41,6 +45,31 @@ api-system ${school-news.version} + + org.xyzh + api-course + ${school-news.version} + + + org.xyzh + api-study + ${school-news.version} + + + org.xyzh + api-usercenter + ${school-news.version} + + + org.xyzh + api-ai + ${school-news.version} + + + org.xyzh + api-news + ${school-news.version} + diff --git a/schoolNewsServ/auth/src/main/java/org/xyzh/auth/service/LoginLogService.java b/schoolNewsServ/auth/src/main/java/org/xyzh/auth/service/LoginLogService.java index 8aa1c05..42cd7e6 100644 --- a/schoolNewsServ/auth/src/main/java/org/xyzh/auth/service/LoginLogService.java +++ b/schoolNewsServ/auth/src/main/java/org/xyzh/auth/service/LoginLogService.java @@ -1,7 +1,7 @@ package org.xyzh.auth.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; /** diff --git a/schoolNewsServ/auth/src/main/java/org/xyzh/auth/service/LoginServiceImpl.java b/schoolNewsServ/auth/src/main/java/org/xyzh/auth/service/LoginServiceImpl.java index 3fe6f92..0879586 100644 --- a/schoolNewsServ/auth/src/main/java/org/xyzh/auth/service/LoginServiceImpl.java +++ b/schoolNewsServ/auth/src/main/java/org/xyzh/auth/service/LoginServiceImpl.java @@ -12,8 +12,8 @@ import org.xyzh.common.core.domain.LoginDomain; import org.xyzh.common.core.domain.ResultDomain; import org.xyzh.common.core.enums.UserStatus; 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.log.TbSysLoginLog; import org.xyzh.common.dto.menu.TbSysMenu; import org.xyzh.common.exception.auth.AuthException; import org.xyzh.common.utils.IDUtils; diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiAgentConfig.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiAgentConfig.java new file mode 100644 index 0000000..6df2cda --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiAgentConfig.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiConversation.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiConversation.java new file mode 100644 index 0000000..54b8467 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiConversation.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiKnowledge.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiKnowledge.java new file mode 100644 index 0000000..ad1ae67 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiKnowledge.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiMessage.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiMessage.java new file mode 100644 index 0000000..1004371 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiMessage.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiUploadFile.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiUploadFile.java new file mode 100644 index 0000000..0d78741 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiUploadFile.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiUsageStatistics.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiUsageStatistics.java new file mode 100644 index 0000000..d6e3215 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/ai/TbAiUsageStatistics.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/permission/TbResourcePermission.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/permission/TbResourcePermission.java new file mode 100644 index 0000000..d6fc8c0 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/permission/TbResourcePermission.java @@ -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() + + '}'; + } +} + diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbBanner.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbBanner.java new file mode 100644 index 0000000..eb632b3 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbBanner.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbDataCollectionConfig.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbDataCollectionConfig.java new file mode 100644 index 0000000..1e69ca6 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbDataCollectionConfig.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbDataCollectionLog.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbDataCollectionLog.java new file mode 100644 index 0000000..005e920 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbDataCollectionLog.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResource.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResource.java new file mode 100644 index 0000000..d04fdae --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResource.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceCategory.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceCategory.java new file mode 100644 index 0000000..8f2fe6e --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceCategory.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceRecommend.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceRecommend.java new file mode 100644 index 0000000..31fe244 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceRecommend.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceTag.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceTag.java new file mode 100644 index 0000000..eeeedc0 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbResourceTag.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbTag.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbTag.java new file mode 100644 index 0000000..0708f90 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/resource/TbTag.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourse.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourse.java new file mode 100644 index 0000000..3998c3f --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourse.java @@ -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() + + '}'; + } +} + diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourseChapter.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourseChapter.java new file mode 100644 index 0000000..01dea38 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourseChapter.java @@ -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 + + '}'; + } +} + diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourseTag.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourseTag.java new file mode 100644 index 0000000..4ff8fea --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbCourseTag.java @@ -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() + + '}'; + } +} + diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningRecord.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningRecord.java new file mode 100644 index 0000000..e039a2e --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningRecord.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningStatistics.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningStatistics.java new file mode 100644 index 0000000..394fb85 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningStatistics.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningTask.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningTask.java new file mode 100644 index 0000000..79fbc29 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbLearningTask.java @@ -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 + '\'' + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskCourse.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskCourse.java new file mode 100644 index 0000000..ee1210d --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskCourse.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskResource.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskResource.java new file mode 100644 index 0000000..84c6ee9 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskResource.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskUser.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskUser.java new file mode 100644 index 0000000..84ba71a --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/study/TbTaskUser.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysConfig.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysConfig.java new file mode 100644 index 0000000..d09b71f --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysConfig.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysDictData.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysDictData.java new file mode 100644 index 0000000..6b76d23 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysDictData.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysDictType.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysDictType.java new file mode 100644 index 0000000..db57a19 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysDictType.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysFile.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysFile.java new file mode 100644 index 0000000..0f72d30 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysFile.java @@ -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 + '\'' + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/log/TbSysLoginLog.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysLoginLog.java similarity index 99% rename from schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/log/TbSysLoginLog.java rename to schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysLoginLog.java index c58c837..051def6 100644 --- a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/log/TbSysLoginLog.java +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysLoginLog.java @@ -1,4 +1,4 @@ -package org.xyzh.common.dto.log; +package org.xyzh.common.dto.system; import org.xyzh.common.dto.BaseDTO; /** diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysNotification.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysNotification.java new file mode 100644 index 0000000..bc2a104 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysNotification.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysOperationLog.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysOperationLog.java new file mode 100644 index 0000000..f5dc3d0 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysOperationLog.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysVisitStatistics.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysVisitStatistics.java new file mode 100644 index 0000000..60eecea --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/system/TbSysVisitStatistics.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbAchievement.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbAchievement.java new file mode 100644 index 0000000..3ad531f --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbAchievement.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbPointsRecord.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbPointsRecord.java new file mode 100644 index 0000000..4555bf3 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbPointsRecord.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserAchievement.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserAchievement.java new file mode 100644 index 0000000..4222a98 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserAchievement.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserBrowseRecord.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserBrowseRecord.java new file mode 100644 index 0000000..9e32a49 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserBrowseRecord.java @@ -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 + '\'' + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserCollection.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserCollection.java new file mode 100644 index 0000000..4ae9305 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserCollection.java @@ -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() + + '}'; + } +} diff --git a/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserPoints.java b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserPoints.java new file mode 100644 index 0000000..8d0e3d4 --- /dev/null +++ b/schoolNewsServ/common/common-dto/src/main/java/org/xyzh/common/dto/usercenter/TbUserPoints.java @@ -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 + + '}'; + } +} diff --git a/schoolNewsServ/news/pom.xml b/schoolNewsServ/news/pom.xml index 3a41346..9c94033 100644 --- a/schoolNewsServ/news/pom.xml +++ b/schoolNewsServ/news/pom.xml @@ -18,4 +18,52 @@ 21 + + + org.xyzh + api-news + ${school-news.version} + + + org.xyzh + common-all + ${school-news.version} + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + + com.baomidou + mybatis-plus-spring-boot3-starter + + + + com.mysql + mysql-connector-j + + + + com.zaxxer + HikariCP + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + + org.projectlombok + lombok + + \ No newline at end of file diff --git a/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/BannerMapper.java b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/BannerMapper.java new file mode 100644 index 0000000..06c1836 --- /dev/null +++ b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/BannerMapper.java @@ -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 { + + /** + * @description 查询Banner列表 + * @param filter 过滤条件 + * @return List Banner列表 + * @author system + * @since 2025-10-15 + */ + List selectBanners(TbBanner filter); +} diff --git a/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/DataCollectionConfigMapper.java b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/DataCollectionConfigMapper.java new file mode 100644 index 0000000..c44f1a9 --- /dev/null +++ b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/DataCollectionConfigMapper.java @@ -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 { + + /** + * @description 查询数据采集配置列表 + * @param filter 过滤条件 + * @return List 数据采集配置列表 + * @author system + * @since 2025-10-15 + */ + List selectDataCollectionConfigs(TbDataCollectionConfig filter); +} diff --git a/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/DataCollectionLogMapper.java b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/DataCollectionLogMapper.java new file mode 100644 index 0000000..7fb61e6 --- /dev/null +++ b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/DataCollectionLogMapper.java @@ -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 { + + /** + * @description 查询数据采集记录列表 + * @param filter 过滤条件 + * @return List 数据采集记录列表 + * @author system + * @since 2025-10-15 + */ + List selectDataCollectionLogs(TbDataCollectionLog filter); +} diff --git a/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceCategoryMapper.java b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceCategoryMapper.java new file mode 100644 index 0000000..829030d --- /dev/null +++ b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceCategoryMapper.java @@ -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 { + + /** + * @description 查询资源分类列表 + * @param filter 过滤条件 + * @return List 资源分类列表 + * @author system + * @since 2025-10-15 + */ + List selectResourceCategories(TbResourceCategory filter); +} diff --git a/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceMapper.java b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceMapper.java new file mode 100644 index 0000000..0b2e769 --- /dev/null +++ b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceMapper.java @@ -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 { + + /** + * @description 查询资源列表 + * @param filter 过滤条件 + * @return List 资源列表 + * @author system + * @since 2025-10-15 + */ + List selectResources(TbResource filter); +} diff --git a/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceRecommendMapper.java b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceRecommendMapper.java new file mode 100644 index 0000000..c2879a2 --- /dev/null +++ b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceRecommendMapper.java @@ -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 { + + /** + * @description 查询资源推荐列表 + * @param filter 过滤条件 + * @return List 资源推荐列表 + * @author system + * @since 2025-10-15 + */ + List selectResourceRecommends(TbResourceRecommend filter); +} diff --git a/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceTagMapper.java b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceTagMapper.java new file mode 100644 index 0000000..0bc82a7 --- /dev/null +++ b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/ResourceTagMapper.java @@ -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 { + + /** + * @description 查询资源标签关联列表 + * @param filter 过滤条件 + * @return List 资源标签关联列表 + * @author system + * @since 2025-10-15 + */ + List selectResourceTags(TbResourceTag filter); +} diff --git a/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/TagMapper.java b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/TagMapper.java new file mode 100644 index 0000000..89757d3 --- /dev/null +++ b/schoolNewsServ/news/src/main/java/org/xyzh/news/mapper/TagMapper.java @@ -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 { + + /** + * @description 查询标签列表 + * @param filter 过滤条件 + * @return List 标签列表 + * @author system + * @since 2025-10-15 + */ + List selectTags(TbTag filter); +} diff --git a/schoolNewsServ/news/src/main/resources/mapper/BannerMapper.xml b/schoolNewsServ/news/src/main/resources/mapper/BannerMapper.xml new file mode 100644 index 0000000..76ff5f4 --- /dev/null +++ b/schoolNewsServ/news/src/main/resources/mapper/BannerMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + id, title, image_url, link_type, link_id, link_url, order_num, status, + creator, updater, create_time, update_time, delete_time, deleted + + + + + + deleted = 0 + + AND title LIKE CONCAT('%', #{title}, '%') + + + AND link_type = #{linkType} + + + AND link_id = #{linkID} + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/news/src/main/resources/mapper/DataCollectionConfigMapper.xml b/schoolNewsServ/news/src/main/resources/mapper/DataCollectionConfigMapper.xml new file mode 100644 index 0000000..77490c5 --- /dev/null +++ b/schoolNewsServ/news/src/main/resources/mapper/DataCollectionConfigMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + id, name, source_url, source_type, frequency, category_id, status, + last_collect_time, creator, updater, create_time, update_time, + delete_time, deleted + + + + + + deleted = 0 + + AND name LIKE CONCAT('%', #{name}, '%') + + + AND source_type = #{sourceType} + + + AND frequency = #{frequency} + + + AND category_id = #{categoryID} + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/news/src/main/resources/mapper/DataCollectionLogMapper.xml b/schoolNewsServ/news/src/main/resources/mapper/DataCollectionLogMapper.xml new file mode 100644 index 0000000..0575a65 --- /dev/null +++ b/schoolNewsServ/news/src/main/resources/mapper/DataCollectionLogMapper.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + id, config_id, collect_count, success_count, fail_count, status, + message, collect_time + + + + + + + AND config_id = #{configID} + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/news/src/main/resources/mapper/ResourceCategoryMapper.xml b/schoolNewsServ/news/src/main/resources/mapper/ResourceCategoryMapper.xml new file mode 100644 index 0000000..15eaada --- /dev/null +++ b/schoolNewsServ/news/src/main/resources/mapper/ResourceCategoryMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + id, category_id, name, parent_id, description, icon, order_num, + creator, updater, create_time, update_time, delete_time, deleted + + + + + + deleted = 0 + + AND category_id = #{categoryID} + + + AND name LIKE CONCAT('%', #{name}, '%') + + + AND parent_id = #{parentID} + + + + + + + + diff --git a/schoolNewsServ/news/src/main/resources/mapper/ResourceMapper.xml b/schoolNewsServ/news/src/main/resources/mapper/ResourceMapper.xml new file mode 100644 index 0000000..c2afd1a --- /dev/null +++ b/schoolNewsServ/news/src/main/resources/mapper/ResourceMapper.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + deleted = 0 + + AND title LIKE CONCAT('%', #{title}, '%') + + + AND category_id = #{categoryID} + + + AND author LIKE CONCAT('%', #{author}, '%') + + + AND status = #{status} + + + AND is_recommend = #{isRecommend} + + + AND is_banner = #{isBanner} + + + + + + + + diff --git a/schoolNewsServ/news/src/main/resources/mapper/ResourceRecommendMapper.xml b/schoolNewsServ/news/src/main/resources/mapper/ResourceRecommendMapper.xml new file mode 100644 index 0000000..eb437cb --- /dev/null +++ b/schoolNewsServ/news/src/main/resources/mapper/ResourceRecommendMapper.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + id, resource_id, order_num, reason, creator, updater, create_time, + update_time, delete_time, deleted + + + + + + deleted = 0 + + AND resource_id = #{resourceID} + + + AND reason LIKE CONCAT('%', #{reason}, '%') + + + + + + + + diff --git a/schoolNewsServ/news/src/main/resources/mapper/ResourceTagMapper.xml b/schoolNewsServ/news/src/main/resources/mapper/ResourceTagMapper.xml new file mode 100644 index 0000000..c57ef87 --- /dev/null +++ b/schoolNewsServ/news/src/main/resources/mapper/ResourceTagMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + id, resource_id, tag_id, creator, create_time + + + + + + + AND resource_id = #{resourceID} + + + AND tag_id = #{tagID} + + + + + + + + diff --git a/schoolNewsServ/news/src/main/resources/mapper/TagMapper.xml b/schoolNewsServ/news/src/main/resources/mapper/TagMapper.xml new file mode 100644 index 0000000..a475bda --- /dev/null +++ b/schoolNewsServ/news/src/main/resources/mapper/TagMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + id, tag_id, name, color, description, creator, updater, create_time, + update_time, delete_time, deleted + + + + + + deleted = 0 + + AND tag_id = #{tagID} + + + AND name LIKE CONCAT('%', #{name}, '%') + + + AND color = #{color} + + + + + + + + diff --git a/schoolNewsServ/pom.xml b/schoolNewsServ/pom.xml index b7c102b..e3472e6 100644 --- a/schoolNewsServ/pom.xml +++ b/schoolNewsServ/pom.xml @@ -15,6 +15,9 @@ common admin news + study + usercenter + ai @@ -40,6 +43,9 @@ 0.11.5 + + 1.82 + 2.23.1 @@ -77,6 +83,31 @@ system ${school-news.version} + + org.xyzh + news + ${school-news.version} + + + org.xyzh + course + ${school-news.version} + + + org.xyzh + study + ${school-news.version} + + + org.xyzh + usercenter + ${school-news.version} + + + org.xyzh + ai + ${school-news.version} + diff --git a/schoolNewsServ/study/pom.xml b/schoolNewsServ/study/pom.xml new file mode 100644 index 0000000..5f2c27e --- /dev/null +++ b/schoolNewsServ/study/pom.xml @@ -0,0 +1,86 @@ + + + 4.0.0 + + org.xyzh + school-news + ${school-news.version} + + + org.xyzh + study + ${school-news.version} + jar + study + 学习管理模块 + + + 21 + 21 + + + + + org.xyzh + api-study + ${school-news.version} + + + + org.xyzh + common-all + ${school-news.version} + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + + com.baomidou + mybatis-plus-spring-boot3-starter + + + + com.mysql + mysql-connector-j + + + + com.zaxxer + HikariCP + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + + org.projectlombok + lombok + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + diff --git a/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseChapterMapper.java b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseChapterMapper.java new file mode 100644 index 0000000..a9b93c7 --- /dev/null +++ b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseChapterMapper.java @@ -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 { + + /** + * @description 查询课程章节列表 + * @param filter 过滤条件 + * @return List 课程章节列表 + * @author system + * @since 2025-10-15 + */ + List selectCourseChapters(TbCourseChapter filter); +} diff --git a/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseMapper.java b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseMapper.java new file mode 100644 index 0000000..b75e28c --- /dev/null +++ b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseMapper.java @@ -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 { + + /** + * @description 查询课程列表 + * @param filter 过滤条件 + * @return List 课程列表 + * @author system + * @since 2025-10-15 + */ + List selectCourses(TbCourse filter); +} diff --git a/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseTagMapper.java b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseTagMapper.java new file mode 100644 index 0000000..b66bfb8 --- /dev/null +++ b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/CourseTagMapper.java @@ -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 { + + /** + * @description 查询课程标签关联列表 + * @param filter 过滤条件 + * @return List 课程标签关联列表 + * @author system + * @since 2025-10-15 + */ + List selectCourseTags(TbCourseTag filter); +} diff --git a/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningRecordMapper.java b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningRecordMapper.java new file mode 100644 index 0000000..79c6a90 --- /dev/null +++ b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningRecordMapper.java @@ -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 { + + /** + * @description 查询学习记录列表 + * @param filter 过滤条件 + * @return List 学习记录列表 + * @author system + * @since 2025-10-15 + */ + List selectLearningRecords(TbLearningRecord filter); +} diff --git a/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningStatisticsMapper.java b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningStatisticsMapper.java new file mode 100644 index 0000000..e635eb9 --- /dev/null +++ b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningStatisticsMapper.java @@ -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 { + + /** + * @description 查询学习统计列表 + * @param filter 过滤条件 + * @return List 学习统计列表 + * @author system + * @since 2025-10-15 + */ + List selectLearningStatistics(TbLearningStatistics filter); +} diff --git a/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningTaskMapper.java b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningTaskMapper.java new file mode 100644 index 0000000..55d5ee3 --- /dev/null +++ b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/LearningTaskMapper.java @@ -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 { + + /** + * @description 查询学习任务列表 + * @param filter 过滤条件 + * @return List 学习任务列表 + * @author system + * @since 2025-10-15 + */ + List selectLearningTasks(TbLearningTask filter); +} diff --git a/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskCourseMapper.java b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskCourseMapper.java new file mode 100644 index 0000000..f684174 --- /dev/null +++ b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskCourseMapper.java @@ -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 { + + /** + * @description 查询任务课程关联列表 + * @param filter 过滤条件 + * @return List 任务课程关联列表 + * @author system + * @since 2025-10-15 + */ + List selectTaskCourses(TbTaskCourse filter); +} diff --git a/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskResourceMapper.java b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskResourceMapper.java new file mode 100644 index 0000000..696a7b6 --- /dev/null +++ b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskResourceMapper.java @@ -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 { + + /** + * @description 查询任务资源关联列表 + * @param filter 过滤条件 + * @return List 任务资源关联列表 + * @author system + * @since 2025-10-15 + */ + List selectTaskResources(TbTaskResource filter); +} diff --git a/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskUserMapper.java b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskUserMapper.java new file mode 100644 index 0000000..9fe0263 --- /dev/null +++ b/schoolNewsServ/study/src/main/java/org/xyzh/study/mapper/TaskUserMapper.java @@ -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 { + + /** + * @description 查询任务用户列表 + * @param filter 过滤条件 + * @return List 任务用户列表 + * @author system + * @since 2025-10-15 + */ + List selectTaskUsers(TbTaskUser filter); +} diff --git a/schoolNewsServ/study/src/main/resources/mapper/CourseChapterMapper.xml b/schoolNewsServ/study/src/main/resources/mapper/CourseChapterMapper.xml new file mode 100644 index 0000000..a7f4ab7 --- /dev/null +++ b/schoolNewsServ/study/src/main/resources/mapper/CourseChapterMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + id, course_id, name, content, video_url, duration, order_num, + creator, updater, create_time, update_time, delete_time, deleted + + + + + + deleted = 0 + + AND course_id = #{courseID} + + + AND name LIKE CONCAT('%', #{name}, '%') + + + + + + + + diff --git a/schoolNewsServ/study/src/main/resources/mapper/CourseMapper.xml b/schoolNewsServ/study/src/main/resources/mapper/CourseMapper.xml new file mode 100644 index 0000000..deed2e1 --- /dev/null +++ b/schoolNewsServ/study/src/main/resources/mapper/CourseMapper.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + deleted = 0 + + AND course_id = #{courseID} + + + AND name LIKE CONCAT('%', #{name}, '%') + + + AND teacher LIKE CONCAT('%', #{teacher}, '%') + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/study/src/main/resources/mapper/CourseTagMapper.xml b/schoolNewsServ/study/src/main/resources/mapper/CourseTagMapper.xml new file mode 100644 index 0000000..8eaf4a5 --- /dev/null +++ b/schoolNewsServ/study/src/main/resources/mapper/CourseTagMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + id, course_id, tag_id, creator, create_time + + + + + + + AND course_id = #{courseID} + + + AND tag_id = #{tagID} + + + + + + + + diff --git a/schoolNewsServ/study/src/main/resources/mapper/LearningRecordMapper.xml b/schoolNewsServ/study/src/main/resources/mapper/LearningRecordMapper.xml new file mode 100644 index 0000000..36346eb --- /dev/null +++ b/schoolNewsServ/study/src/main/resources/mapper/LearningRecordMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + id, user_id, resource_type, resource_id, task_id, duration, progress, + is_complete, complete_time, last_learn_time, create_time, update_time + + + + + + + AND user_id = #{userID} + + + AND resource_type = #{resourceType} + + + AND resource_id = #{resourceID} + + + AND task_id = #{taskID} + + + AND is_complete = #{isComplete} + + + + + + + + diff --git a/schoolNewsServ/study/src/main/resources/mapper/LearningStatisticsMapper.xml b/schoolNewsServ/study/src/main/resources/mapper/LearningStatisticsMapper.xml new file mode 100644 index 0000000..a727274 --- /dev/null +++ b/schoolNewsServ/study/src/main/resources/mapper/LearningStatisticsMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + id, user_id, stat_date, total_duration, resource_count, course_count, + complete_count, create_time, update_time + + + + + + + AND user_id = #{userID} + + + AND stat_date = #{statDate} + + + + + + + + diff --git a/schoolNewsServ/study/src/main/resources/mapper/LearningTaskMapper.xml b/schoolNewsServ/study/src/main/resources/mapper/LearningTaskMapper.xml new file mode 100644 index 0000000..0230197 --- /dev/null +++ b/schoolNewsServ/study/src/main/resources/mapper/LearningTaskMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + id, task_id, name, description, start_time, end_time, status, + creator, updater, create_time, update_time, delete_time, deleted + + + + + + deleted = 0 + + AND task_id = #{taskID} + + + AND name LIKE CONCAT('%', #{name}, '%') + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/study/src/main/resources/mapper/TaskCourseMapper.xml b/schoolNewsServ/study/src/main/resources/mapper/TaskCourseMapper.xml new file mode 100644 index 0000000..c53e42b --- /dev/null +++ b/schoolNewsServ/study/src/main/resources/mapper/TaskCourseMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + id, task_id, course_id, required, order_num, creator, create_time + + + + + + + AND task_id = #{taskID} + + + AND course_id = #{courseID} + + + AND required = #{required} + + + + + + + + diff --git a/schoolNewsServ/study/src/main/resources/mapper/TaskResourceMapper.xml b/schoolNewsServ/study/src/main/resources/mapper/TaskResourceMapper.xml new file mode 100644 index 0000000..ce0acba --- /dev/null +++ b/schoolNewsServ/study/src/main/resources/mapper/TaskResourceMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + id, task_id, resource_id, required, order_num, creator, create_time + + + + + + + AND task_id = #{taskID} + + + AND resource_id = #{resourceID} + + + AND required = #{required} + + + + + + + + diff --git a/schoolNewsServ/study/src/main/resources/mapper/TaskUserMapper.xml b/schoolNewsServ/study/src/main/resources/mapper/TaskUserMapper.xml new file mode 100644 index 0000000..2dda990 --- /dev/null +++ b/schoolNewsServ/study/src/main/resources/mapper/TaskUserMapper.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + id, task_id, user_id, dept_id, status, progress, complete_time, + creator, create_time, update_time + + + + + + + AND task_id = #{taskID} + + + AND user_id = #{userID} + + + AND dept_id = #{deptID} + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysConfigMapper.java b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysConfigMapper.java new file mode 100644 index 0000000..5ea27c8 --- /dev/null +++ b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysConfigMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.system.TbSysConfig; + +import java.util.List; + +/** + * @description 系统配置数据访问层 + * @filename SysConfigMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface SysConfigMapper extends BaseMapper { + + /** + * @description 查询系统配置列表 + * @param filter 过滤条件 + * @return List 系统配置列表 + * @author system + * @since 2025-10-15 + */ + List selectSysConfigs(TbSysConfig filter); +} diff --git a/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysDictDataMapper.java b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysDictDataMapper.java new file mode 100644 index 0000000..05dd89b --- /dev/null +++ b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysDictDataMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.system.TbSysDictData; + +import java.util.List; + +/** + * @description 字典数据数据访问层 + * @filename SysDictDataMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface SysDictDataMapper extends BaseMapper { + + /** + * @description 查询字典数据列表 + * @param filter 过滤条件 + * @return List 字典数据列表 + * @author system + * @since 2025-10-15 + */ + List selectSysDictData(TbSysDictData filter); +} diff --git a/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysDictTypeMapper.java b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysDictTypeMapper.java new file mode 100644 index 0000000..1f41417 --- /dev/null +++ b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysDictTypeMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.system.TbSysDictType; + +import java.util.List; + +/** + * @description 字典类型数据访问层 + * @filename SysDictTypeMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface SysDictTypeMapper extends BaseMapper { + + /** + * @description 查询字典类型列表 + * @param filter 过滤条件 + * @return List 字典类型列表 + * @author system + * @since 2025-10-15 + */ + List selectSysDictTypes(TbSysDictType filter); +} diff --git a/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysFileMapper.java b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysFileMapper.java new file mode 100644 index 0000000..1933394 --- /dev/null +++ b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysFileMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.system.TbSysFile; + +import java.util.List; + +/** + * @description 文件上传记录数据访问层 + * @filename SysFileMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface SysFileMapper extends BaseMapper { + + /** + * @description 查询文件上传记录列表 + * @param filter 过滤条件 + * @return List 文件上传记录列表 + * @author system + * @since 2025-10-15 + */ + List selectSysFiles(TbSysFile filter); +} diff --git a/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysNotificationMapper.java b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysNotificationMapper.java new file mode 100644 index 0000000..7245e12 --- /dev/null +++ b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysNotificationMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.system.TbSysNotification; + +import java.util.List; + +/** + * @description 系统通知数据访问层 + * @filename SysNotificationMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface SysNotificationMapper extends BaseMapper { + + /** + * @description 查询系统通知列表 + * @param filter 过滤条件 + * @return List 系统通知列表 + * @author system + * @since 2025-10-15 + */ + List selectSysNotifications(TbSysNotification filter); +} diff --git a/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysOperationLogMapper.java b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysOperationLogMapper.java new file mode 100644 index 0000000..05fd917 --- /dev/null +++ b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysOperationLogMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.system.TbSysOperationLog; + +import java.util.List; + +/** + * @description 操作日志数据访问层 + * @filename SysOperationLogMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface SysOperationLogMapper extends BaseMapper { + + /** + * @description 查询操作日志列表 + * @param filter 过滤条件 + * @return List 操作日志列表 + * @author system + * @since 2025-10-15 + */ + List selectSysOperationLogs(TbSysOperationLog filter); +} diff --git a/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysVisitStatisticsMapper.java b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysVisitStatisticsMapper.java new file mode 100644 index 0000000..7990e12 --- /dev/null +++ b/schoolNewsServ/system/src/main/java/org/xyzh/system/mapper/SysVisitStatisticsMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.system.TbSysVisitStatistics; + +import java.util.List; + +/** + * @description 系统访问统计数据访问层 + * @filename SysVisitStatisticsMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface SysVisitStatisticsMapper extends BaseMapper { + + /** + * @description 查询系统访问统计列表 + * @param filter 过滤条件 + * @return List 系统访问统计列表 + * @author system + * @since 2025-10-15 + */ + List selectSysVisitStatistics(TbSysVisitStatistics filter); +} diff --git a/schoolNewsServ/system/src/main/resources/mapper/SysConfigMapper.xml b/schoolNewsServ/system/src/main/resources/mapper/SysConfigMapper.xml new file mode 100644 index 0000000..cc93b9b --- /dev/null +++ b/schoolNewsServ/system/src/main/resources/mapper/SysConfigMapper.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + id, config_key, config_value, config_type, config_group, description, + is_system, creator, updater, create_time, update_time, delete_time, deleted + + + + + + deleted = 0 + + AND config_key = #{configKey} + + + AND config_group = #{configGroup} + + + AND config_type = #{configType} + + + AND is_system = #{isSystem} + + + + + + + + diff --git a/schoolNewsServ/system/src/main/resources/mapper/SysDictDataMapper.xml b/schoolNewsServ/system/src/main/resources/mapper/SysDictDataMapper.xml new file mode 100644 index 0000000..45f2f2b --- /dev/null +++ b/schoolNewsServ/system/src/main/resources/mapper/SysDictDataMapper.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + id, dict_type, dict_label, dict_value, dict_sort, css_class, list_class, + is_default, status, remark, creator, updater, create_time, update_time, + delete_time, deleted + + + + + + deleted = 0 + + AND dict_type = #{dictType} + + + AND dict_label LIKE CONCAT('%', #{dictLabel}, '%') + + + AND dict_value = #{dictValue} + + + AND status = #{status} + + + AND is_default = #{isDefault} + + + + + + + + diff --git a/schoolNewsServ/system/src/main/resources/mapper/SysDictTypeMapper.xml b/schoolNewsServ/system/src/main/resources/mapper/SysDictTypeMapper.xml new file mode 100644 index 0000000..ae9fd41 --- /dev/null +++ b/schoolNewsServ/system/src/main/resources/mapper/SysDictTypeMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + id, dict_type, dict_name, description, status, creator, updater, + create_time, update_time, delete_time, deleted + + + + + + deleted = 0 + + AND dict_type = #{dictType} + + + AND dict_name LIKE CONCAT('%', #{dictName}, '%') + + + AND status = #{status} + + + + + + + + diff --git a/schoolNewsServ/system/src/main/resources/mapper/SysFileMapper.xml b/schoolNewsServ/system/src/main/resources/mapper/SysFileMapper.xml new file mode 100644 index 0000000..13027c8 --- /dev/null +++ b/schoolNewsServ/system/src/main/resources/mapper/SysFileMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + id, file_name, original_name, file_path, file_url, file_size, + file_type, mime_type, module, business_id, uploader, create_time + + + + + + + AND file_name LIKE CONCAT('%', #{fileName}, '%') + + + AND file_type = #{fileType} + + + AND module = #{module} + + + AND business_id = #{businessID} + + + AND uploader = #{uploader} + + + + + + + + diff --git a/schoolNewsServ/system/src/main/resources/mapper/SysNotificationMapper.xml b/schoolNewsServ/system/src/main/resources/mapper/SysNotificationMapper.xml new file mode 100644 index 0000000..4cb5688 --- /dev/null +++ b/schoolNewsServ/system/src/main/resources/mapper/SysNotificationMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + id, user_id, type, title, content, link_type, link_id, is_read, + read_time, create_time + + + + + + + AND user_id = #{userID} + + + AND type = #{type} + + + AND title LIKE CONCAT('%', #{title}, '%') + + + AND is_read = #{isRead} + + + AND link_type = #{linkType} + + + AND link_id = #{linkID} + + + + + + + + diff --git a/schoolNewsServ/system/src/main/resources/mapper/SysOperationLogMapper.xml b/schoolNewsServ/system/src/main/resources/mapper/SysOperationLogMapper.xml new file mode 100644 index 0000000..5634d83 --- /dev/null +++ b/schoolNewsServ/system/src/main/resources/mapper/SysOperationLogMapper.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, user_id, username, module, operation, method, request_url, + request_method, request_params, response_data, ip_address, ip_source, + browser, os, status, error_message, execute_time, create_time + + + + + + + AND user_id = #{userID} + + + AND username LIKE CONCAT('%', #{username}, '%') + + + AND module = #{module} + + + AND operation = #{operation} + + + AND status = #{status} + + + AND ip_address = #{ipAddress} + + + + + + + + diff --git a/schoolNewsServ/system/src/main/resources/mapper/SysVisitStatisticsMapper.xml b/schoolNewsServ/system/src/main/resources/mapper/SysVisitStatisticsMapper.xml new file mode 100644 index 0000000..25dd72a --- /dev/null +++ b/schoolNewsServ/system/src/main/resources/mapper/SysVisitStatisticsMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + id, stat_date, total_visits, unique_visitors, new_users, active_users, + page_views, avg_visit_duration, create_time, update_time + + + + + + + AND stat_date = #{statDate} + + + + + + + + diff --git a/schoolNewsServ/usercenter/pom.xml b/schoolNewsServ/usercenter/pom.xml new file mode 100644 index 0000000..128dcac --- /dev/null +++ b/schoolNewsServ/usercenter/pom.xml @@ -0,0 +1,86 @@ + + + 4.0.0 + + org.xyzh + school-news + ${school-news.version} + + + org.xyzh + usercenter + ${school-news.version} + jar + usercenter + 个人中心模块 + + + 21 + 21 + + + + + org.xyzh + api-usercenter + ${school-news.version} + + + + org.xyzh + common-all + ${school-news.version} + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + + com.baomidou + mybatis-plus-spring-boot3-starter + + + + com.mysql + mysql-connector-j + + + + com.zaxxer + HikariCP + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + + org.projectlombok + lombok + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + diff --git a/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/AchievementMapper.java b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/AchievementMapper.java new file mode 100644 index 0000000..5bf0881 --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/AchievementMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.usercenter.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.usercenter.TbAchievement; + +import java.util.List; + +/** + * @description 成就数据访问层 + * @filename AchievementMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface AchievementMapper extends BaseMapper { + + /** + * @description 查询成就列表 + * @param filter 过滤条件 + * @return List 成就列表 + * @author system + * @since 2025-10-15 + */ + List selectAchievements(TbAchievement filter); +} diff --git a/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/PointsRecordMapper.java b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/PointsRecordMapper.java new file mode 100644 index 0000000..8329cb3 --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/PointsRecordMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.usercenter.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.usercenter.TbPointsRecord; + +import java.util.List; + +/** + * @description 积分记录数据访问层 + * @filename PointsRecordMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface PointsRecordMapper extends BaseMapper { + + /** + * @description 查询积分记录列表 + * @param filter 过滤条件 + * @return List 积分记录列表 + * @author system + * @since 2025-10-15 + */ + List selectPointsRecords(TbPointsRecord filter); +} diff --git a/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserAchievementMapper.java b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserAchievementMapper.java new file mode 100644 index 0000000..39f040c --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserAchievementMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.usercenter.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.usercenter.TbUserAchievement; + +import java.util.List; + +/** + * @description 用户成就数据访问层 + * @filename UserAchievementMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface UserAchievementMapper extends BaseMapper { + + /** + * @description 查询用户成就列表 + * @param filter 过滤条件 + * @return List 用户成就列表 + * @author system + * @since 2025-10-15 + */ + List selectUserAchievements(TbUserAchievement filter); +} diff --git a/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserBrowseRecordMapper.java b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserBrowseRecordMapper.java new file mode 100644 index 0000000..b9879b9 --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserBrowseRecordMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.usercenter.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.usercenter.TbUserBrowseRecord; + +import java.util.List; + +/** + * @description 用户浏览记录数据访问层 + * @filename UserBrowseRecordMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface UserBrowseRecordMapper extends BaseMapper { + + /** + * @description 查询用户浏览记录列表 + * @param filter 过滤条件 + * @return List 用户浏览记录列表 + * @author system + * @since 2025-10-15 + */ + List selectUserBrowseRecords(TbUserBrowseRecord filter); +} diff --git a/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserCollectionMapper.java b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserCollectionMapper.java new file mode 100644 index 0000000..4d2383a --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserCollectionMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.usercenter.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.usercenter.TbUserCollection; + +import java.util.List; + +/** + * @description 用户收藏数据访问层 + * @filename UserCollectionMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface UserCollectionMapper extends BaseMapper { + + /** + * @description 查询用户收藏列表 + * @param filter 过滤条件 + * @return List 用户收藏列表 + * @author system + * @since 2025-10-15 + */ + List selectUserCollections(TbUserCollection filter); +} diff --git a/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserPointsMapper.java b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserPointsMapper.java new file mode 100644 index 0000000..19a298a --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/java/org/xyzh/usercenter/mapper/UserPointsMapper.java @@ -0,0 +1,27 @@ +package org.xyzh.usercenter.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.xyzh.common.dto.usercenter.TbUserPoints; + +import java.util.List; + +/** + * @description 用户积分数据访问层 + * @filename UserPointsMapper.java + * @author system + * @copyright xyzh + * @since 2025-10-15 + */ +@Mapper +public interface UserPointsMapper extends BaseMapper { + + /** + * @description 查询用户积分列表 + * @param filter 过滤条件 + * @return List 用户积分列表 + * @author system + * @since 2025-10-15 + */ + List selectUserPoints(TbUserPoints filter); +} diff --git a/schoolNewsServ/usercenter/src/main/resources/mapper/AchievementMapper.xml b/schoolNewsServ/usercenter/src/main/resources/mapper/AchievementMapper.xml new file mode 100644 index 0000000..453a905 --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/resources/mapper/AchievementMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, achievement_id, name, description, icon, type, level, condition_type, + condition_value, points, order_num, creator, updater, create_time, + update_time, delete_time, deleted + + + + + + deleted = 0 + + AND achievement_id = #{achievementID} + + + AND name LIKE CONCAT('%', #{name}, '%') + + + AND type = #{type} + + + AND level = #{level} + + + AND condition_type = #{conditionType} + + + + + + + + diff --git a/schoolNewsServ/usercenter/src/main/resources/mapper/PointsRecordMapper.xml b/schoolNewsServ/usercenter/src/main/resources/mapper/PointsRecordMapper.xml new file mode 100644 index 0000000..48eb67d --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/resources/mapper/PointsRecordMapper.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + id, user_id, points, type, source_type, source_id, description, create_time + + + + + + + AND user_id = #{userID} + + + AND type = #{type} + + + AND source_type = #{sourceType} + + + AND source_id = #{sourceID} + + + + + + + + diff --git a/schoolNewsServ/usercenter/src/main/resources/mapper/UserAchievementMapper.xml b/schoolNewsServ/usercenter/src/main/resources/mapper/UserAchievementMapper.xml new file mode 100644 index 0000000..3852da1 --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/resources/mapper/UserAchievementMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + id, user_id, achievement_id, obtain_time + + + + + + + AND user_id = #{userID} + + + AND achievement_id = #{achievementID} + + + + + + + + diff --git a/schoolNewsServ/usercenter/src/main/resources/mapper/UserBrowseRecordMapper.xml b/schoolNewsServ/usercenter/src/main/resources/mapper/UserBrowseRecordMapper.xml new file mode 100644 index 0000000..c3a8a69 --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/resources/mapper/UserBrowseRecordMapper.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + id, user_id, browse_type, browse_id, browse_time, ip_address + + + + + + + AND user_id = #{userID} + + + AND browse_type = #{browseType} + + + AND browse_id = #{browseID} + + + AND ip_address = #{ipAddress} + + + + + + + + diff --git a/schoolNewsServ/usercenter/src/main/resources/mapper/UserCollectionMapper.xml b/schoolNewsServ/usercenter/src/main/resources/mapper/UserCollectionMapper.xml new file mode 100644 index 0000000..fbf0100 --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/resources/mapper/UserCollectionMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + id, user_id, collection_type, collection_id, create_time + + + + + + + AND user_id = #{userID} + + + AND collection_type = #{collectionType} + + + AND collection_id = #{collectionID} + + + + + + + + diff --git a/schoolNewsServ/usercenter/src/main/resources/mapper/UserPointsMapper.xml b/schoolNewsServ/usercenter/src/main/resources/mapper/UserPointsMapper.xml new file mode 100644 index 0000000..a305bfe --- /dev/null +++ b/schoolNewsServ/usercenter/src/main/resources/mapper/UserPointsMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + id, user_id, total_points, current_points, level, create_time, update_time + + + + + + + AND user_id = #{userID} + + + AND level = #{level} + + + + + + + +