Commit b1c721bc by fz

1.日志创建时间由参数传递

1 parent d65bfc5a
package com.glsx.smart.pojo.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 智能车钥匙,指令上报
......@@ -19,5 +23,10 @@ public class SmartCarKeyCommandRequest{
private String userId;
//上报时间 yyyy-MM-dd
private String logDate;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss",
timezone = "GMT+8"
)
private Date logDate;
}
......@@ -181,7 +181,7 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
//明文存储crep
logData.setCrepCode(crep);
logData.setKeyCommand(carKeyCommandRequest.getKeyCommand());
logData.setCreateTime(DateUtil.parse(carKeyCommandRequest.getLogDate(),"yyyy-MM-dd"));
logData.setCreateTime(carKeyCommandRequest.getLogDate());
smartKeyCommandLogService.insert(logData);
return R.ok();
}
......
......@@ -131,7 +131,7 @@ public class AiLockingKeyShareServiceImpl implements AiLockingKeyShareService {
SmartKeyCommandShareLog logData = new SmartKeyCommandShareLog();
logData.setKeyCommand(command);
logData.setShareCarKeyId(keyId);
logData.setCreateTime(DateUtil.parse(request.getLogDate(),"yyyy-MM-dd"));
logData.setCreateTime(request.getLogDate());
shareLogService.insert(logData);
return R.ok();
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!