|
@@ -3,88 +3,98 @@
|
|
|
<!-- 这个文件是自动生成的。 不要修改此文件。所有改动将在下次重新自动生成时丢失。 -->
|
|
|
<mapper namespace="com.ym.mec.web.dal.dao.ClassGroupTeacherMapperDao">
|
|
|
|
|
|
- <resultMap type="com.ym.mec.web.dal.entity.ClassGroupTeacherMapper"
|
|
|
- id="ClassGroupTeacherMapper">
|
|
|
- <result column="id_" property="id" />
|
|
|
- <result column="music_group_id_" property="musicGroupId" />
|
|
|
- <result column="class_group_id_" property="classGroupId" />
|
|
|
- <result column="teacher_role_" property="teacherRole" />
|
|
|
- <result column="user_id_" property="userId" />
|
|
|
- <result column="salary_" property="salary" />
|
|
|
- <result column="create_time_" property="createTime" />
|
|
|
- <result column="update_time_" property="updateTime" />
|
|
|
- </resultMap>
|
|
|
+ <resultMap type="com.ym.mec.web.dal.entity.ClassGroupTeacherMapper"
|
|
|
+ id="ClassGroupTeacherMapper">
|
|
|
+ <result column="id_" property="id"/>
|
|
|
+ <result column="music_group_id_" property="musicGroupId"/>
|
|
|
+ <result column="class_group_id_" property="classGroupId"/>
|
|
|
+ <result column="teacher_role_" property="teacherRole"/>
|
|
|
+ <result column="user_id_" property="userId"/>
|
|
|
+ <result column="salary_" property="salary"/>
|
|
|
+ <result column="create_time_" property="createTime"/>
|
|
|
+ <result column="update_time_" property="updateTime"/>
|
|
|
+ </resultMap>
|
|
|
|
|
|
- <!-- 根据主键查询一条记录 -->
|
|
|
- <select id="get" resultMap="ClassGroupTeacherMapper">
|
|
|
- SELECT *
|
|
|
- FROM class_group_teacher_mapper WHERE id_ = #{id}
|
|
|
- </select>
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <select id="get" resultMap="ClassGroupTeacherMapper">
|
|
|
+ SELECT *
|
|
|
+ FROM class_group_teacher_mapper WHERE id_ = #{id}
|
|
|
+ </select>
|
|
|
|
|
|
- <!-- 全查询 -->
|
|
|
- <select id="findAll" resultMap="ClassGroupTeacherMapper">
|
|
|
- SELECT * FROM
|
|
|
- class_group_teacher_mapper ORDER BY id_
|
|
|
- </select>
|
|
|
+ <!-- 全查询 -->
|
|
|
+ <select id="findAll" resultMap="ClassGroupTeacherMapper">
|
|
|
+ SELECT *
|
|
|
+ FROM class_group_teacher_mapper
|
|
|
+ ORDER BY id_
|
|
|
+ </select>
|
|
|
|
|
|
- <!-- 向数据库增加一条记录 -->
|
|
|
- <insert id="insert" parameterType="com.ym.mec.web.dal.entity.ClassGroupTeacherMapper"
|
|
|
- useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- <!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval
|
|
|
- AS ID FROM DUAL </selectKey> -->
|
|
|
- INSERT INTO class_group_teacher_mapper
|
|
|
- (id_,music_group_id_,class_group_id_,teacher_role_,user_id_,salary_,create_time_,update_time_)
|
|
|
- VALUES(#{id},#{musicGroupId},#{classGroupId},#{teacherRole},#{userId},#{salary},#{createTime},#{updateTime})
|
|
|
- </insert>
|
|
|
+ <!-- 向数据库增加一条记录 -->
|
|
|
+ <insert id="insert" parameterType="com.ym.mec.web.dal.entity.ClassGroupTeacherMapper"
|
|
|
+ useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
+ <!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval
|
|
|
+ AS ID FROM DUAL </selectKey> -->
|
|
|
+ INSERT INTO class_group_teacher_mapper
|
|
|
+ (id_,music_group_id_,class_group_id_,teacher_role_,user_id_,salary_,create_time_,update_time_)
|
|
|
+ VALUES(#{id},#{musicGroupId},#{classGroupId},#{teacherRole},#{userId},#{salary},#{createTime},#{updateTime})
|
|
|
+ </insert>
|
|
|
|
|
|
- <!-- 根据主键查询一条记录 -->
|
|
|
- <update id="update" parameterType="com.ym.mec.web.dal.entity.ClassGroupTeacherMapper">
|
|
|
- UPDATE class_group_teacher_mapper
|
|
|
- <set>
|
|
|
- <if test="userId != null">
|
|
|
- user_id_ = #{userId},
|
|
|
- </if>
|
|
|
- <if test="id != null">
|
|
|
- id_ = #{id},
|
|
|
- </if>
|
|
|
- <if test="classGroupId != null">
|
|
|
- class_group_id_ = #{classGroupId},
|
|
|
- </if>
|
|
|
- <if test="salary != null">
|
|
|
- salary_ = #{salary},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time_ = #{updateTime},
|
|
|
- </if>
|
|
|
- <if test="teacherRole != null">
|
|
|
- teacher_role_ = #{teacherRole},
|
|
|
- </if>
|
|
|
- <if test="musicGroupId != null">
|
|
|
- music_group_id_ = #{musicGroupId},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time_ = #{createTime},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- WHERE id_ = #{id}
|
|
|
- </update>
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <update id="update" parameterType="com.ym.mec.web.dal.entity.ClassGroupTeacherMapper">
|
|
|
+ UPDATE class_group_teacher_mapper
|
|
|
+ <set>
|
|
|
+ <if test="userId != null">
|
|
|
+ user_id_ = #{userId},
|
|
|
+ </if>
|
|
|
+ <if test="id != null">
|
|
|
+ id_ = #{id},
|
|
|
+ </if>
|
|
|
+ <if test="classGroupId != null">
|
|
|
+ class_group_id_ = #{classGroupId},
|
|
|
+ </if>
|
|
|
+ <if test="salary != null">
|
|
|
+ salary_ = #{salary},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time_ = #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="teacherRole != null">
|
|
|
+ teacher_role_ = #{teacherRole},
|
|
|
+ </if>
|
|
|
+ <if test="musicGroupId != null">
|
|
|
+ music_group_id_ = #{musicGroupId},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time_ = #{createTime},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{id}
|
|
|
+ </update>
|
|
|
|
|
|
- <!-- 根据主键删除一条记录 -->
|
|
|
- <delete id="delete">
|
|
|
- DELETE FROM class_group_teacher_mapper WHERE
|
|
|
- id_ = #{id}
|
|
|
- </delete>
|
|
|
+ <!-- 根据主键删除一条记录 -->
|
|
|
+ <delete id="delete">
|
|
|
+ DELETE FROM class_group_teacher_mapper WHERE
|
|
|
+ id_ = #{id}
|
|
|
+ </delete>
|
|
|
|
|
|
- <!-- 分页查询 -->
|
|
|
- <select id="queryPage" resultMap="ClassGroupTeacherMapper"
|
|
|
- parameterType="map">
|
|
|
- SELECT * FROM class_group_teacher_mapper ORDER BY id_
|
|
|
- <include refid="global.limit" />
|
|
|
- </select>
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="ClassGroupTeacherMapper"
|
|
|
+ parameterType="map">
|
|
|
+ SELECT * FROM class_group_teacher_mapper ORDER BY id_
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
|
|
|
- <!-- 查询当前表的总记录数 -->
|
|
|
- <select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM
|
|
|
- class_group_teacher_mapper
|
|
|
- </select>
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*)
|
|
|
+ FROM class_group_teacher_mapper
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 批量插入班级老师 -->
|
|
|
+ <insert id="classGroupTeachersInsert" parameterType="java.util.List">
|
|
|
+ INSERT INTO class_group_teacher_mapper
|
|
|
+ (id_,music_group_id_,class_group_id_,teacher_role_,user_id_,salary_,create_time_,update_time_)
|
|
|
+ <foreach collection="classGroupTeacherMapperList" item="item" index="index" separator=",">
|
|
|
+ (#{item.id},#{item.musicGroupId},#{item.classGroupId},#{item.teacherRole},#{item.userId},#{item.salary},#{item.createTime},#{item.updateTime})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
</mapper>
|