nnnjjj123
2021-01-28 71b6b716361c52af290493d365a328fc1a3467e2
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
<?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.modules.deploy.mapper.DeployMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="deployResultMap" type="org.springblade.modules.deploy.entity.Deploy">
        <id column="id" property="id"/>
        <result column="devicenumber" property="devicenumber"/>
        <result column="devicename" property="devicename"/>
        <result column="btime" property="btime"/>
        <result column="etime" property="etime"/>
        <result column="btype" property="btype"/>
    </resultMap>
 
 
    <select id="selectDeployPage" resultMap="deployResultMap">
        select * from act_deploy where is_deleted = 0
    </select>
 
    <!--设备布防提醒-->
    <select id="selectbf" resultType="java.util.HashMap">
        SELECT a.*,s.devicestate FROM `act_deploy` a inner JOIN sys_equipment s on s.devicenumber=a.devicenumber
    </select>
 
 
    <insert id="insterb">
       INSERT INTO act_deploy (devicenumber,devicename,btype) VALUES (#{devicenumber},#{devicename},#{btype})
    </insert>
 
    <update id="updateb">
 update act_deploy SET devicenumber=#{devicenumber},devicename=#{devicename},btime=#{btime},etime=#{etime},btype=#{btype} where devicenumber=#{devicenumber}
</update>
 
    <select id="selectInfo" resultMap="deployResultMap">
        select * from  act_deploy where  devicenumber=#{devicenumber}
    </select>
 
</mapper>