gaoaoy
2024-03-04 c042e9a6e38d7264d053617f1a21b6ecf42f65cd
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>