Compare commits

..

2 Commits

Author SHA1 Message Date
Palpitate ea716687c5 2025/10/
4 months ago
Palpitate c2cbf4543d 2025/10/20
4 months ago

Binary file not shown.

Binary file not shown.

BIN
study-main/.DS_Store vendored

Binary file not shown.

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2017-present PanJiaChen
Copyright (c) 2021 孤傲的小笼包
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -0,0 +1,82 @@
### 项目演示
开源版本https://lite.yfhl.net
管理账号admin/admin
学员账号person/person
注意事项:演示环境数据每天晚上会重新初始化,不要往上面导入重要数据;如果账号密码被改无法登录,请联系我们;或等到第二天再访问 :joy:
官网地址https://www.jeedocm.com/?plan=osyfstudy
QQ交流群2群757328773
QQ交流群3群537163131
商业版咨询
杨经理:
手 机18710213152
微信号youyouwx0613
邮 箱626264481@qq.com
![输入图片说明](touxiang.png)
# 介绍
一款多角色在线培训考试系统,系统集成了用户管理、角色管理、部门管理、题库管理、试题管理、试题导入导出、考试管理、在线考试、错题训练等功能,考试流程完善。
# 技术栈
SpringBoot / Shiro / Vue / MySQL
# 产品功能
## 系统完善:完善的权限控制和用户系统
权限控制基于Shiro和JWT开发的权限控制功能。
用户系统:用户管理、部门管理、角色管理等。
## 多角色:多角色支持
考试端:学生学员角色、支持在线考试、查看分数、训练错题。
管理端:题库管理、试题管理、考试管理、用户部门管理、查看考试情况等等。
## 定员考试:考试权限定义
完全公开:任何人员都可以参与考试。
指定部门:只有选中部门的人员才可以看到考试。
## 多题型:常用题型支持
支持题型:单选题、多选题、判断题。
难易程度:普通、困难。
## 便捷组卷:题库组卷
题库组卷:指定题库、分数、数量;题目、选项随机排序、杜绝作弊
# 环境要求
JDK 1.8+ [点此下载](https://cdn.yfhl.net/java-win/jdk-8u181-windows-x64.exe)
Mysql5.7+ [点此下载](https://cdn.yfhl.net/java-win/mysql-installer-community-5.7.31.0.msi)
# 安装资源
1、安装JDK1.8
https://cdn.yfhl.net/java-win/jdk-8u181-windows-x64.exe
2、安装MySQL
https://cdn.yfhl.net/java-win/mysql-installer-community-5.7.31.0.msi
-- 安装过程可能需要VC++
-- https://www.microsoft.com/zh-CN/download/details.aspx?id=40784
-- 安装数据库管理工具
https://cdn.yfhl.net/java-win/SQLyog.12.3.1.0.zip
# 安装视频
https://www.ixigua.com/7041491265027834381?utm_source=xiguastudio
# 快速运行
1、下载编译好的jar包到本目录或您自行编译https://cdn.yfhl.net/lite/exam-api.jar
2、自行安装MySQL数据库版本最好是5.7),将`安装资源中`的`数据库初始化.sql`导入到安装好的数据库
3、安装Java环境要求JDK版本大于1.8
4、请修改外置配置文件application-local.yml 改成您自己的MySQL配置
5、Windows通过start.bat运行Linux运行start.sh运行
6、如果无意外可通过http://localhost:8101 访问到项目了
7、管理员账号密码admin/admin 学员账号person/person

@ -68,7 +68,7 @@ server:
conf:
upload:
# 物理文件存储位置,以/结束windows已正斜杠d:/exam-upload/
dir: d:/upload/
dir: /data/upload/
# 访问地址,注意不要去除/upload/file/,此节点为虚拟标识符
# 如http://localhost:8101/upload/file/exam.jpg对应物理文件为/data/upload/exam.jpg
url: http://localhost:8101/upload/file/

@ -0,0 +1 @@
java -jar exam-api.jar --spring.config.location=application-local.yml

@ -0,0 +1 @@
java -jar exam-api.jar --spring.config.location=application-local.yml

@ -0,0 +1,7 @@
1、下载编译好的jar包到本目录或您自行编译https://cdn.yfhl.net/lite/exam-api.jar
2、自行安装MySQL数据库版本最好是5.7),将`安装资源中`的`数据库初始化.sql`导入到安装好的数据库
3、安装Java环境要求JDK版本大于1.8
4、请修改外置配置文件application-local.yml 改成您自己的MySQL配置
5、Windows通过start.bat运行Linux运行start.sh运行
6、如果无意外可通过http://localhost:8101 访问到项目了
7、管理员账号密码admin/admin 学员账号person/person

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 MiB

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 部门查询操作 -->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yf.exam.modules.sys.depart.mapper.SysDepartMapper">
<!-- 实体类SysDepart与数据库表的字段通过BaseResultMap进行映射 -->
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.yf.exam.modules.sys.depart.entity.SysDepart">
<id column="id" property="id" />
<result column="dept_type" property="deptType" />
<result column="parent_id" property="parentId" />
<result column="dept_name" property="deptName" />
<result column="dept_code" property="deptCode" />
<result column="sort" property="sort" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
`id`,`dept_type`,`parent_id`,`dept_name`,`dept_code`,`sort`
</sql>
<!-- 树形结构查询,扩展自BaseResultMap,返回的结果包含所有下级部门 -->
<resultMap id="TreeResultMap"
type="com.yf.exam.modules.sys.depart.dto.response.SysDepartTreeDTO"
extends="BaseResultMap">
<collection property="children" column="id" select="findChildren"></collection>
</resultMap>
<!-- 通过parent_id关联当前部门ID递归获取所有子部门 -->
<select id="findChildren" resultMap="TreeResultMap">
SELECT * FROM sys_depart WHERE parent_id=#{id}
</select>
<!-- 从顶级部门parent_id='0')开始,支持按部门名称模糊搜索 -->
<select id="paging" resultMap="TreeResultMap">
SELECT * FROM sys_depart WHERE parent_id='0'
<if test="query!=null">
<if test="query.deptName!=null and query.deptName!=''">
AND dept_name LIKE CONCAT('%',#{query.deptName},'%')
</if>
</if>
</select>
</mapper>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 通用字典查询方法 -->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yf.exam.modules.sys.system.mapper.SysDictMapper">
<select id="findDict" resultType="String">
SELECT ${text} FROM ${table} WHERE ${key}=${value} LIMIT 1
</select>
</mapper>

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- SysRole实体类的基础字段映射 -->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yf.exam.modules.sys.user.mapper.SysRoleMapper">
<!-- 实体类SysRole与数据库表的字段通过BaseResultMap进行映射 -->
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.yf.exam.modules.sys.user.entity.SysRole">
<id column="id" property="id" />
<result column="role_name" property="roleName" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
`id`,`role_name`
</sql>
</mapper>

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 数据库表sys_user的基础操作映射 -->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yf.exam.modules.sys.user.mapper.SysUserMapper">
<!-- 实体类SysUser与数据库表的字段通过BaseResultMap进行映射 -->
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.yf.exam.modules.sys.user.entity.SysUser">
<id column="id" property="id" />
<result column="user_name" property="userName" />
<result column="real_name" property="realName" />
<result column="password" property="password" />
<result column="salt" property="salt" />
<result column="role_ids" property="roleIds" />
<result column="depart_id" property="departId" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="state" property="state" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
`id`,`user_name`,`real_name`,`password`,`salt`,`role_ids`,`depart_id`,`create_time`,`update_time`,`state`
</sql>
</mapper>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 映射用户与角色的关联关系 -->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yf.exam.modules.sys.user.mapper.SysUserRoleMapper">
<!-- 实体类SysUserRole与数据库表的字段通过BaseResultMap进行映射 -->
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.yf.exam.modules.sys.user.entity.SysUserRole">
<id column="id" property="id" />
<result column="user_id" property="userId" />
<result column="role_id" property="roleId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
`id`,`user_id`,`role_id`
</sql>
</mapper>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 定义了实体类UserBook错题记录与数据库表之间的映射关系 -->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yf.exam.modules.user.book.mapper.UserBookMapper">
<!-- 实体类UserBook与数据库表的字段通过BaseResultMap进行映射 -->
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.yf.exam.modules.user.book.entity.UserBook">
<id column="id" property="id" />
<result column="exam_id" property="examId" />
<result column="user_id" property="userId" />
<result column="qu_id" property="quId" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="wrong_count" property="wrongCount" />
<result column="title" property="title" />
<result column="sort" property="sort" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
`id`,`exam_id`,`user_id`,`qu_id`,`create_time`,`update_time`,`wrong_count`,`title`,`sort`
</sql>
</mapper>

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 用户错题记录管理 -->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yf.exam.modules.user.exam.mapper.UserExamMapper">
<!-- 实体类UserExam与数据库表的字段通过BaseResultMap进行映射 -->
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.yf.exam.modules.user.exam.entity.UserExam">
<id column="id" property="id" />
<result column="user_id" property="userId" />
<result column="exam_id" property="examId" />
<result column="try_count" property="tryCount" />
<result column="max_score" property="maxScore" />
<result column="passed" property="passed" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
`id`,`user_id`,`exam_id`,`try_count`,`max_score`,`passed`,`create_time`,`update_time`
</sql>
<!-- 分页查询扩展映射,为分页查询结果增加关联表字段,用于前端展示,扩展自BaseResultMap -->
<resultMap id="ListResultMap"
type="com.yf.exam.modules.user.exam.dto.response.UserExamRespDTO"
extends="BaseResultMap">
<result column="title" property="title" />
<result column="real_name" property="realName" />
</resultMap>
<!-- 分页查询,支持考试标题模糊搜索和实名模糊匹配 -->
<select id="paging" resultMap="ListResultMap">
SELECT ue.*,ee.title,uc.real_name FROM el_user_exam ue
LEFT JOIN el_exam ee ON ue.exam_id=ee.id
LEFT JOIN sys_user uc ON ue.user_id=uc.id
WHERE ee.id IS NOT NULL AND uc.id IS NOT NULL
<if test="query!=null">
<if test="query.userId!=null and query.userId!=''">
AND ue.user_id='{{userId}}'
</if>
<if test="query.examId!=null and query.examId!=''">
AND ue.exam_id = #{query.examId}
</if>
<if test="query.title!=null and query.title!=''">
AND ee.title LIKE CONCAT('%',#{query.title},'%')
</if>
<if test="query.realName!=null and query.realName!=''">
AND uc.real_name LIKE CONCAT('%',#{query.realName},'%')
</if>
</if>
</select>
</mapper>

@ -0,0 +1,10 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# 依赖于环境的 Maven 主目录路径
/mavenHomeManager.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -2,7 +2,7 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/study-main.iml" filepath="$PROJECT_DIR$/.idea/study-main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/mapper.iml" filepath="$PROJECT_DIR$/.idea/mapper.iml" />
</modules>
</component>
</project>

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save