李林
2024-03-05 dd7cf6b7d8da76c7ceb0ae79fe57fb72ce1c3eb5
cnas-server/src/main/resources/mapper/DeviceMapper.xml
@@ -35,7 +35,8 @@
        create_user,
        create_time,
        update_user,
        update_time
        update_time,
        status,
        from device
        ) a
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
@@ -49,6 +50,7 @@
        specificationModel,
        deviceStatus,
        create_user,
        status,
        update_time
        from device
        ) a
@@ -56,4 +58,29 @@
            ${ew.customSqlSegment}
        </if>
    </select>
    <select id="authorizedPerson" resultType="com.yuanchu.mom.pojo.Device">
        select *
        from (select id,
                     authorized_person,
                     status
              from device) a
    </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>
             <if test="specificationModel!=null and specificationModel!= ''">
                 and specification_model = #{specificationModel}
             </if>
             <if test="largeCategory!=null and largeCategory!= ''">
                 and large_category = #{largeCategory}
             </if>
         </where>
    </select>
</mapper>