工业级运维app手机api
xufenglei
2017-11-16 43c0f7bd6b605b2c71f58e43055144004e7d42e7
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?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="com.moral.monitor.dao.MgrDao">
 
    <!--随机点-->
    <select id="randpoint" resultType="com.moral.monitor.entity.MonitorPoint">
        SELECT * FROM monitorpoint  ORDER BY  RAND() LIMIT 7
    </select>
 
 
    <!--点在所有在线设备-->
    <select id="pointequ"  parameterType="String"  resultType="com.moral.monitor.entity.Equipment">
        SELECT *  FROM equipment WHERE monitorpoint=#{monitorpoint} AND state!=0
    </select>
 
 
    <!--设备传感器即时数据-->
    <select id="equsensorstate"  parameterType="String" resultType="com.moral.monitor.entity.State">
        select  * from state WHERE mac=#{mac}
    </select>
 
 
    <!--所有点-->
    <select id="allpoint" resultType="com.moral.monitor.entity.MonitorPoint">
        SELECT * FROM monitorpoint
    </select>
 
 
 
 
 
 
 
    <!--所有监测点表-->
    <select id="allPointsData"  parameterType="com.moral.monitor.entity.QueryHelper" resultType="com.moral.monitor.entity.PointAvg">
        select * from monitorpoint
        <where>
            <if test="search!=''">
                and name LIKE '%${search}%'
            </if>
        </where>
        limit #{offset},#{limit}
    </select>
 
    <select id="pointcount"  parameterType="com.moral.monitor.entity.QueryHelper" resultType="int">
        select COUNT(id)  from monitorpoint
        <where>
            <if test="search!=''">
                and name LIKE '%${search}%'
            </if>
        </where>
    </select>
 
 
 
 
</mapper>