无关风月
2025-02-13 b0b9a8f3c2840d25c4cfe336bbefaaa56e11b69f
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
<?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="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, 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.vo.TenantVO">
        SELECT id, resident_name, checkIn_time, tenant_attributes, tenant_type, phone, id_card, email,
        bank_number, mail_address, create_time, disabled,account
        FROM t_tenant
        <where>
            <if test="query.residentName != null and query.residentName != ''">
                AND resident_name LIKE concat('%',#{query.residentName},'%')
            </if>
            <if test="query.phone != null and query.phone != ''">
                AND phone LIKE concat('%',#{query.phone},'%')
            </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY create_time DESC
    </select>
 
</mapper>