Commit e91eae89 authored by huangjiamin's avatar huangjiamin

getPass

parent 063dd026
...@@ -62,13 +62,17 @@ public class TempServiceImpl implements TempService { ...@@ -62,13 +62,17 @@ public class TempServiceImpl implements TempService {
@Override @Override
public String getPassword(String ip) { public String getPassword(String ip) {
IpResource ipResource = ipResourceRepository.findFirstByAddrOrderByPurchasedTimeDesc(ip); IpResource ipResource = ipResourceRepository.findFirstByAddrOrderByPurchasedTimeDesc(ip);
String password; StringBuilder proxy = new StringBuilder();
if (ipResource.getProxyPassword() == null) { proxy.append(ipResource.getUsername())
password = ipResource.getUsername() + "<br/>" + ipResource.getPassword(); .append(",")
} else { .append(ipResource.getPassword());
password = ipResource.getProxyUsername() + "<br/>" + ipResource.getProxyPassword(); if (ipResource.getProxyPassword() != null) {
proxy.append(",")
.append(ipResource.getProxyUsername())
.append(",")
.append(ipResource.getProxyPassword());
} }
return password; return proxy.toString();
} }
@Override @Override
......
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