XiaoRuby
2023-08-19 d0a6fc23f31f924cb1744397478dc4c7c57c04e1
inspection-server/src/main/resources/mapper/ReportMapper.xml
@@ -15,6 +15,7 @@
        join user u on i.user_id = u.id
        join inspection_material im on i.id = im.inspection_id
        <where>
            r.state = 1
            <if test="status != null">
                and r.status = #{status}
            </if>
@@ -39,6 +40,10 @@
        join inspection i on r.inspection_id = i.id
        join inspection_material im on i.id = im.inspection_id
        <where>
            r.state = 1
            <if test="status == null">
                and r.status in (0, 1)
            </if>
            <if test="status != null">
                and r.status = #{status}
            </if>