| | |
| | | // 优先获取当前数据库记录 |
| | | ZInfoUser byId = zInfoUserService.getById(user); |
| | | Long myFamily = byId.getFamilyId(); |
| | | |
| | | //获取同一用户的信息 并对其进行修改 |
| | | zInfoUserService.findByUaidToFaid(byId.getUaid()) |
| | | .stream() |
| | | .filter(infoUser1 -> !infoUser1.getUserId().equals(infoUser.getUserId())) |
| | | .forEach(infoUser1 -> { |
| | | infoUser1.setOldName(infoUser.getOldName()); |
| | | infoUser1.setMaritalStatus(infoUser.getMaritalStatus()); |
| | | infoUser1.setSex(infoUser.getSex()); |
| | | zInfoUserService.updateById(infoUser1); |
| | | }); |
| | | |
| | | // 保留原家庭ID(确保数据连续性) |
| | | if (myFamily != null) infoUser.setFamilyId(myFamily); |
| | | |
| | |
| | | marrySelfService.updateData(spouse); // 持久化 |
| | | } |
| | | |
| | | // 3.4 离婚特殊处理(状态码=2) |
| | | |
| | | |
| | | |
| | | // 3.4 离婚特殊处理(状态码=2) |
| | | if(user.getMaritalStatus() != null && user.getMaritalStatus() == 2) { |
| | | // 3.4.1 获取配偶信息 |
| | | Long spouseId = zInfoUserService.getById(user.getUserId()).getSpouseId(); |