Commit 6cae06fb authored by renjie's avatar renjie

information bug

parent 00691a81
package com.edgec.browserbackend.account.domain; package com.edgec.browserbackend.account.domain;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Document;
@Document(collection = "queryipurllist") @Document(collection = "queryipurllist")
public class QueryIpUrlList { public class QueryIpUrlList {
@Id
private String id;
private String url; private String url;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUrl() { public String getUrl() {
return url; return url;
} }
......
...@@ -373,11 +373,15 @@ public class ShopServiceImpl implements ShopService { ...@@ -373,11 +373,15 @@ public class ShopServiceImpl implements ShopService {
if (account == null) if (account == null)
throw new ClientRequestException(AccountErrorCode.NAMENOTEXIST); throw new ClientRequestException(AccountErrorCode.NAMENOTEXIST);
ShopSummary shopSummary = new ShopSummary(); ShopSummary shopSummary = new ShopSummary();
List<String> unbind = userShopRepository.findByUsername(username).stream().map(x -> x.getShopId()).collect(Collectors.toList()); List<String> allShopIds = userShopRepository.findByUsername(username).stream().map(x -> x.getShopId()).collect(Collectors.toList());
for (String id:unbind) { List<String> unbind = new ArrayList<>();
IpResource ipResource = ipResourceRepository.findByShopIdAndIsDeleted(id, false); if (allShopIds != null && allShopIds.size() > 0) {
if (ipResource != null) for (String id:allShopIds) {
unbind.remove(id); IpResource ipResource = ipResourceRepository.findByShopIdAndIsDeleted(id, false);
if (ipResource == null) {
unbind.add(id);
}
}
} }
shopSummary.setUnbind(unbind.size()); shopSummary.setUnbind(unbind.size());
List<String> shopIds = userShopRepository.findByUsername(username).stream().map(x -> x.getShopId()).collect(Collectors.toList()); List<String> shopIds = userShopRepository.findByUsername(username).stream().map(x -> x.getShopId()).collect(Collectors.toList());
......
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