李林
2024-03-08 f7a95fddddb0efd60abdab7550ae636c379a2a20
cnas-server/src/main/resources/mapper/DeviceMapper.xml
@@ -59,19 +59,14 @@
        </if>
    </select>
    <select id="authorizedPerson" resultType="com.yuanchu.mom.pojo.Device">
        select *
        from (select id,
                     authorized_person,
                     status
              from device) a
        select id,
               authorized_person
        from device
    </select>
    <select id="search" resultType="com.yuanchu.mom.pojo.Device">
        select *
        from device
        <where>
            <if test="status!=null">
                and status = #{status}
            </if>
            <if test="deviceName!=null and deviceName!=''">
                and device_name like concat('%',#{deviceName},'%')
            </if>