<?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>
|