Commit 910e73c3 authored by tangwei's avatar tangwei

增删删除

parent 9bc7861c
......@@ -269,6 +269,17 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto,PersonBas
@Transactional
public int deletePerson(String [] ids) {
//查询所有平台用户
QueryWrapper<PersonAccount> wrapper = new QueryWrapper();
wrapper.in("person_id",ids);
List<PersonAccount> list=personAccountService.list(wrapper);
List<String> userid=new ArrayList<>();
for (PersonAccount personAccount : list) {
userid.add(personAccount.getUserId());
}
//删除平台
this.deleuser(String.join(",",userid));
return personBasicMapper.deleteList(ids);
}
......@@ -330,7 +341,15 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto,PersonBas
}
return companyModel;
}
private void deleuser(String userid) {
FeignClientResult<List<String>> cResult = Privilege.agencyUserClient.multDeleteUser(userid);
if (!ObjectUtils.isEmpty(cResult)) {
if(cResult.getStatus()!=200){
throw new RuntimeException();
}
}
}
/**
* 分页查询
......
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