|
|
@@ -128,7 +128,8 @@ public class UserService {
|
|
|
if (roleName.equals("ROLE_MINTER")) {
|
|
|
and.add(criteriaBuilder.equal(root.get("minter"), true));
|
|
|
} else {
|
|
|
- and.add(criteriaBuilder.isMember(Authority.get(AuthorityName.valueOf(roleName)), root.get("authorities")));
|
|
|
+ and.add(criteriaBuilder
|
|
|
+ .isMember(Authority.get(AuthorityName.valueOf(roleName)), root.get("authorities")));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -522,7 +523,7 @@ public class UserService {
|
|
|
throw new BusinessException("用户不存在或未认证");
|
|
|
}
|
|
|
String realName = identityAuthRepo.findFirstByUserIdAndStatusAndDelFalseOrderByCreatedAtDesc(
|
|
|
- user.getId(), AuthStatus.SUCCESS)
|
|
|
+ user.getId(), AuthStatus.SUCCESS)
|
|
|
.map(IdentityAuth::getRealName).orElse("").replaceAll(".*(?=.)", "**");
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("id", user.getId());
|
|
|
@@ -535,8 +536,8 @@ public class UserService {
|
|
|
|
|
|
public Map<String, Object> searchByPhoneAdmin(String phoneStr) {
|
|
|
List<String> phone = Arrays.stream(phoneStr.replaceAll("\n", " ")
|
|
|
- .replaceAll("\r\n", " ")
|
|
|
- .split(" "))
|
|
|
+ .replaceAll("\r\n", " ")
|
|
|
+ .split(" "))
|
|
|
.map(String::trim)
|
|
|
.filter(s -> !StringUtils.isEmpty(s))
|
|
|
.collect(Collectors.toList());
|
|
|
@@ -551,7 +552,8 @@ public class UserService {
|
|
|
|
|
|
public void addBankCard(Long userId, String bankNo, String phone, String code) throws BaseAdaPayException {
|
|
|
User user = userRepo.findById(userId).orElseThrow(new BusinessException("用户不存在"));
|
|
|
- IdentityAuth identityAuth = identityAuthRepo.findFirstByUserIdAndStatusAndDelFalseOrderByCreatedAtDesc(userId, AuthStatus.SUCCESS)
|
|
|
+ IdentityAuth identityAuth = identityAuthRepo
|
|
|
+ .findFirstByUserIdAndStatusAndDelFalseOrderByCreatedAtDesc(userId, AuthStatus.SUCCESS)
|
|
|
.orElseThrow(new BusinessException("用户未认证"));
|
|
|
if (identityAuth.isOrg()) {
|
|
|
//throw new BusinessException("企业认证用户请绑定对公账户");
|
|
|
@@ -575,6 +577,10 @@ public class UserService {
|
|
|
user.setSettleAccountId(Optional.ofNullable(accountId).orElse("1"));
|
|
|
save(user);*/
|
|
|
|
|
|
+ user.setMemberId(user.getId().toString());
|
|
|
+ user.setSettleAccountId("1");
|
|
|
+ save(user);
|
|
|
+
|
|
|
userBankCardRepo.save(UserBankCard.builder()
|
|
|
.bank(bankValidate.getBank())
|
|
|
.bankName(bankValidate.getBankName())
|
|
|
@@ -685,7 +691,8 @@ public class UserService {
|
|
|
list.forEach(user -> {
|
|
|
try {
|
|
|
Thread.sleep(500);
|
|
|
- IdentityAuth identityAuth = identityAuthRepo.findFirstByUserIdAndStatusAndDelFalseOrderByCreatedAtDesc(user.getId(), AuthStatus.SUCCESS)
|
|
|
+ IdentityAuth identityAuth = identityAuthRepo
|
|
|
+ .findFirstByUserIdAndStatusAndDelFalseOrderByCreatedAtDesc(user.getId(), AuthStatus.SUCCESS)
|
|
|
.orElseThrow(new BusinessException("用户未认证"));
|
|
|
UserBankCard userBankCard = userBankCardRepo.findByUserId(user.getId()).stream().findAny()
|
|
|
.orElseThrow(new BusinessException("未绑卡"));
|
|
|
@@ -715,9 +722,9 @@ public class UserService {
|
|
|
user.setPassword(null);
|
|
|
user.setTradeCode(null);
|
|
|
List<UserBankCard> byUserId = userBankCardRepo.findByUserId(user.getId());
|
|
|
- if (byUserId.size()==0||byUserId==null){
|
|
|
+ if (byUserId.size() == 0 || byUserId == null) {
|
|
|
user.setIsUserBankCard(false);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
user.setIsUserBankCard(true);
|
|
|
}
|
|
|
return user;
|