智慧保安后台管理-外网项目备份
钟日健
2026-06-01 62eb499b0c969f246d3245d1429a97da4de1ce28
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
<?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.location.mapper.LivePersonLocationMapper">
 
 
    <select id="getUserLocation" resultType="org.springblade.modules.location.entity.LivePersonLocation">
        SELECT * FROM sys_live_person_location WHERE user_id = #{userId}
    </select>
 
    <select id="getList" resultType="org.springblade.modules.location.vo.LivePersonLocationVO">
        SELECT
            lpl.*,
            bu.real_name as realName,
            bu.avatar,
            bd.dept_name as deptName,
            sdu.name as dispatchCompany,
            sd.dispatcherTime as dispatchStartTime,
            sd.end_time as dispatchEndTime
        FROM sys_live_person_location lpl
        LEFT JOIN blade_user bu ON bu.id = lpl.user_id
        LEFT JOIN blade_dept bd ON bd.id = bu.dept_id
        LEFT JOIN sys_dispatcher sd ON sd.user_ids = bu.id
        LEFT JOIN sys_dispatcher_unit sdu ON sdu.id = sd.dispatcher_unit_id
        WHERE 1=1 and DATE_FORMAT(lpl.record_time,'%Y-%m-%d') >=DATE_FORMAT(NOW(),'%Y-%m-%d')
 
    </select>
</mapper>