Commit cccf9a06 authored by renjie's avatar renjie

绑定记录

parent 5c83765e
...@@ -26,7 +26,7 @@ public class IpResource implements Serializable { ...@@ -26,7 +26,7 @@ public class IpResource implements Serializable {
private long purchasedTime; private long purchasedTime;
private long validTime; private long validTime;
private String details; private String details;
List<BindHistory> bindHistory = new ArrayList<>(); private List<BindHistory> bindHistory = new ArrayList<>();
private boolean isDeleted; private boolean isDeleted;
private String username; private String username;
private String owner; private String owner;
......
...@@ -28,7 +28,11 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -28,7 +28,11 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.IOException; import java.io.IOException;
import java.text.SimpleDateFormat;
import java.time.Instant; import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -290,6 +294,7 @@ public class ShopServiceImpl implements ShopService { ...@@ -290,6 +294,7 @@ public class ShopServiceImpl implements ShopService {
bindHistory.setIp(ipResource.getAddr()); bindHistory.setIp(ipResource.getAddr());
bindHistory.setPlatform(shop.getShopPlatform()); bindHistory.setPlatform(shop.getShopPlatform());
bindHistory.setShopName(shop.getShopName()); bindHistory.setShopName(shop.getShopName());
bindHistory.setUnbindTime(ZonedDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
history.add(bindHistory); history.add(bindHistory);
shop.setIp(null); shop.setIp(null);
shop.setIpId(null); shop.setIpId(null);
......
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