Commit 71e1ae63 authored by Administrator's avatar Administrator

Merge branch 'feature_history_new_field' into 'master'

操作日志新增字段

See merge request !220
parents df6eef1c fdc73897
......@@ -25,6 +25,8 @@ public class OperationHistory {
private String operation;
private long operationTime;
private String administrator;
private String shopBindIp;
private String shopBindName;
public OperationHistory(OperationHistoryDto operationHistoryDto) {
if (operationHistoryDto.getAccount() != null) {
......@@ -47,6 +49,14 @@ public class OperationHistory {
this.operation = operationHistoryDto.getOperation();
}
if (operationHistoryDto.getShopBindIp() != null) {
this.shopBindIp = operationHistoryDto.getShopBindIp();
}
if (operationHistoryDto.getShopBindName() != null) {
this.shopBindName = operationHistoryDto.getShopBindName();
}
if (operationHistoryDto.getOperationTime() != null) {
DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime localDateTime = LocalDateTime.parse(operationHistoryDto.getOperationTime(), format);
......
......@@ -15,6 +15,8 @@ public class OperationHistoryDto {
private String loginPlace;
private String operation;
private String operationTime;
private String shopBindIp;
private String shopBindName;
public OperationHistoryDto(){
......@@ -33,6 +35,10 @@ public class OperationHistoryDto {
this.operation = operationHistory.getOperation();
if (operationHistory.getOperationTime() != 0)
this.operationTime = Instant.ofEpochMilli(operationHistory.getOperationTime()).atZone(ZoneOffset.UTC).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
if (operationHistory.getShopBindIp() != null)
this.shopBindIp = operationHistory.getShopBindIp();
if (operationHistory.getShopBindName() != null)
this.shopBindName = operationHistory.getShopBindName();
}
public String getAccount() {
......@@ -82,4 +88,20 @@ public class OperationHistoryDto {
public void setOperationTime(String operationTime) {
this.operationTime = operationTime;
}
public String getShopBindIp() {
return shopBindIp;
}
public void setShopBindIp(String shopBindIp) {
this.shopBindIp = shopBindIp;
}
public String getShopBindName() {
return shopBindName;
}
public void setShopBindName(String shopBindName) {
this.shopBindName = shopBindName;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment