<?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.TeacherSalaryModifyLogDao">

    <resultMap type="com.ym.mec.biz.dal.entity.TeacherSalaryModifyLog" id="TeacherSalaryModifyLog">
        <result column="id_" property="id"/>
        <result column="teacher_id_" property="teacherId"/>
        <result column="course_schedule_id_" property="courseScheduleId"/>
        <result column="pre_expect_salary_" property="preExpectSalary"/>
        <result column="pre_reduce_salary_" property="preReduceSalary"/>
        <result column="current_expect_salary_" property="currentExpectSalary"/>
        <result column="current_reduce_salary_" property="currentReduceSalary"/>
        <result column="memo_" property="memo"/>
        <result column="operator_id_" property="operatorId"/>
        <result column="create_time_" property="createTime"/>
    </resultMap>

    <!-- 根据主键查询一条记录 -->
    <select id="get" resultMap="TeacherSalaryModifyLog">
		SELECT * FROM teacher_salary_modify_log WHERE id_ = #{id}
	</select>

    <!-- 全查询 -->
    <select id="findAll" resultMap="TeacherSalaryModifyLog">
		SELECT * FROM teacher_salary_modify_log ORDER BY id_
	</select>

    <!-- 向数据库增加一条记录 -->
    <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.TeacherSalaryModifyLog" useGeneratedKeys="true" keyColumn="id"
            keyProperty="id">
        INSERT INTO teacher_salary_modify_log (teacher_id_,course_schedule_id_,pre_expect_salary_,pre_reduce_salary_,current_expect_salary_,current_reduce_salary_,memo_,operator_id_,create_time_)
        VALUES(#{teacherId},#{courseScheduleId},#{preExpectSalary},#{preReduceSalary},#{currentExpectSalary},#{currentReduceSalary},#{memo},#{operatorId},NOW())
    </insert>
</mapper>
