“mitao”
2026-04-01 147416cbf4810dfb16a6211c6b594a640e623553
ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml
@@ -146,7 +146,7 @@
        <if test="query.projectId != null">
            and t2.project_id = #{query.projectId}
        </if>
        <if test="query.state ==4 ">
        <if test="query.state ==0 ">
            and t1.error_review_id is null
        </if>
        <if test="query.state ==1 ">
@@ -209,7 +209,7 @@
        <if test="query.projectId != null">
            and t2.project_id = #{query.projectId}
        </if>
        <if test="query.state ==4 ">
        <if test="query.state == 0">
            and t1.error_review_id is null
        </if>
        <if test="query.state ==1 ">
@@ -227,8 +227,19 @@
            or
            t5.name like CONCAT('%', #{query.content}, '%')
            or
            t5.description like CONCAT('%', #{query.content}, '%')
            or
            t1.remark like CONCAT('%', #{query.content}, '%')
            )
        </if>
        <if test="query.level != null">
            and t1.level = #{query.level}
        </if>
        <if test="query.startTime != null and query.startTime !='' ">
            and t1.create_time &gt;= #{query.startTime}
        </if>
        <if test="query.endTime != null and query.endTime !='' ">
            and #{query.endTime} &gt;= t1.create_time
        </if>
        order by t1.create_time desc
    </select>
@@ -256,16 +267,16 @@
        <if test="query.projectId != null">
            and t2.project_id = #{query.projectId}
        </if>
        <if test="query.state ==4 ">
        <if test="query.state == 0 ">
            and t1.error_review_id is null
        </if>
        <if test="query.state ==1 ">
        <if test="query.state == 1 ">
            and t6.state = 0
        </if>
        <if test="query.state ==2 ">
        <if test="query.state == 2 ">
            and t6.state = 1
        </if>
        <if test="query.state ==3 ">
        <if test="query.state == 3 ">
            and t6.state = 2
        </if>
@@ -274,9 +285,20 @@
            or
            t5.name like CONCAT('%', #{query.content}, '%')
            or
            t5.description like CONCAT('%', #{query.content}, '%')
            or
            t1.remark like CONCAT('%', #{query.content}, '%')
            )
        </if>
        <if test="query.level != null">
            and t1.level = #{query.level}
        </if>
        <if test="query.startTime != null and query.startTime !='' ">
            and t1.create_time &gt;= #{query.startTime}
        </if>
        <if test="query.endTime != null and query.endTime !='' ">
            and #{query.endTime} &gt;= t1.create_time
        </if>
        order by t1.create_time desc
    </select>