【新增】mysql判分关键点,【修改】mysql判分全部读文件,后面改到云数据库上
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?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.question.ExamMysqlKeywordMapper">
|
||||
|
||||
<resultMap type="ExamMysqlKeyword" id="ExamMysqlKeywordResult">
|
||||
<result property="keywordId" column="keyword_id" />
|
||||
<result property="answerId" column="answer_id" />
|
||||
<result property="keyword" column="keyword" />
|
||||
<result property="scoreRate" column="score_rate" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamMysqlKeywordVo">
|
||||
select keyword_id, answer_id, keyword, score_rate from exam_mysql_keyword
|
||||
</sql>
|
||||
<select id="selectListByAnswerId" resultMap="ExamMysqlKeywordResult">
|
||||
|
||||
<include refid="selectExamMysqlKeywordVo"/>
|
||||
where answer_id =#{answerId}
|
||||
</select>
|
||||
<select id="selectByAnswerIds" resultType="java.lang.String" parameterType="java.util.List">
|
||||
SELECT CAST(SUM(CAST(score_rate AS UNSIGNED)) AS CHAR)
|
||||
FROM exam_mysql_keyword
|
||||
WHERE answer_id IN
|
||||
<foreach collection="list" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user