更新添加实时轨迹2
parent
9ddeefa450
commit
c8b0bda8f2
|
@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -53,7 +54,8 @@ public class Fence {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat (pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createdTime;
|
||||
/**
|
||||
* 更新人
|
||||
|
@ -62,6 +64,7 @@ public class Fence {
|
|||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat (pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updatedTime;
|
||||
}
|
||||
|
|
|
@ -2,10 +2,12 @@ package com.dragon.vehicle.history.common.domain;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -31,10 +33,14 @@ public class HistoryRecord {
|
|||
/**
|
||||
* 车辆开始行驶时间
|
||||
*/
|
||||
@JsonFormat (pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
/**
|
||||
* 车辆结束行驶时间
|
||||
*/
|
||||
@JsonFormat (pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
/**
|
||||
* 是否删除记录 1-是 0-否
|
||||
|
|
|
@ -4,7 +4,9 @@ package com.dragon.vehicle.history.common.domain;
|
|||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
@ -31,6 +33,8 @@ public class VehicleData {
|
|||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,6 +5,7 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -26,10 +27,12 @@ public class HistoryReq {
|
|||
* 开始时间
|
||||
*/
|
||||
@JsonFormat (pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat (pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class HistoricalTrackController {
|
|||
*/
|
||||
@PostMapping("/CarRecord")
|
||||
@DS(value = "slave1")
|
||||
public Result<List<VehicleData>> CarRecord(@RequestBody HistoryReq historyReq){
|
||||
return Result.success(historicalTrackService.CarRecord(historyReq));
|
||||
public Result<List<VehicleData>> carRecord(@RequestBody HistoryReq historyReq){
|
||||
return Result.success(historicalTrackService.carRecord(historyReq));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,5 +30,5 @@ public interface HistoricalTrackService {
|
|||
* @param historyReq
|
||||
* @return
|
||||
*/
|
||||
List<VehicleData> CarRecord(HistoryReq historyReq);
|
||||
List<VehicleData> carRecord(HistoryReq historyReq);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class HistoricalTrackServiceImpl implements HistoricalTrackService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<VehicleData> CarRecord(HistoryReq historyReq) {
|
||||
public List<VehicleData> carRecord(HistoryReq historyReq) {
|
||||
LambdaQueryWrapper<VehicleData> queryWrapper = new LambdaQueryWrapper<>();
|
||||
LambdaQueryWrapper<VehicleData> wrapper = queryWrapper
|
||||
.eq(VehicleData::getVin, historyReq.getVin())
|
||||
|
|
Loading…
Reference in New Issue