| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.jxkg.mapper.ExamPaperScoreMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ycl.jxkg.domain.entity.ExamPaperScore"> |
| | | <id column="id" jdbcType="INTEGER" property="id"/> |
| | | <result column="exam_id" jdbcType="INTEGER" property="examId"/> |
| | | <result column="exam_name" jdbcType="VARCHAR" property="examName"/> |
| | | <result column="paper_type" jdbcType="INTEGER" property="paperType"/> |
| | | <result column="score" jdbcType="INTEGER" property="score"/> |
| | | <result column="total_score" jdbcType="INTEGER" property="totalScore"/> |
| | | <result column="question_correct" jdbcType="INTEGER" property="questionCorrect"/> |
| | | <result column="question_count" jdbcType="INTEGER" property="questionCount"/> |
| | | <result column="do_time" jdbcType="INTEGER" property="doTime"/> |
| | | <result column="status" jdbcType="INTEGER" property="status"/> |
| | | <result column="user_id" jdbcType="INTEGER" property="userId"/> |
| | | <result column="judge_user" jdbcType="INTEGER" property="judgeUser"/> |
| | | <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> |
| | | <result column="submit_time" jdbcType="TIMESTAMP" property="submitTime"/> |
| | | <result column="exam_id" jdbcType="INTEGER" property="examId"/> |
| | | <result column="exam_name" jdbcType="INTEGER" property="examName"/> |
| | | <result column="paper_content" jdbcType="INTEGER" property="paperContent"/> |
| | | <id column="id" property="id"/> |
| | | <result column="paper_id" property="examPaperId"/> |
| | | <result column="paper_name" property="paperName"/> |
| | | <result column="paper_type" property="paperType"/> |
| | | <result column="score" property="score"/> |
| | | <result column="total_score" property="totalScore"/> |
| | | <result column="question_correct" property="questionCorrect"/> |
| | | <result column="question_count" property="questionCount"/> |
| | | <result column="do_time" property="doTime"/> |
| | | <result column="status" property="status"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="judge_user" property="judgeUser"/> |
| | | <result column="submit_time" property="submitTime"/> |
| | | <result column="judge_time" property="judgeTime"/> |
| | | <result column="exam_id" property="examId"/> |
| | | <result column="exam_name" property="examName"/> |
| | | <result column="paper_content" property="paperContent"/> |
| | | <result column="navbar" property="navbar"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | id, |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="getByExamIdUserId" resultType="com.ycl.jxkg.domain.entity.ExamPaperScore"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | from t_exam_paper_score |
| | | <where> |
| | | and user_id = #{userId} |
| | | and exam_id = #{examId} |
| | | </where> |
| | | </select> |
| | | <select id="selectAllCount" resultType="java.lang.Integer"> |
| | | SELECT count(*) |
| | | from t_exam_paper_score |
| | |
| | | </select> |
| | | |
| | | <select id="selectCountByDate" resultType="com.ycl.jxkg.domain.other.KeyValue"> |
| | | SELECT create_time as name, COUNT(create_time) as value |
| | | from (SELECT DATE_FORMAT(create_time, '%Y-%m-%d') as create_time |
| | | from t_exam_paper_score |
| | | WHERE create_time between #{startTime} and #{endTime}) a |
| | | GROUP BY create_time |
| | | SELECT submit_time as name, sum(question_count) as value |
| | | from |
| | | ( |
| | | SELECT question_count ,DATE_FORMAT(submit_time, '%Y-%m-%d') as submit_time from t_exam_paper_score |
| | | WHERE submit_time between #{startTime} and #{endTime} |
| | | ) a |
| | | GROUP BY submit_time |
| | | </select> |
| | | |
| | | |