Commit c34f036d authored by renjie's avatar renjie

绑定记录

parent 8fc704b8
...@@ -63,7 +63,8 @@ public class Shop { ...@@ -63,7 +63,8 @@ public class Shop {
this.setShopUA(shop.getShopUA()); this.setShopUA(shop.getShopUA());
if (shop.getShopCookie() != null) if (shop.getShopCookie() != null)
this.setShopCookie(shop.getShopCookie()); this.setShopCookie(shop.getShopCookie());
this.setCreateTime(shop.getCreateTime()); if (shop.getCreateTime() != 0)
this.setCreateTime(shop.getCreateTime());
return this; return this;
} }
...@@ -92,7 +93,8 @@ public class Shop { ...@@ -92,7 +93,8 @@ public class Shop {
this.setShopUA(shop.getShopUA()); this.setShopUA(shop.getShopUA());
if (shop.getShopCookie() != null) if (shop.getShopCookie() != null)
this.setShopCookie(shop.getShopCookie()); this.setShopCookie(shop.getShopCookie());
this.setCreateTime(shop.getCreateTime()); if (shop.getCreateTime() != 0)
this.setCreateTime(shop.getCreateTime());
return this; return this;
} }
......
...@@ -30,7 +30,6 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -30,7 +30,6 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.IOException; import java.io.IOException;
import java.time.Instant; import java.time.Instant;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -286,12 +285,12 @@ public class ShopServiceImpl implements ShopService { ...@@ -286,12 +285,12 @@ public class ShopServiceImpl implements ShopService {
if (!ipResource.getId().equals(shop.getIpId())) if (!ipResource.getId().equals(shop.getIpId()))
throw new ClientRequestException(BrowserErrorCode.IPNOTBINDTOSHOP); throw new ClientRequestException(BrowserErrorCode.IPNOTBINDTOSHOP);
try { try {
List<HashMap<String, String>> history = ipResource.getBindHistory(); List<BindHistory> history = ipResource.getBindHistory();
HashMap<String, String> map = new HashMap<>(); BindHistory bindHistory = new BindHistory();
map.put("shopName", shop.getShopName()); bindHistory.setIp(ipResource.getAddr());
map.put("platform", shop.getShopPlatform()); bindHistory.setPlatform(shop.getShopPlatform());
map.put("ip", ipResource.getAddr()); bindHistory.setShopName(shop.getShopName());
history.add(map); history.add(bindHistory);
shop.setIp(null); shop.setIp(null);
shop.setIpId(null); shop.setIpId(null);
shop.setIpRegion(null); shop.setIpRegion(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