<?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>
|