|
@@ -18,5 +18,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="chapterId" column="chapter_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <select id="checkGoodsChange" parameterType="com.zhongzheng.modules.grade.bo.UserPeriodQueryBo" resultType="Long">
|
|
|
+ SELECT
|
|
|
+ IFNULL(count(*),0)
|
|
|
+ FROM
|
|
|
+ user_period up
|
|
|
+ LEFT JOIN class_grade_user cgu ON up.grade_id = cgu.grade_id
|
|
|
+ WHERE
|
|
|
+ cgu.period_status = 1
|
|
|
+ <if test="goodsId != null and goodsId != ''">
|
|
|
+ and up.goods_id = #{goodsId}
|
|
|
+ </if>
|
|
|
+ <if test="gradeId != null and gradeId != ''">
|
|
|
+ and up.grade_id = #{gradeId}
|
|
|
+ </if>
|
|
|
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and up.user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="sectionId != null ">
|
|
|
+ and up.section_id = #{sectionId}
|
|
|
+ </if>
|
|
|
+ <if test="moduleId != null ">
|
|
|
+ and up.module_id = #{moduleId}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="chapterId != null">
|
|
|
+ and up.chapter_id = #{chapterId}
|
|
|
+ </if>
|
|
|
+ <if test="courseId != null ">
|
|
|
+ and up.course_id = #{courseId}
|
|
|
+ </if>
|
|
|
+ <if test="examId != null ">
|
|
|
+ and up.exam_id = #{examId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|