| | |
| | | ) |
| | | </update> |
| | | |
| | | <update id="setMissExamByTemplate"> |
| | | update t_exam_paper_answer |
| | | set invalid = 1 |
| | | where exam_paper_id |
| | | in |
| | | <foreach collection="paperIds" item="item" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | and create_user in ( |
| | | <foreach collection="userIds" item="item" index="index" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | </update> |
| | | |
| | | |
| | | <select id="studentPage" resultMap="BaseResultMap" parameterType="com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM"> |
| | | SELECT |
| | |
| | | select count(*) from t_exam_paper_answer a |
| | | inner join |
| | | (select user_id from t_user_department |
| | | <where> |
| | | and department_id in |
| | | <foreach collection="deptIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </where> |
| | | <if test="deptIds != null and deptIds.size() > 0"> |
| | | where department_id in |
| | | <foreach collection="deptIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | group by user_id) |
| | | b on a.create_user = b.user_id |
| | | </select> |