|
@@ -594,6 +594,53 @@
|
|
|
</if>
|
|
</if>
|
|
|
order by o.create_time desc
|
|
order by o.create_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="goodsHandoutsList" parameterType="com.zhongzheng.modules.course.bo.CourseQueryBo" resultMap="GoodsUserVo">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ g.*,
|
|
|
|
|
+ o.user_id,
|
|
|
|
|
+ og.study_count as order_study_count,
|
|
|
|
|
+ og.order_goods_id,
|
|
|
|
|
+ og.service_start_time,
|
|
|
|
|
+ og.service_end_time,
|
|
|
|
|
+ cb.goods_learning_order,
|
|
|
|
|
+ (SELECT cet.education_name FROM course_education_type cet where cet.id = g.education_type_id) as education_name,
|
|
|
|
|
+ (SELECT cet.project_name FROM course_project_type cet where cet.id = g.project_id) as project_name,
|
|
|
|
|
+ (SELECT cet.business_name FROM course_business cet where cet.id = g.business_id) as business_name,
|
|
|
|
|
+ (SELECT GROUP_CONCAT(subject_name) from course_subject where FIND_IN_SET(id,g.subject_ids)) subject_names
|
|
|
|
|
+ FROM
|
|
|
|
|
+ `order` o
|
|
|
|
|
+ LEFT JOIN order_goods og ON og.order_sn = o.order_sn
|
|
|
|
|
+ LEFT JOIN goods g on og.goods_id = g.goods_id
|
|
|
|
|
+ LEFT JOIN course_business cb on g.business_id = cb.id
|
|
|
|
|
+ where 1=1
|
|
|
|
|
+ AND og.`status` = 1
|
|
|
|
|
+ -- AND og.refund_status in (0,1,3)
|
|
|
|
|
+ AND og.refund_status in (0,3)
|
|
|
|
|
+ AND og.pay_status in (2,3,4)
|
|
|
|
|
+ AND g.goods_type =8
|
|
|
|
|
+ <if test="pageNum == null">
|
|
|
|
|
+ and (SELECT count(*) from class_grade cg where (cg.class_end_time > unix_timestamp(now()) or ISNULL(cg.class_end_time)) and cg.grade_id = og.grade_id ) >0
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
|
|
+ and o.user_id = #{userId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="educationTypeId != null and educationTypeId != ''">
|
|
|
|
|
+ AND g.education_type_id = #{educationTypeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
|
|
+ AND g.business_id = #{businessId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="orderGoodsId != null and orderGoodsId != ''">
|
|
|
|
|
+ AND og.order_goods_id = #{orderGoodsId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="goodsId != null and goodsId != ''">
|
|
|
|
|
+ AND og.goods_id = #{goodsId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ order by o.create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<select id="courseList" parameterType="com.zhongzheng.modules.course.bo.CourseQueryBo" resultMap="CourseUserVo">
|
|
<select id="courseList" parameterType="com.zhongzheng.modules.course.bo.CourseQueryBo" resultMap="CourseUserVo">
|
|
|
SELECT
|
|
SELECT
|
|
|
c.*,
|
|
c.*,
|