【新增】mysql,win文件读取文件设置考点后端接口,题型增加判分规则
This commit is contained in:
@@ -89,6 +89,9 @@
|
||||
</where>
|
||||
ORDER BY sort ASC
|
||||
</select>
|
||||
<select id="selectExamQuestionAnswerIdByQuId" resultType="java.lang.String">
|
||||
select answer_id from exam_question_answer where qu_id =#{quId}
|
||||
</select>
|
||||
<insert id="insertExamQuestionAnswerList">
|
||||
insert into exam_question_answer
|
||||
(answer_id, qu_id, is_right, image, content,contentIn,score_rate,sort)
|
||||
|
@@ -115,6 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
FROM system_tenant
|
||||
WHERE deleted = 0
|
||||
</select>
|
||||
<select id="selectTenantId" resultType="java.lang.Long">
|
||||
select tenant_id from system_users limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertExamQuestion" parameterType="ExamQuestion">
|
||||
|
@@ -0,0 +1,15 @@
|
||||
<?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="pc.exam.pp.module.exam.dal.mysql.monitor.MonitorMapper">
|
||||
|
||||
<select id="selectByStuIdAndTaskIdTop" resultType="java.lang.String">
|
||||
select score from exam_monitor where stu_id =#{stuId} and task_id=#{taskId} ORDER BY score DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
<select id="selectByStuIdAndTaskIdNew" resultType="java.lang.String">
|
||||
select score from exam_monitor where stu_id =#{stuId} and task_id=#{taskId} ORDER BY create_time DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,12 @@
|
||||
<?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="pc.exam.pp.module.exam.dal.mysql.mysqlkeyword.MysqlKeywordMapper">
|
||||
|
||||
|
||||
<delete id="deleteByAnswerId">
|
||||
delete from exam_mysql_keyword where answer_id=#{answerId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@@ -13,14 +13,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="status" column="status" />
|
||||
<result property="unite" column="unite" />
|
||||
<result property="treeNum" column="tree_num" />
|
||||
<result property="roles" column="roles" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamSpecialtyVo">
|
||||
select sp_id, parent_id, ancestors, sp_name, order_num, status, creator, create_time, updater, update_time, unite, tree_num, tenant_id from exam_specialty
|
||||
select sp_id, parent_id, ancestors, sp_name, order_num, status, creator, create_time, updater, update_time, unite, tree_num, roles,tenant_id from exam_specialty
|
||||
</sql>
|
||||
|
||||
<select id="selectExamSpecialtyListVo" resultType="pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtyQueryVo">
|
||||
select sp_id as id, sp_name as name, parent_id, status, create_time from exam_specialty
|
||||
select sp_id as id, sp_name as name, parent_id, status, create_time,roles from exam_specialty
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and sp_name like concat('%', #{name}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
@@ -90,6 +91,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectExamSpecialtyVo"/>
|
||||
where sp_id = #{spId}
|
||||
</select>
|
||||
<select id="getRoleById" resultType="java.lang.String">
|
||||
select roles
|
||||
from exam_specialty where sp_id =#{id};
|
||||
</select>
|
||||
|
||||
<update id="deleteExamSpecialtyBySpId" parameterType="Long">
|
||||
update exam_specialty
|
||||
|
Reference in New Issue
Block a user