|
@@ -587,6 +587,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
order by user_info_status desc ,user_status desc ,cgu.id desc
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <select id="getPlush" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo" resultType="integer">
|
|
|
+ SELECT
|
|
|
+ count(*) AS count
|
|
|
+ FROM
|
|
|
+ class_grade_user cgu
|
|
|
+ LEFT JOIN class_grade cg ON cgu.grade_id = cg.grade_id
|
|
|
+ LEFT JOIN `user` u ON u.user_id = cgu.user_id
|
|
|
+ LEFT JOIN order_goods og on cgu.order_goods_id = og.order_goods_id
|
|
|
+ LEFT JOIN goods g on og.goods_id = g.goods_id
|
|
|
+ LEFT JOIN major m ON g.major_id = m.id
|
|
|
+ LEFT JOIN course_business cb ON g.business_id = cb.id
|
|
|
+ LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
|
|
|
+ LEFT JOIN course_education_type cet ON g.education_type_id = cet.id
|
|
|
+ LEFT JOIN user_wx_follow uwf ON u.union_id = uwf.union_id
|
|
|
+ LEFT JOIN user_exam_goods ueg ON ueg.order_goods_id = og.order_goods_id
|
|
|
+ LEFT JOIN user_profile up on cgu.order_goods_id = up.order_goods_id and up.type_status=1 and up.current_status = 1
|
|
|
+ where 1=1 and cgu.`status` = 1
|
|
|
+ <if test="gradeId != null and gradeId !='' and (sevenCode == null or sevenCode =='')">
|
|
|
+ and cgu.grade_id = #{gradeId}
|
|
|
+ </if>
|
|
|
+ <if test="officialStatus != null and officialStatus == 1 ">
|
|
|
+ AND cgu.official_status = 1
|
|
|
+ </if>
|
|
|
+ <if test="officialStatus != null and officialStatus == 0 ">
|
|
|
+ AND (cgu.official_status is NULL or cgu.official_status=0)
|
|
|
+ </if>
|
|
|
+ <if test="periodPlush != null and periodPlush == 1 ">
|
|
|
+ AND cgu.period_plush = 1
|
|
|
+ </if>
|
|
|
+ <if test="periodPlush != null and periodPlush == 0 ">
|
|
|
+ AND (cgu.period_plush is NULL or cgu.period_plush=0)
|
|
|
+ </if>
|
|
|
+ order by user_info_status desc ,user_status desc ,cgu.id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="listGradeAll" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo" resultMap="ClassGradeStudentVo">
|
|
|
SELECT
|
|
|
cgu.id,
|