smart-car-service/bonus-data/src/main/resources/mapper/DLocationMapper.xml

24 lines
784 B
XML
Raw Normal View History

2025-12-24 09:59:55 +08:00
<?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.bonus.data.mapper.DILocationMapper">
<!--查询位置列表-->
<select id="getLocationList" resultType="com.bonus.common.domain.data.vo.LocationVo">
SELECT
location_name AS locationName,
location_time AS locationTime
FROM tb_device_location
<where>
<if test="startTime != null">
AND location_time &gt;= #{startTime}
</if>
<if test="endTime != null">
AND location_time &lt;= #{endTime}
</if>
</where>
ORDER BY location_time DESC
</select>
</mapper>