<?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.ruoyi.system.mapper.SysStudentMapper">
|
|
<resultMap type="SysStudent" id="SysStudentResult">
|
<result property="studentId" column="student_id" />
|
<result property="studentName" column="student_name" />
|
<result property="studentAge" column="student_age" />
|
<result property="studentHobby" column="student_hobby" />
|
<result property="studentSex" column="student_sex" />
|
<result property="studentStatus" column="student_status" />
|
<result property="studentBirthday" column="student_birthday" />
|
<result property="delFlag" column="del_flag" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
</resultMap>
|
|
<sql id="selectSysStudentVo">
|
select student_id, student_name, student_age, student_hobby, student_sex, student_status, student_birthday, del_flag, create_by, create_time, update_by, update_time from sys_student
|
</sql>
|
|
<select id="selectSysStudentList" parameterType="SysStudent" resultMap="SysStudentResult">
|
<include refid="selectSysStudentVo"/>
|
<where>
|
<if test="studentName != null and studentName != ''"> and student_name like concat('%', #{studentName}, '%')</if>
|
<if test="studentAge != null "> and student_age = #{studentAge}</if>
|
<if test="studentHobby != null and studentHobby != ''"> and student_hobby = #{studentHobby}</if>
|
<if test="studentSex != null and studentSex != ''"> and student_sex = #{studentSex}</if>
|
<if test="studentStatus != null and studentStatus != ''"> and student_status = #{studentStatus}</if>
|
<if test="params.beginStudentBirthday != null and params.beginStudentBirthday != '' and params.endStudentBirthday != null and params.endStudentBirthday != ''"> and student_birthday between #{params.beginStudentBirthday} and #{params.endStudentBirthday}</if>
|
</where>
|
</select>
|
<select id="getStudentByName" parameterType="String" resultMap="SysStudentResult">
|
<include refid="selectSysStudentVo"/>
|
where student_name = #{studentName}
|
</select>
|
</mapper>
|