zouxuan 3 years ago
parent
commit
37cd3c3c61
1 changed files with 10 additions and 5 deletions
  1. 10 5
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

+ 10 - 5
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -40,6 +40,7 @@
         <result column="pre_course_flag_" property="preCourseFlag"/>
         <result column="valid_end_time_" property="validEndTime"/>
         <result column="valid_start_time_" property="validStartTime"/>
+        <result column="tenant_id_" property="tenantId"/>
     </resultMap>
 
     <resultMap type="com.ym.mec.biz.dal.dto.Mapper" id="Mapper">
@@ -166,7 +167,8 @@
         cs.member_flag_,
         cs.valid_end_time_,
         cs.valid_start_time_,
-        cs.pre_course_flag_
+        cs.pre_course_flag_,
+        cs.tenant_id_
     </sql>
 
     <!-- 根据主键查询一条记录 -->
@@ -189,13 +191,13 @@
         INSERT INTO course_schedule
         (group_type_,music_group_id_,class_group_id_,status_,subsidy_,class_date_,start_class_time_,end_class_time_,
         teacher_id_,actual_teacher_id_,create_time_,update_time_,type_,name_,teach_mode_,student_num_,leave_student_num_,
-        schoole_id_,is_lock_,note_,teaching_content_,organ_id_,member_flag_,pre_course_flag_,valid_end_time_,valid_start_time_)
+        schoole_id_,is_lock_,note_,teaching_content_,organ_id_,member_flag_,pre_course_flag_,valid_end_time_,valid_start_time_,tenant_id_)
         VALUES(#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{musicGroupId},#{classGroupId},
         #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{subsidy},#{classDate},#{startClassTime},
         #{endClassTime},#{teacherId},#{teacherId},now(),now(),
         #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{name},
         #{teachMode,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{studentNum},#{leaveStudentNum},
-        #{schoolId},#{isLock},#{note},#{teachingContent},#{organId},#{memberFlag},#{preCourseFlag},#{validEndTime},#{validStartTime})
+        #{schoolId},#{isLock},#{note},#{teachingContent},#{organId},#{memberFlag},#{preCourseFlag},#{validEndTime},#{validStartTime},#{tenantId})
     </insert>
 
     <insert id="batchAddCourseSchedules" parameterType="java.util.List" useGeneratedKeys="true" keyColumn="id"
@@ -203,7 +205,7 @@
         INSERT INTO course_schedule
         (group_type_,music_group_id_,class_group_id_,status_,subsidy_,class_date_,start_class_time_,end_class_time_,
         teacher_id_,actual_teacher_id_,create_time_,update_time_,type_,name_,teach_mode_,student_num_,leave_student_num_,
-        schoole_id_,is_lock_,note_,teaching_content_,organ_id_,member_flag_,pre_course_flag_,valid_end_time_,valid_start_time_)
+        schoole_id_,is_lock_,note_,teaching_content_,organ_id_,member_flag_,pre_course_flag_,valid_end_time_,valid_start_time_,tenant_id_)
         VALUE
         <foreach collection="list" item="course" separator=",">
             (#{course.groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{course.musicGroupId},
@@ -212,7 +214,7 @@
             #{course.teacherId},now(),now(),#{course.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             #{course.name},#{course.teachMode,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{course.studentNum},
             #{course.leaveStudentNum},#{course.schoolId},#{course.isLock},#{course.note},#{course.teachingContent},
-            #{course.organId},#{course.memberFlag},#{course.preCourseFlag},#{course.validEndTime},#{course.validStartTime})
+            #{course.organId},#{course.memberFlag},#{course.preCourseFlag},#{course.validEndTime},#{course.validStartTime},#{course.tenantId})
         </foreach>
     </insert>
 
@@ -220,6 +222,9 @@
     <update id="update" parameterType="com.ym.mec.biz.dal.entity.CourseSchedule">
         UPDATE course_schedule
         <set>
+            <if test="tenantId != null">
+                tenant_id_ = #{tenantId},
+            </if>
             <if test="validEndTime != null">
                 valid_end_time_ = #{validEndTime},
             </if>