dao/src/main/resources/mapper/LightReportErrorMapper.xml
@@ -52,11 +52,11 @@ light_report_error t1 LEFT JOIN pole t3 ON t1.device_code = t3.device_code WHERE <if test="userid != null"> t3.client_id = #{userId} OR t3.user_id = #{userId} AND </if> t1.light_report_error_id IN ( SELECT t.max_id FROM ( SELECT Max( light_report_error.light_report_error_id ) AS max_id FROM light_report_error GROUP BY light_report_error.device_code ) AS t ) <if test="userid != null"> AND t3.client_id = #{userId} OR t3.user_id = #{userId} </if> ORDER BY t1.create_time DESC </select>