|
@@ -50,6 +50,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="studentNum" column="student_num"/>
|
|
<result property="studentNum" column="student_num"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
+ <resultMap type="com.zhongzheng.modules.grade.vo.ClassGradeUserListVo" id="ClassGradeUserListVo">
|
|
|
|
+ <result property="gradeId" column="grade_id"/>
|
|
|
|
+ <result property="classStatus" column="class_status"/>
|
|
|
|
+ <result property="officialName" column="official_name"/>
|
|
|
|
+ <result property="className" column="class_name"/>
|
|
|
|
+ <result property="studentUpper" column="student_upper"/>
|
|
|
|
+ <result property="learningTimeStart" column="learning_time_start"/>
|
|
|
|
+ <result property="learningStatus" column="learning_status"/>
|
|
|
|
+ <result property="status" column="status"/>
|
|
|
|
+ <result property="classStartTime" column="class_start_time"/>
|
|
|
|
+ <result property="classEndTime" column="class_end_time"/>
|
|
|
|
+ <result property="examineId" column="examine_id"/>
|
|
|
|
+ <result property="areasId" column="areas_id"/>
|
|
|
|
+ <result property="sysUserId" column="sys_user_id"/>
|
|
|
|
+ <result property="interfacePushId" column="interface_push_id"/>
|
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
|
+ <result property="interfaceAccountId" column="interface_account_id"/>
|
|
|
|
+ <result property="interfacePeriodId" column="interface_period_id"/>
|
|
|
|
+ <result property="interfaceAccountName" column="interface_account_name"/>
|
|
|
|
+ <result property="interfacePeriodName" column="interface_period_name"/>
|
|
|
|
+ <result property="interfacePushName" column="interface_push_name"/>
|
|
|
|
+ <result property="studentNum" column="student_num"/>
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
|
|
<resultMap type="com.zhongzheng.modules.goods.vo.GoodsVo" id="GoodsResultVo">
|
|
<resultMap type="com.zhongzheng.modules.goods.vo.GoodsVo" id="GoodsResultVo">
|
|
<result property="goodsId" column="goods_id"/>
|
|
<result property="goodsId" column="goods_id"/>
|
|
@@ -117,6 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="recordNum" column="record_num"/>
|
|
<result property="recordNum" column="record_num"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
<select id="queryList" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeQueryBo" resultMap="ClassGradeVoResult">
|
|
<select id="queryList" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeQueryBo" resultMap="ClassGradeVoResult">
|
|
SELECT
|
|
SELECT
|
|
g.*,
|
|
g.*,
|
|
@@ -272,5 +298,98 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
order by cgu.create_time desc
|
|
order by cgu.create_time desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
-
|
|
|
|
|
|
+ <select id="listGradeInform" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeQueryBo" resultMap="ClassGradeUserListVo">
|
|
|
|
+ SELECT
|
|
|
|
+ g.*,
|
|
|
|
+ (SELECT name FROM class_grade_interface i where g.interface_push_id = i.id) as interface_push_name,
|
|
|
|
+ (SELECT name FROM class_grade_interface i where g.interface_account_id = i.id) as interface_account_name,
|
|
|
|
+ (SELECT name FROM class_grade_interface i where g.interface_period_id = i.id) as interface_period_name,
|
|
|
|
+ (SELECT nick_name FROM sys_user u where g.sys_user_id = u.user_id) as nick_name,
|
|
|
|
+ (SELECT area_name FROM apply_areas a where a.area_id = g.areas_id) as area_name,
|
|
|
|
+ (SELECT area_name FROM apply_areas a where a.area_id = g.city_id) as city_name,
|
|
|
|
+ (SELECT COUNT(a.id) FROM class_grade_user a where a.grade_id = g.grade_id and a.status =1) as student_num
|
|
|
|
+ FROM
|
|
|
|
+ class_grade g
|
|
|
|
+ where 1=1
|
|
|
|
+ <if test="status != null and status.size()!=0 ">
|
|
|
|
+ AND g.status in
|
|
|
|
+ <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="gradeId != null and gradeId !=0 ">
|
|
|
|
+ AND g.grade_id = #{gradeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="className != null and className !='' ">
|
|
|
|
+ AND g.class_name like concat('%', #{className}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="classStartTime != null and classStartTime !=0 ">
|
|
|
|
+ AND #{classStartTime} BETWEEN g.class_start_time and g.class_end_time or #{classEndTime} BETWEEN g.class_start_time and g.class_end_time
|
|
|
|
+ </if>
|
|
|
|
+ <if test="educationTypeId != null and educationTypeId !='' ">
|
|
|
|
+ AND (
|
|
|
|
+ SELECT
|
|
|
|
+ COUNT(*)
|
|
|
|
+ FROM
|
|
|
|
+ class_grade_goods s
|
|
|
|
+ LEFT JOIN goods d ON s.goods_id = d.goods_id
|
|
|
|
+ WHERE
|
|
|
|
+ 1 = 1
|
|
|
|
+ AND g.grade_id = s.grade_id
|
|
|
|
+ AND d.education_type_id =#{educationTypeId}
|
|
|
|
+ ) >0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="businessId != null and businessId !='' ">
|
|
|
|
+ AND (
|
|
|
|
+ SELECT
|
|
|
|
+ COUNT(*)
|
|
|
|
+ FROM
|
|
|
|
+ class_grade_goods s
|
|
|
|
+ LEFT JOIN goods d ON s.goods_id = d.goods_id
|
|
|
|
+ WHERE
|
|
|
|
+ 1 = 1
|
|
|
|
+ AND g.grade_id = s.grade_id
|
|
|
|
+ AND d.business_id =#{businessId}
|
|
|
|
+ ) >0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="schoolId != null and schoolId !='' ">
|
|
|
|
+ AND (
|
|
|
|
+ SELECT
|
|
|
|
+ COUNT(*)
|
|
|
|
+ FROM
|
|
|
|
+ class_grade_goods s
|
|
|
|
+ LEFT JOIN goods d ON s.goods_id = d.goods_id
|
|
|
|
+ WHERE
|
|
|
|
+ 1 = 1
|
|
|
|
+ AND g.grade_id = s.grade_id
|
|
|
|
+ AND d.school_id =#{schoolId}
|
|
|
|
+ ) >0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="majorId != null and majorId !='' ">
|
|
|
|
+ AND (
|
|
|
|
+ SELECT
|
|
|
|
+ COUNT(*)
|
|
|
|
+ FROM
|
|
|
|
+ class_grade_goods s
|
|
|
|
+ LEFT JOIN goods d ON s.goods_id = d.goods_id
|
|
|
|
+ WHERE
|
|
|
|
+ 1 = 1
|
|
|
|
+ AND g.grade_id = s.grade_id
|
|
|
|
+ AND d.major_id =#{majorId}
|
|
|
|
+ ) >0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="goodsId != null and goodsId !='' ">
|
|
|
|
+ AND (
|
|
|
|
+ SELECT
|
|
|
|
+ COUNT(*)
|
|
|
|
+ FROM
|
|
|
|
+ class_grade_goods s
|
|
|
|
+ WHERE
|
|
|
|
+ 1 = 1
|
|
|
|
+ AND g.grade_id = s.grade_id
|
|
|
|
+ AND s.goods_id =#{goodsId}
|
|
|
|
+ ) >0
|
|
|
|
+ </if>
|
|
|
|
+ order by g.update_time desc
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|