zengh
2022-07-12 7c86454ff569dc54bbe7e34988750a1df762a2c3
src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
@@ -55,10 +55,10 @@
            and es.qualified = #{examScore.qualified}
        </if>
        <if test="examScore.startTime!=null and examScore.startTime!=''">
            and bu.paper_time &gt;= #{examScore.startTime}
            and es.exam_time &gt;= #{examScore.startTime}
        </if>
        <if test="examScore.endTime!=null and examScore.endTime!=''">
            and bu.paper_time &lt;= #{examScore.endTime}
            and es.exam_time &lt;= #{examScore.endTime}
        </if>
        order by es.id desc
    </select>
@@ -141,4 +141,23 @@
        </if>
        order by es.id desc
    </select>
    <!--根据用户身份证号查询考试成绩-->
    <select id="getExamScoreInfoByIdCardNo" resultType="org.springblade.modules.exam.entity.ExamScore">
        select
            es.*
        from
            exam_score es
        left join
            blade_user bu
        on
            bu.id = es.user_id
        left join
            ksxt_exam ke
        on
            ke.id = es.exam_id
        where
            bu.cardid = #{idCardNo}
            and DATE_FORMAT(ke.start_time,'%Y-%m-%d') = #{startTime}
    </select>
</mapper>