2024-08-12 15:04:39 +08:00
|
|
|
<?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">
|
|
|
|
|
2024-08-12 21:27:02 +08:00
|
|
|
<mapper namespace="cn.iocoder.yudao.module.knowledge.mapper.TTrainTeacherMapper">
|
2024-08-12 15:04:39 +08:00
|
|
|
|
|
|
|
<resultMap type="cn.iocoder.yudao.module.knowledge.entity.TTrainTeacher" id="tTrainTeacherMap">
|
|
|
|
<result property="teacherName" column="teacher_name"/>
|
|
|
|
<result property="professional" column="professional"/>
|
|
|
|
<result property="educationalBackground" column="educational_background"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<!-- 用于select查询公用抽取的列 -->
|
|
|
|
<sql id="columns">
|
|
|
|
teacher_name,professional,educational_background
|
|
|
|
</sql>
|
|
|
|
<select id="findList" resultMap="tTrainTeacherMap">
|
|
|
|
select
|
|
|
|
<include refid="columns"/>
|
|
|
|
from t_train_teacher
|
|
|
|
<where>
|
|
|
|
<if test="teacherName != null and teacherName != ''">
|
|
|
|
teacher_name = #{teacherName}
|
|
|
|
</if>
|
|
|
|
<if test="professional != null and professional != ''">
|
|
|
|
professional = #{professional}
|
|
|
|
</if>
|
|
|
|
<if test="educationalBackground != null and educationalBackground != ''">
|
|
|
|
educational_background = #{educationalBackground}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="findOneByName" resultType="cn.iocoder.yudao.module.knowledge.entity.TTrainTeacher">
|
|
|
|
select *
|
|
|
|
from t_train_teacher
|
|
|
|
<where>
|
|
|
|
<if test="teacherName != null and teacherName != ''">
|
|
|
|
teacher_name = #{teacherName}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|