| | |
| | | <where> |
| | | 1=1 |
| | | <if test="reportParamDto.people != ''"> |
| | | and (u.real_name like '%${reportParamDto.people}%' or u.user_idcard like '%${reportParamDto.people}%') |
| | | and (u.real_name like '%${reportParamDto.people}%') |
| | | </if> |
| | | <if test="reportParamDto.phoneNumber != ''"> |
| | | and u.user_mobile like '%${reportParamDto.phoneNumber}%' |
| | |
| | | <if test="reportParamDto.isInGroup != null"> |
| | | and r.is_in_group = ${reportParamDto.isInGroup} |
| | | </if> |
| | | and r.status = 0 |
| | | and (r.status = 0 or r.status = 2) |
| | | </where> |
| | | order by r.ctime DESC |
| | | </select> |
| | | <select id="getReportListVoById" resultType="com.example.jz.modle.vo.ReportListVo"> |
| | | select u.user_mobile mobile, u.user_idcard idcard, u.real_name reporterName, r.* |
| | | select u.user_mobile mobile, u.user_idcard idcard, u.real_name reporterName, u.sex sex,r.* |
| | | from report r |
| | | join user u on r.user_id = u.id |
| | | where r.id = #{id} |
| | |
| | | GROUP BY |
| | | t2.group_id |
| | | </select> |
| | | <select id="selectReportByReportId" resultType="com.example.jz.modle.entity.Report"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | `report` |
| | | WHERE id =#{id} |
| | | </select> |
| | | |
| | | </mapper> |