无关风月
2025-01-22 c184fa19557e117c81b83c9916c8d012e5a778d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?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.TTenantMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TTenant">
        <id column="id" property="id" />
        <result column="resident_name" property="residentName" />
        <result column="checkIn_time" property="checkinTime" />
        <result column="tenant_attributes" property="tenantAttributes" />
        <result column="tenant_type" property="tenantType" />
        <result column="tenant_building" property="tenantBuilding" />
        <result column="room_number" property="roomNumber" />
        <result column="building_area" property="buildingArea" />
        <result column="phone" property="phone" />
        <result column="id_card" property="idCard" />
        <result column="email" property="email" />
        <result column="bank_number" property="bankNumber" />
        <result column="mail_address" property="mailAddress" />
        <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" />
        <result column="account" property="account" />
        <result column="password" property="password" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, resident_name, checkIn_time, tenant_attributes, tenant_type, tenant_building, room_number, building_area, phone, id_card, email,
            bank_number, mail_address, create_time, update_time, create_by, update_by, disabled,account,password
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.model.TTenant">
        SELECT <include refid="Base_Column_List"/>
        FROM t_tenant
        <where>
            <if test="residentName != null and residentName != ''">
                AND resident_name LIKE concat('%',#{residentName},'%')
            </if>
            <if test="phone != null and phone != ''">
                AND phone LIKE concat('%',#{phone},'%')
            </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY create_time DESC
    </select>
 
</mapper>