Commit c34f036d authored by renjie's avatar renjie

绑定记录

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