mitao
2 天以前 f769d817f8ba2522147c73fa93ccacdc3aab0cb6
ruoyi-system/src/main/resources/mapper/system/DrDisplacementMapper.xml
@@ -2,4 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.DrDisplacementMapper">
    <select id="pageList" resultType="com.ruoyi.system.model.DrDisplacement">
        select id,name,phone,community_id as communityId,community_name as communityName,id_card as idCard,address,totalArea
        from
            dr_displacement
        where 1=1
        <if test="query.name != null and query.name != ''">
            and name like concat('%',#{query.name},'%')
        </if>
        <if test="query.phone != null and query.phone != ''">
            and phone like concat('%',#{query.phone},'%')
        </if>
        <if test="query.communityId != null and query.communityId != ''">
            and community_id = #{query.communityId}
        </if>
        <if test="query.idCard != null and query.idCard != ''">
            and id_card like concat('%',#{query.idCard},'%')
        </if>
        and disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        order by create_time desc
    </select>
</mapper>