|
@@ -0,0 +1,124 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.ym.mec.biz.dal.dao.ClassGroupTeacherSalaryDao">
|
|
|
+ <resultMap id="ClassGroupTeacherSalary" type="com.ym.mec.biz.dal.entity.ClassGroupTeacherSalary">
|
|
|
+ <id column="id_" jdbcType="BIGINT" property="id" />
|
|
|
+ <result column="music_group_id_" jdbcType="INTEGER" property="musicGroupId" />
|
|
|
+ <result column="class_group_id_" jdbcType="INTEGER" property="classGroupId" />
|
|
|
+ <result column="teacher_role_" jdbcType="VARCHAR" property="teacherRole" />
|
|
|
+ <result column="user_id_" jdbcType="INTEGER" property="userId" />
|
|
|
+ <result column="duration_" jdbcType="INTEGER" property="duration" />
|
|
|
+ <result column="salary_" jdbcType="DECIMAL" property="salary" />
|
|
|
+ <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+
|
|
|
+ id_, music_group_id_, class_group_id_, teacher_role_, user_id_, duration_, salary_,
|
|
|
+ create_time_, update_time_
|
|
|
+ </sql>
|
|
|
+ <select id="get" parameterType="java.lang.Long" resultMap="ClassGroupTeacherSalary">
|
|
|
+ select * from class_group_teacher_salary where id_ = #{id}
|
|
|
+ </select>
|
|
|
+ <delete id="delete" parameterType="java.lang.Long">
|
|
|
+ delete from class_group_teacher_salary
|
|
|
+ where id_ = #{id}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.ClassGroupTeacherSalary" useGeneratedKeys="true">
|
|
|
+
|
|
|
+ insert into class_group_teacher_salary
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="musicGroupId != null">
|
|
|
+ music_group_id_,
|
|
|
+ </if>
|
|
|
+ <if test="classGroupId != null">
|
|
|
+ class_group_id_,
|
|
|
+ </if>
|
|
|
+ <if test="teacherRole != null">
|
|
|
+ teacher_role_,
|
|
|
+ </if>
|
|
|
+ <if test="userId != null">
|
|
|
+ user_id_,
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ duration_,
|
|
|
+ </if>
|
|
|
+ <if test="salary != null">
|
|
|
+ salary_,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time_,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time_,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="musicGroupId != null">
|
|
|
+ #{musicGroupId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="classGroupId != null">
|
|
|
+ #{classGroupId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="teacherRole != null">
|
|
|
+ #{teacherRole,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="userId != null">
|
|
|
+ #{userId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ #{duration,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="salary != null">
|
|
|
+ #{salary,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="update" parameterType="com.ym.mec.biz.dal.entity.ClassGroupTeacherSalary">
|
|
|
+
|
|
|
+ update class_group_teacher_salary
|
|
|
+ <set>
|
|
|
+ <if test="musicGroupId != null">
|
|
|
+ music_group_id_ = #{musicGroupId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="classGroupId != null">
|
|
|
+ class_group_id_ = #{classGroupId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="teacherRole != null">
|
|
|
+ teacher_role_ = #{teacherRole,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="userId != null">
|
|
|
+ user_id_ = #{userId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ duration_ = #{duration,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="salary != null">
|
|
|
+ salary_ = #{salary,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time_ = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time_ = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id_ = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="ClassGroupTeacherSalary" parameterType="map">
|
|
|
+ SELECT * FROM class_group_teacher_salary ORDER BY id_
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*) FROM class_group_teacher_salary
|
|
|
+ </select>
|
|
|
+</mapper>
|