|
|
@@ -53,10 +53,11 @@
|
|
|
FROM
|
|
|
goal_info goal
|
|
|
WHERE
|
|
|
+ goal.publish_flag >0 AND (
|
|
|
NOT EXISTS ( SELECT 1 FROM stu_goal_info sgi WHERE sgi.student_id = #{studentId} AND sgi.goal_info_id = goal.id )
|
|
|
OR (
|
|
|
EXISTS ( SELECT 1 FROM stu_goal_info sg WHERE sg.student_id = #{studentId} AND sg.goal_info_id = goal.id AND sg.correct_status < 2 )
|
|
|
- AND NOT EXISTS ( SELECT 1 FROM stu_goal_info si WHERE si.student_id = #{studentId} AND si.goal_info_id = goal.id AND si.correct_status >= 2 ))
|
|
|
+ AND NOT EXISTS ( SELECT 1 FROM stu_goal_info si WHERE si.student_id = #{studentId} AND si.goal_info_id = goal.id AND si.correct_status >= 2 )))
|
|
|
ORDER BY goal.id
|
|
|
</select>
|
|
|
|
|
|
@@ -69,14 +70,14 @@
|
|
|
left join goal_info goal on student.goal_info_id = goal.id
|
|
|
left join course_info course on goal.course_id = course.id
|
|
|
<where>
|
|
|
- <if test="stuGoalInfo.studentId != null">
|
|
|
- and student.student_id = #{stuGoalInfo.studentId}
|
|
|
+ <if test="stuGoalInfoDto.studentId != null">
|
|
|
+ and student.student_id = #{stuGoalInfoDto.studentId}
|
|
|
</if>
|
|
|
- <if test="stuGoalInfo.goalInfoId != null">
|
|
|
- and goal.id = #{stuGoalInfo.goalInfoId}
|
|
|
+ <if test="stuGoalInfoDto.goalInfoId != null">
|
|
|
+ and goal.id = #{stuGoalInfoDto.goalInfoId}
|
|
|
</if>
|
|
|
- <if test="stuGoalInfo.createDate != null and stuGoalInfo.createDate != ''">
|
|
|
- AND student.create_date BETWEEN #{stuGoalInfo.startDate} AND #{stuGoalInfo.endDate}
|
|
|
+ <if test="stuGoalInfoDto.createDate != null and stuGoalInfoDto.createDate != ''">
|
|
|
+ AND student.create_date BETWEEN #{stuGoalInfoDto.startDate} AND #{stuGoalInfoDto.endDate}
|
|
|
</if>
|
|
|
</where>
|
|
|
order by student.goal_info_id
|