智慧保安后台管理项目备份
Administrator
2021-07-21 aaae94e30d03dd3ed601e46721beb7e2e97581a8
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
<?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.directive.mapper.DirectiveMapper">
 
    <!--指令分页信息-->
    <select id="selectDirectivePage" resultType="org.springblade.modules.directive.vo.DirectiveVo">
        SELECT
            sd.*,
            bu.real_name sendName
        FROM
            sys_directive sd
        left join
            blade_user bu
        on
            bu.id = sd.user_id
        where
        1=1
        <if test="directive.type!=null and directive.type!=''">
            and sll.type = #{directive.type}
        </if>
        <if test="directive.startTime!=null and directive.startTime!=''">
            and sl.send_time &gt;= #{directive.startTime}
        </if>
        <if test="directive.endTime!=null and directive.endTime!=''">
            and sl.send_time &lt;= #{directive.endTime}
        </if>
    </select>
 
    <!--指令详情信息-->
    <select id="selectDirectiveInfo" resultType="org.springblade.modules.directive.vo.DirectiveVo">
        SELECT
            *
        FROM
            sys_directive
        WHERE
            1=1
        <if test="directive.id!=null">
            and id = #{directive.id}
        </if>
    </select>
 
</mapper>