|
@@ -54,6 +54,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="checkGoodsStudy" parameterType="com.zhongzheng.modules.grade.bo.UserPeriodQueryBo" resultType="Long">
|
|
|
+ SELECT
|
|
|
+ IFNULL(count(*),0)
|
|
|
+ FROM
|
|
|
+ user_period up
|
|
|
+ WHERE
|
|
|
+ <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>
|
|
|
+
|
|
|
<select id="selectCountPeriod" parameterType="map" resultType="Long">
|
|
|
SELECT
|
|
|
COUNT(1)
|