|
@@ -657,7 +657,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
ustp.create_time
|
|
ustp.create_time
|
|
|
FROM
|
|
FROM
|
|
|
user_study_record usr
|
|
user_study_record usr
|
|
|
- LEFT JOIN user_study_record_photo ustp ON usr.record_id = ustp.record_id
|
|
|
|
|
|
|
+ INNER JOIN user_study_record_photo ustp ON usr.record_id = ustp.record_id
|
|
|
LEFT JOIN goods g ON usr.goods_id = g.goods_id
|
|
LEFT JOIN goods g ON usr.goods_id = g.goods_id
|
|
|
LEFT JOIN course_education_type cet ON g.education_type_id = cet.id
|
|
LEFT JOIN course_education_type cet ON g.education_type_id = cet.id
|
|
|
LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
|
|
LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
|
|
@@ -668,10 +668,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND usr.user_id = #{userId}
|
|
AND usr.user_id = #{userId}
|
|
|
AND usr.tenant_id = #{tenantId}
|
|
AND usr.tenant_id = #{tenantId}
|
|
|
AND INSTR( CONCAT( cet.education_name, cb.business_name, cpt.project_name ), #{businessName} )
|
|
AND INSTR( CONCAT( cet.education_name, cb.business_name, cpt.project_name ), #{businessName} )
|
|
|
- AND cg.class_start_time >= UNIX_TIMESTAMP(NOW())
|
|
|
|
|
- AND cg.class_end_time <= UNIX_TIMESTAMP(NOW())
|
|
|
|
|
|
|
+ AND cg.class_start_time <= UNIX_TIMESTAMP(NOW())
|
|
|
|
|
+ AND cg.class_end_time >= UNIX_TIMESTAMP(NOW())
|
|
|
AND cg.`status` = 1
|
|
AND cg.`status` = 1
|
|
|
- ORDER BY ustp.create_time ASC
|
|
|
|
|
|
|
+ ORDER BY ustp.create_time ASC LIMIT 1
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getUserOrderCount" parameterType="map" resultType="java.lang.Long">
|
|
<select id="getUserOrderCount" parameterType="map" resultType="java.lang.Long">
|