|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Select(value = {" <script>" + | 
|---|
|  |  |  | "SELECT * FROM device_mobile_position" + | 
|---|
|  |  |  | " WHERE deviceId = #{deviceId} " + | 
|---|
|  |  |  | " WHERE deviceId = #{deviceId} and channelId = #{channelId} " + | 
|---|
|  |  |  | "<if test=\"startTime != null\"> AND time>=#{startTime}</if>" + | 
|---|
|  |  |  | "<if test=\"endTime != null\"> AND time<=#{endTime}</if>" + | 
|---|
|  |  |  | " ORDER BY time ASC" + | 
|---|
|  |  |  | " </script>"}) | 
|---|
|  |  |  | List<MobilePosition> queryPositionByDeviceIdAndTime(String deviceId, String startTime, String endTime); | 
|---|
|  |  |  | List<MobilePosition> queryPositionByDeviceIdAndTime(String deviceId, String channelId, String startTime, String endTime); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Select("SELECT * FROM device_mobile_position WHERE deviceId = #{deviceId}" + | 
|---|
|  |  |  | " ORDER BY time DESC LIMIT 1") | 
|---|