<?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.TOldsterMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.system.model.TOldster">
|
<id column="id" property="id" />
|
<result column="oldster_name" property="oldsterName" />
|
<result column="oldster_age" property="oldsterAge" />
|
<result column="oldster_sex" property="oldsterSex" />
|
<result column="contact_phone" property="contactPhone" />
|
<result column="guardian_name" property="guardianName" />
|
<result column="guardian_phone" property="guardianPhone" />
|
<result column="passport_photo" property="passportPhoto" />
|
<result column="id_card" property="idCard" />
|
<result column="birth_date" property="birthDate" />
|
<result column="oldster_type" property="oldsterType" />
|
<result column="address" property="address" />
|
<result column="create_time" property="createTime" />
|
<result column="update_time" property="updateTime" />
|
<result column="create_by" property="createBy" />
|
<result column="update_by" property="updateBy" />
|
<result column="disabled" property="disabled" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, oldster_name, oldster_age, oldster_sex, contact_phone, guardian_name, guardian_phone, passport_photo, id_card, birth_date, oldster_type, address, create_time, update_time, create_by, update_by, disabled
|
</sql>
|
<select id="pageList" resultType="com.ruoyi.system.model.TOldster">
|
select t1.* from t_oldster t1
|
where 1=1
|
<if test="query.oldsterName != null and query.oldsterName != ''">
|
and t1.oldster_name like concat('%',#{query.oldsterName},'%')
|
</if>
|
<if test="query.oldsterType != null and query.oldsterType != ''">
|
and t1.oldster_type = #{query.oldsterType}
|
</if>
|
<if test="query.contactPhone != null and query.contactPhone != ''">
|
and t1.contact_phone like concat('%',#{query.contactPhone},'%')
|
</if>
|
AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
|
|
order by t1.create_time desc
|
</select>
|
|
</mapper>
|