|
@@ -140,8 +140,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
(SELECT p.project_name FROM course_project_type p where p.id = g.business_id) as project_name,
|
|
|
(SELECT s.school_name FROM school s where s.id = g.school_id) as school_name,
|
|
|
(SELECT e.education_name FROM course_education_type e where e.id = g.education_type_id) as education_name,
|
|
|
- (SELECT r.start_time FROM user_study_record r LEFT JOIN goods_course c on r.course_id= c.course_id where 1=1 and r.user_id = #{userId} AND g.goods_id=c.goods_id ORDER BY r.start_time ASC LIMIT 1) as start_time,
|
|
|
- (SELECT r.end_time FROM user_study_record r LEFT JOIN goods_course c on r.course_id= c.course_id where 1=1 and r.user_id = #{userId} AND g.goods_id=c.goods_id ORDER BY r.start_time DESC LIMIT 1) as end_time
|
|
|
+ (SELECT r.start_time FROM user_study_record r where 1=1 and r.user_id = #{userId} AND g.goods_id=r.goods_id ORDER BY r.start_time ASC LIMIT 1) as start_time,
|
|
|
+ (SELECT r.end_time FROM user_study_record r where 1=1 and r.user_id = #{userId} AND g.goods_id=r.goods_id ORDER BY r.start_time DESC LIMIT 1) as end_time
|
|
|
FROM
|
|
|
class_grade_user u
|
|
|
LEFT JOIN class_grade_goods d ON u.grade_id = d.grade_id
|