sys_user添加app_user_id,好区分用户对照

This commit is contained in:
sh
2026-02-10 18:46:45 +08:00
parent c0154cd633
commit 270e3c291d
6 changed files with 35 additions and 7 deletions

View File

@@ -178,18 +178,23 @@ public class OauthLoginHlwService {
appUserParm.setIdCard(wwTyInfo.getEnterprisecode());
appUserParm.setName(wwTyInfo.getEnterprisename());
}
newUser.setPassword(SecurityUtils.encryptPassword("123456"));
newUser.setDelFlag("0");
newUser.setUserName(localUsername);
sysUserService.insertUser(newUser);
//插入app_user
Long appUserId=null;
AppUser appUser=appUserService.selectAppuserByIdcard(wwTyInfo.getIdno());
if(appUser!=null){
appUserParm.setUserId(appUser.getUserId());
appUserService.updateAppUser(appUserParm);
appUserId=appUser.getUserId();
}else{
appUserService.insertAppUser(appUserParm);
int i=appUserService.insertAppUser(appUserParm);
appUserId=appUserParm.getUserId();
}
//查询系统用户
newUser.setPassword(SecurityUtils.encryptPassword("123456"));
newUser.setDelFlag("0");
newUser.setUserName(localUsername);
newUser.setAppUserId(appUserId);
sysUserService.insertUser(newUser);
return newUser;
}