123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <?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="salary_" jdbcType="DECIMAL" property="salary" />
- <result column="online_classes_salary_" jdbcType="DECIMAL" property="onlineClassesSalary" />
- <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
- </resultMap>
- <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="salary != null">
- salary_,
- </if>
- <if test="onlineClassesSalary != null">
- online_classes_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="salary != null">
- #{salary,jdbcType=DECIMAL},
- </if>
- <if test="onlineClassesSalary != null">
- #{onlineClassesSalary,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="salary != null">
- salary_ = #{salary,jdbcType=DECIMAL},
- </if>
- <if test="onlineClassesSalary != null">
- online_classes_salary_ = #{onlineClassesSalary,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>
- <!-- 获取乐团老师课酬配置表 -->
- <select id="findByMusicGroupId" resultMap="ClassGroupTeacherSalary">
- SELECT * FROM class_group_teacher_salary WHERE music_group_id_ = #{musicGroupId}
- </select>
- </mapper>
|