<?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.dji.sample.log.dao.IDroneFlightLogMapper">
|
|
<select id="patrolStatistics" resultType="com.dji.sample.log.model.entity.DroneFlightLogEntity">
|
SELECT fl.* FROM drone_flight_log fl
|
WHERE 1=1
|
<if test="queryTime != null and queryTime != ''">
|
and ( FROM_UNIXTIME( fl.end_time / 1000, '%Y' ) = #{queryTime} OR FROM_UNIXTIME( fl.end_time / 1000, '%Y-%m' ) =#{queryTime})
|
</if>
|
<if test="workspaceId != null and workspaceId != ''">
|
and fl.workspace_id = #{workspaceId}
|
</if>
|
ORDER BY fl.end_time DESC
|
</select>
|
</mapper>
|