2021与蓝度共同重构项目,服务端
fix
zhanzhiqin
2022-04-24 724c79463fc7c4f345fc2dd508aeab139b57afa5
dao/src/main/resources/mapper/MonitorMapper.xml
@@ -62,20 +62,11 @@
                    #{deviceCode}
                </foreach>
            </if>
            <if test="keyword != null and keyword != ''">
                AND t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                OR t1.device_serial LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                OR t1.note LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                OR t3.pole_code LIKE CONCAT(CONCAT('%', #{keyword}), '%')
            </if>
            <if test="bindingState != 2">
                AND t1.binding_state = #{bindingState}
            </if>
            <if test="equipmentState != 2">
                AND t1.equipment_state = #{equipmentState}
            </if>
            <if test="userid != null">
                AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
            </if>
        </where>
    </select>
@@ -91,6 +82,12 @@
            <if test="userid != null">
                AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
            </if>
            <if test="keyword != null and keyword != ''">
                AND ( t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                OR t1.device_serial LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                OR t1.note LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                OR t3.pole_code LIKE CONCAT(CONCAT('%', #{keyword}), '%'))
            </if>
        </where>
    </select>