|
@@ -0,0 +1,80 @@
|
|
|
+<?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.keao.edu.user.dao.ExamTeacherSalaryDao">
|
|
|
+
|
|
|
+ <resultMap type="com.keao.edu.user.entity.ExamTeacherSalary" id="ExamTeacherSalary">
|
|
|
+ <result column="id_" property="id" />
|
|
|
+ <result column="examination_basic_id_" property="examinationBasicId" />
|
|
|
+ <result column="exam_mode_" property="examMode" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler" />
|
|
|
+ <result column="teacher_id_" property="teacherId" />
|
|
|
+ <result column="settlement_type_" property="settlementType" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler" />
|
|
|
+ <result column="share_profit_amount_" property="shareProfitAmount" />
|
|
|
+ <result column="create_time_" property="createTime" />
|
|
|
+ <result column="update_time_" property="updateTime" />
|
|
|
+ <result column="tenant_id_" property="tenantId" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <select id="get" resultMap="ExamTeacherSalary" >
|
|
|
+ SELECT * FROM exam_teacher_salary WHERE id_ = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 全查询 -->
|
|
|
+ <select id="findAll" resultMap="ExamTeacherSalary">
|
|
|
+ SELECT * FROM exam_teacher_salary ORDER BY id_
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 向数据库增加一条记录 -->
|
|
|
+ <insert id="insert" parameterType="com.keao.edu.user.entity.ExamTeacherSalary" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
+ INSERT INTO exam_teacher_salary (id_,examination_basic_id_,exam_mode_,teacher_id_,settlement_type_,share_profit_amount_,create_time_,update_time_,tenant_id_)
|
|
|
+ VALUES(#{id},#{examinationBasicId},#{examMode,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{teacherId},#{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{shareProfitAmount},NOW(),NOW(),#{tenantId})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <update id="update" parameterType="com.keao.edu.user.entity.ExamTeacherSalary">
|
|
|
+ UPDATE exam_teacher_salary
|
|
|
+ <set>
|
|
|
+ <if test="examinationBasicId != null">
|
|
|
+ examination_basic_id_ = #{examinationBasicId},
|
|
|
+ </if>
|
|
|
+ <if test="id != null">
|
|
|
+ id_ = #{id},
|
|
|
+ </if>
|
|
|
+ <if test="teacherId != null">
|
|
|
+ teacher_id_ = #{teacherId},
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ tenant_id_ = #{tenantId},
|
|
|
+ </if>
|
|
|
+ <if test="examMode != null">
|
|
|
+ exam_mode_ = #{examMode,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ <if test="shareProfitAmount != null">
|
|
|
+ share_profit_amount_ = #{shareProfitAmount},
|
|
|
+ </if>
|
|
|
+ <if test="settlementType != null">
|
|
|
+ settlement_type_ = #{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ update_time_ = NOW()
|
|
|
+ </set> WHERE id_ = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!-- 根据主键删除一条记录 -->
|
|
|
+ <delete id="delete" >
|
|
|
+ DELETE FROM exam_teacher_salary WHERE id_ = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="ExamTeacherSalary" parameterType="map">
|
|
|
+ SELECT * FROM exam_teacher_salary ORDER BY id_ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*) FROM exam_teacher_salary
|
|
|
+ </select>
|
|
|
+</mapper>
|