|
@@ -8,6 +8,7 @@
|
|
|
|
|
|
<resultMap type="com.ym.mec.biz.dal.entity.Student" id="Student">
|
|
|
<result column="user_id_" property="userId"/>
|
|
|
+ <result column="school_name_" property="schoolName"/>
|
|
|
<result column="subject_id_list_" property="subjectIdList"/>
|
|
|
<result column="subject_name_" property="subjectNames"/>
|
|
|
<result column="service_tag_" property="serviceTag"/>
|
|
@@ -77,7 +78,7 @@
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Student" useGeneratedKeys="true" keyColumn="id"
|
|
|
keyProperty="id">
|
|
|
- INSERT INTO student (user_id_,subject_id_list_,
|
|
|
+ INSERT INTO student (user_id_,school_name_,subject_id_list_,
|
|
|
<if test="serviceTag != null">
|
|
|
service_tag_,
|
|
|
</if>
|
|
@@ -87,7 +88,7 @@
|
|
|
teacher_id_,create_time_,update_time_,service_tag_update_time_,cooperation_organ_id_,
|
|
|
care_package_,come_on_package_,member_rank_setting_id_,membership_start_time_,membership_end_time_)
|
|
|
VALUES
|
|
|
- (#{userId},#{subjectIdList},
|
|
|
+ (#{userId},#{schoolName},#{subjectIdList},
|
|
|
<if test="serviceTag != null">
|
|
|
#{serviceTag},
|
|
|
</if>
|
|
@@ -101,6 +102,9 @@
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.Student">
|
|
|
UPDATE student
|
|
|
<set>
|
|
|
+ <if test="schoolName != null">
|
|
|
+ school_name_ = #{schoolName},
|
|
|
+ </if>
|
|
|
<if test="subjectIdList != null">
|
|
|
subject_id_list_ = #{subjectIdList},
|
|
|
</if>
|
|
@@ -232,6 +236,9 @@
|
|
|
<foreach collection="studentList" item="item" index="index" open="" close="" separator=";">
|
|
|
UPDATE student
|
|
|
<set>
|
|
|
+ <if test="item.schoolName != null">
|
|
|
+ school_name_ = #{item.schoolName},
|
|
|
+ </if>
|
|
|
<if test="item.subjectIdList != null">
|
|
|
subject_id_list_ = #{item.subjectIdList},
|
|
|
</if>
|
|
@@ -769,15 +776,14 @@
|
|
|
</foreach>
|
|
|
</select>
|
|
|
<select id="getNoTeacherOrNoSubjectStudent" resultMap="Student">
|
|
|
- SELECT * FROM student WHERE teacher_id_ IS NULL OR subject_id_list_ IS NULL OR cooperation_organ_id_ IS NULL;
|
|
|
+ SELECT * FROM student WHERE teacher_id_ IS NULL OR subject_id_list_ IS NULL OR cooperation_organ_id_ IS NULL limit 0,1000;
|
|
|
</select>
|
|
|
|
|
|
<select id="getHasVipCourseStudentIdsFromNewStudents" resultType="int">
|
|
|
- SELECT DISTINCT s.user_id_
|
|
|
- FROM student s
|
|
|
- LEFT JOIN course_schedule_student_payment cssp ON s.user_id_=cssp.user_id_
|
|
|
- WHERE s.is_new_user_=1 AND cssp.group_type_='VIP'
|
|
|
+ SELECT DISTINCT(spo.user_id_) from student_payment_order spo LEFT JOIN student s on spo.user_id_ = s.user_id_ WHERE spo.type_ in ('DOUBLE_ELEVEN2021','DOUBLE_ELEVEN2020','SMALL_CLASS_TO_BUY')
|
|
|
+ and spo.status_ = 'SUCCESS' and spo.expect_amount_ > 0 and s.is_new_user_ = 1
|
|
|
</select>
|
|
|
+
|
|
|
<select id="getMemberNum" resultType="int">
|
|
|
SELECT COUNT(0) FROM student WHERE member_rank_setting_id_ IS NOT NULL AND FIND_IN_SET(user_id_,#{studentIdsStr})
|
|
|
</select>
|