Commit 1bce4436 authored by renjie's avatar renjie

子用户bug

parent 31ca06df
......@@ -431,7 +431,6 @@ public class AccountController {
throw new ClientRequestException(BrowserErrorCode.INFORMATIONNOTCOMPELETE);
companyAuthorizeDto.setCoporationLicense_front(coporationLicense_front);
companyAuthorizeDto.setCoporationLicense_back(coporationLicense_back);
companyAuthorizeDto.setRealController(realController);
companyAuthorizeDto.setWritePerson(writePerson);
if (writePerson == 1 && (agency_back == null || agency_back == null))
throw new ClientRequestException(BrowserErrorCode.INFORMATIONNOTCOMPELETE);
......
......@@ -17,7 +17,6 @@ public class CompanyAuthorize {
private String coporationPlace;
private String coporationLicenseFront;
private String coporationLicenseBack;
private int realController;//0 -- 法定代表人, 1 -- 非法定代表人
private int writePerson; //0 -- 法定代表人, 1 -- 代理人
private String agencyFront;
......@@ -35,7 +34,6 @@ public class CompanyAuthorize {
this.companyName = companyAuthorizeDto.getCompanyName();
if (companyAuthorizeDto.getRegisterNumber() != null)
this.registerNumber = companyAuthorizeDto.getRegisterNumber();
this.realController = companyAuthorizeDto.getRealController();
this.writePerson = companyAuthorizeDto.getWritePerson();
}
......@@ -71,11 +69,6 @@ public class CompanyAuthorize {
this.companyName = companyName;
}
public int getRealController() {
return realController;
}
public int getWritePerson() {
return writePerson;
}
......@@ -89,9 +82,6 @@ public class CompanyAuthorize {
return coporationPlace;
}
public void setRealController(int realController) {
this.realController = realController;
}
public void setRegisterNumber(String registerNumber) {
this.registerNumber = registerNumber;
......
......@@ -16,7 +16,6 @@ public class CompanyAuthorizeDto {
private String coporationPlace;
private MultipartFile coporationLicense_front;
private MultipartFile coporationLicense_back;
private int realController;//0 -- 法定代表人, 1 -- 非法定代表人
private int writePerson; //0 -- 法定代表人, 1 -- 代理人
private MultipartFile agency_front;
......@@ -34,7 +33,6 @@ public class CompanyAuthorizeDto {
this.companyName = companyAuthorize.getCompanyName();
if (companyAuthorize.getRegisterNumber() != null)
this.registerNumber = companyAuthorize.getRegisterNumber();
this.realController = companyAuthorize.getRealController();
this.writePerson = companyAuthorize.getWritePerson();
}
......@@ -70,10 +68,6 @@ public class CompanyAuthorizeDto {
return coporationPlace;
}
public void setRealController(int realController) {
this.realController = realController;
}
public void setCoporationPlace(String coporationPlace) {
this.coporationPlace = coporationPlace;
}
......@@ -82,10 +76,6 @@ public class CompanyAuthorizeDto {
return writePerson;
}
public int getRealController() {
return realController;
}
public int getType() {
return type;
}
......
......@@ -712,10 +712,12 @@ public class AccountServiceImpl implements AccountService {
User authUser = new User();
authUser.setUsername(user.getName());
String password;
if (org.apache.commons.lang3.StringUtils.isNotBlank(subUsersRequestDto.getPassword()))
authUser.setPassword(subUsersRequestDto.getPassword());
password = subUsersRequestDto.getPassword();
else
authUser.setPassword(makeRandomPassword(8));
password = makeRandomPassword(8);
authUser.setPassword(password);
authUser.setPhone(existing.getPhoneNumber());
authUser.setEnabled(true);
if (subUsersRequestDto.getPermission() != -1)
......@@ -738,10 +740,7 @@ public class AccountServiceImpl implements AccountService {
if (user.getWhiteList() != null && user.getWhiteList().size() > 0)
whiteList.addAll(user.getWhiteList());
account.setWhiteList(whiteList);
if (org.apache.commons.lang3.StringUtils.isNotBlank(subUsersRequestDto.getPassword()))
account.setPassword(subUsersRequestDto.getPassword());
else
account.setPassword(makeRandomPassword(8));
account.setPassword(password);
repository.save(account);
// emailService.sendEmailVerification(user.getUsername(), user.getEmail(), user.getVerificationCode());
......
......@@ -121,6 +121,7 @@ public class BrowserTask {
if (StringUtils.isNotBlank(ipBuyResultDto.getErrorCode())) {
log.error("fail to buy ip");
log.error(ipBuyResultDto.getErrorCode());
result.set(false);
}
if (ipBuyResultDto != null && ipBuyResultDto.getIplist() != null && ipBuyResultDto.getIplist().size() >= 1) {
AtomicInteger index = new AtomicInteger();
......@@ -132,6 +133,7 @@ public class BrowserTask {
ipResourceRepository.save(ipResource);
} else {
log.error("no ipResource");
result.set(false);
}
index.getAndIncrement();
});
......@@ -141,6 +143,7 @@ public class BrowserTask {
result.set(true);
} catch (Exception e) {
log.error(e.getMessage());
result.set(false);
}
if (result.get() == false && (ipResource.getPurchasedTime() < Instant.now().minusSeconds(7200).toEpochMilli())) {
IpChargeRequestDto ipChargeRequestDto = buildIpChargeRequestDto(ipResource, 3, 0);
......
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