Compare commits

...

1 Commits

Author SHA1 Message Date
zhaokai 095db304ab chore(build): 导入用户添加身份证和人员类型 2026-07-09 15:31:53 +08:00
2 changed files with 18 additions and 5 deletions

View File

@ -3,8 +3,8 @@ spring:
import:
# - classpath:nacos.yml
# - classpath:sdk.yml
- classpath:nacos-prod.yml
- classpath:sdk-prod.yml
# - classpath:nacos-prod2.yml
# - classpath:sdk-prod2.yml
# - classpath:nacos-prod.yml
# - classpath:sdk-prod.yml
- classpath:nacos-prod2.yml
- classpath:sdk-prod2.yml
- classpath:swagger.yml

View File

@ -415,7 +415,10 @@ public class UserImportExe {
user.setPostId(postId);
user.setCorpinfoId(corpinfoId);
user.setName(importEntity.getName());
user.setUserIdCard(encodeBase64IdCard(importEntity.getUserIdCard()));
user.setPersonnelType(importEntity.getPersonnelType());
user.setPersonnelTypeName(importEntity.getPersonnelTypeName());
user.resetPassword(corpInfoDO.getType());
userGateway.add(user);
String corpName = null;
if(corpInfoDO != null && !ObjectUtils.isEmpty(corpInfoDO.getCorpName())){
@ -431,5 +434,15 @@ public class UserImportExe {
allUsers.add(userDO);
userDOTempList.add(userDO);
}
private static String encodeBase64IdCard(String userIdCard) {
if (StringUtils.isEmpty(userIdCard)) {
return null;
}
try {
return Base64.getEncoder().encodeToString(userIdCard.trim().getBytes("UTF-8"));
} catch (Exception ex) {
return userIdCard.trim();
}
}
}