南昌市物联网技防平台-后台
Administrator
2021-08-27 16abd944c4331a31e99c28564c9b8a31bfbbfefc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.jfpt.equipmentinfo.mapper.EquipmentInfoMapper">
 
    <select id="selectEquipmentInfoDeptPages" resultType="org.springblade.jfpt.equipmentinfo.vo.EquipmentInfoVo">
        select id,name,type,dept_id deptId,serial_number serialNumber,remark,create_time createTime,
        province,city,district,street
            from
        equipment_info
        where 1=1
        <if test="equipmentInfo.name!=null and equipmentInfo.name!=''">
            and name like concat('%',#{equipmentInfo.name},'%')
        </if>
        <if test="equipmentInfo.serialNumber!=null and equipmentInfo.serialNumber!=''">
            and serial_number like concat('%',#{equipmentInfo.serialNumber},'%')
        </if>
        <if test="equipmentInfo.province!=null and equipmentInfo.province!=''">
            and province like concat('%',#{equipmentInfo.province},'%')
        </if>
        <if test="equipmentInfo.city!=null and equipmentInfo.city!=''">
            and city like concat('%',#{equipmentInfo.city},'%')
        </if>
        <if test="equipmentInfo.district!=null and equipmentInfo.district!=''">
            and district like concat('%',#{equipmentInfo.district},'%')
        </if>
        <if test="pid!=null and pid!=''">
            and dept_id like concat('%',#{pid},'%')
        </if>
        order by create_time desc
    </select>
 
    <!--获取设备信息详情数据-->
    <select id="getEquipmentInfoById" resultType="org.springblade.jfpt.equipmentinfo.vo.EquipmentInfoVo">
        select id,name,type,dept_id deptId,serial_number serialNumber,remark,create_time createTime,
        province,city,district,street
            from
        equipment_info
        where id = #{id}
    </select>
 
</mapper>