| | |
| | | and r.report_materials is not null |
| | | </if> |
| | | <if test="reportParamDto.havaMaterial == 0"> |
| | | and r.report_materials is null |
| | | and (r.report_materials is null or r.report_materials='') |
| | | </if> |
| | | </if> |
| | | <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> |
| | |
| | | ) as reporter |
| | | </select> |
| | | |
| | | <select id="selectListGroup" resultType="com.example.jz.modle.entity.Report"> |
| | | SELECT |
| | | t1.* |
| | | FROM |
| | | report t1 |
| | | LEFT JOIN group_user t2 ON t1.id = t2.user_id |
| | | where t1.user_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> |