|
@@ -102,7 +102,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
(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_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_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 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 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
|
|
|
FROM
|
|
FROM
|
|
|
class_grade g
|
|
class_grade g
|
|
|
where 1=1
|
|
where 1=1
|
|
@@ -115,6 +117,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="classId != null and classId !=0 ">
|
|
<if test="classId != null and classId !=0 ">
|
|
|
AND g.class_id = #{classId}
|
|
AND g.class_id = #{classId}
|
|
|
</if>
|
|
</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.class_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.class_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.class_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.class_id = s.grade_id
|
|
|
|
|
+ AND d.major_id =#{majorId}
|
|
|
|
|
+ ) >0
|
|
|
|
|
+ </if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="queryGoodsList" parameterType="Long" resultMap="GoodsResultVo">
|
|
<select id="queryGoodsList" parameterType="Long" resultMap="GoodsResultVo">
|