| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getUserByExamByTemplateId" resultType="com.mindskip.xzs.domain.User" parameterType="com.mindskip.xzs.domain.ExamPaper"> |
| | | <![CDATA[ |
| | | SELECT DISTINCT |
| | | d.* |
| | | FROM |
| | | t_exam_templates a |
| | | INNER JOIN t_exam_templates_user_count b ON a.id = b.exam_templates_id and a.id = ${id} |
| | | LEFT JOIN t_exam_paper_answer c ON b.exam_paper_id = c.exam_paper_id AND c.create_user = b.user_id and invalid = 0 |
| | | LEFT JOIN t_user d ON b.user_id = d.id |
| | | WHERE |
| | | ( c.id IS NULL OR ( user_score / paper_score ) < 0.6 ) |
| | | AND b.user_id = #{createUser} |
| | | ]]> |
| | | </select> |
| | | |
| | | </mapper> |