huliguo
2 天以前 5d7b65670282a4fad015e37d567cfa171b162052
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
<?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.errand.mapper.ReportMapper">
 
 
    <select id="getReportList" resultType="com.ruoyi.errand.object.vo.sys.ReportPageListVO">
        select
            tr.id as id,
            tr.community_name as communityName,
            tre.name as regionName,
            tr.address_detail as addressDetail,
            tau.name as appUserName,
            tau.phone as appUserPhone,
            tr.create_time as createTime,
            tr.status as status
            from
                t_report tr
        left join t_app_user tau on tr.app_user_id = tau.id
        left join t_region tre on tr.region_id = tre.id
        where
            tr.del_flag=0
        <if test="dto.communityName!=null and ''!=dto.communityName">
            and tr.community_name like concat('%',#{dto.communityName},'%')
        </if>
        <if test="dto.regionId!=null">
            and tre.id =#{dto.regionId}
        </if>
        <if test="dto.appUserName!=null and ''!=dto.appUserName">
            and tau.name like concat('%',#{dto.appUserName},'%')
        </if>
        <if test="dto.appUserPhone!=null and ''!=dto.appUserPhone">
            and tau.phone like concat('%',#{dto.appUserPhone},'%')
        </if>
        <if test="dto.status!=null">
            and tr.status =#{dto.status}
        </if>
 
    </select>
</mapper>