54 lines
1.7 KiB
XML
54 lines
1.7 KiB
XML
<?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="cn.iocoder.yudao.module.course.mapper.ProcessMapper">
|
|
|
|
<update id="updateProcessBatch">
|
|
UPDATE drive_school_process
|
|
SET exam_status = '9'
|
|
WHERE
|
|
user_id IN
|
|
<foreach collection="userIdList" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
AND course_id = #{courseId}
|
|
AND `subject` = #{subject}
|
|
AND coach_id = #{coachId}
|
|
AND exam_status IS NULL
|
|
AND deleted =0
|
|
</update>
|
|
<update id="updateProcessExamResult">
|
|
|
|
</update>
|
|
<select id="selectNewMaxByUserId" resultType="cn.iocoder.yudao.module.course.entity.Process">
|
|
SELECT
|
|
dsp.* FROM drive_school_process dsp
|
|
WHERE
|
|
dsp.user_id = #{userId}
|
|
<if test="coachId != null and coachId != ''">
|
|
AND dsp.coach_id=#{coachId}
|
|
</if>
|
|
ORDER BY dsp.`subject` DESC, dsp.create_time DESC LIMIT 1
|
|
</select>
|
|
<select id="selectAllTrainTime" resultType="java.lang.Double">
|
|
SELECT
|
|
SUM(dsp.train_time)
|
|
FROM
|
|
drive_school_process dsp
|
|
WHERE
|
|
dsp.user_id = #{userId}
|
|
AND dsp.deleted = 0
|
|
AND dsp.course_id = #{courseId}
|
|
AND (( dsp.`status` = '2' AND dsp.exam_status = '1' ) OR dsp.`status` = '1' )
|
|
</select>
|
|
<select id="pageProcess" resultType="cn.iocoder.yudao.module.course.vo.ProcessVO">
|
|
SELECT
|
|
dsp.* FROM drive_school_process dsp
|
|
<where>
|
|
desp.deleted = 0
|
|
|
|
</where>
|
|
</select>
|
|
</mapper>
|