Commit 5a0aee0b authored by caotao's avatar caotao

更新权限信息时更新权限数据

parent ee27996c
......@@ -366,6 +366,7 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
//----------------------------权限表中新增数据-----------------------------
StdUserEmpower stdUserEmpower = new StdUserEmpower();
stdUserEmpower.setPermissionType("YTH");
stdUserEmpower.setRecDate(new Date());
stdUserEmpower.setAmosOrgCode(Arrays.asList(personAccount.getYthPermission()));
stdUserEmpower.setAmosUserId(personAccount.getPuserId());
userEmpowerMapper.insert(stdUserEmpower);
......@@ -601,12 +602,14 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", personAccount.getPuserId()).eq("permission_type", "YTH"));
if(ObjectUtils.isEmpty(stdUserEmpower)){
stdUserEmpower = new StdUserEmpower();
stdUserEmpower.setRecDate(new Date());
stdUserEmpower.setPermissionType("YTH");
stdUserEmpower.setAmosOrgCode(Arrays.asList(personAccount.getYthPermission()));
stdUserEmpower.setAmosUserId(personAccount.getPuserId());
userEmpowerMapper.insert(stdUserEmpower);
}else {
stdUserEmpower.setAmosOrgCode(Arrays.asList(personAccount.getYthPermission()));
stdUserEmpower.setRecDate(new Date());
userEmpowerMapper.updateById(stdUserEmpower);
}
personAccountService.updateById(personAccount);
......
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