| | |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import com.ruoyi.common.core.domain.entity.sysUserInfo; |
| | | import com.ruoyi.domain.*; |
| | | import com.ruoyi.domain.dto.MarryInfoDto; |
| | | import com.ruoyi.service.*; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | import com.ruoyi.system.mapper.SysRoleMapper; |
| | |
| | | // } |
| | | System.out.println("{{{{{{{{{{{{{{{"+user); |
| | | |
| | | if (user.getSpouseId() != null && !byId.getSpouseId().equals(user.getSpouseId())){ |
| | | if (user.getSpouseId() != null ){ |
| | | |
| | | //跟随配偶的家族和家庭信息 |
| | | // if ( !zInfoUserService.getById(user.getUserId()).getSpouseId().equals(user.getSpouseId())){ |
| | |
| | | return AjaxResult.error("家庭成员不能修改为普通用户"); |
| | | } |
| | | //更新配偶信息 |
| | | if(user.getSpouseId() != null && !byId.getSpouseId().equals(user.getSpouseId())) { |
| | | if(user.getSpouseId() != null) { |
| | | ZInfoUser zu = new ZInfoUser(); |
| | | zu.setUserId(user.getSpouseId()); |
| | | zu.setSpouseId(infoUser.getUserId()); |
| | |
| | | |
| | | //更新MarrySelf和MarryUser |
| | | ZInfoUser zfi = zInfoUserService.getById(user.getUserId()); |
| | | MarrySelf marrySelf = new MarrySelf(); |
| | | MarryInfoDto marrySelf = new MarryInfoDto(); |
| | | marrySelf.setUid(user.getSpouseId()); |
| | | marrySelf.setName(zfi.getOldName()); |
| | | marrySelf.setSpouseSex(zfi.getSex()==1?"男":"女"); |
| | |
| | | marrySelf.setSpouseName(infoUser.getOldName()); |
| | | marrySelf.setSpouseSex(infoUser.getSex()==1?"男":"女"); |
| | | marrySelf.setSpouseMarryStatus(0); |
| | | marrySelfService.saveOrUpdate(marrySelf); |
| | | marrySelfService.updateData(marrySelf); |
| | | //增加MarryUser |
| | | //增加marryUser |
| | | MarryUser marryUser = new MarryUser(); |