Andru
2023-12-26 6f17f22c8cf0668c6af282c615b02f50a1c6b458
mot修改用户信息优化
1个文件已修改
64 ■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/service/impl/UserServiceImpl.java 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/impl/UserServiceImpl.java
@@ -181,24 +181,24 @@
    }
    /**新增*/
    @Override
    public void insert(User user) {
        int count = userMapper.insert(user);
        if(count != 1) {
            throw new TipsException("新增失败!");
        }
    }
    @Override
    public void insert(User user) {
        int count = userMapper.insert(user);
        if(count != 1) {
            throw new TipsException("新增失败!");
        }
    }
    /**修改*/
    @Override
    public void updateAll(User user) {
        int count = userMapper.updateAll(user);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**修改*/
    @Override
    public void updateAll(User user) {
        int count = userMapper.updateAll(user);
        if(count!=1) {
            throw new TipsException("保存失败!");
        }
    }
    /**修改*/
    /**修改*/
    @Override
    public void updateWhere(SqlSentence sqlSentence) {
        int count = userMapper.updateWhere(sqlSentence);
@@ -207,16 +207,16 @@
        }
    }
    /**删除一个*/
    @Override
    public void deleteOne(String delId) {
        int count = userMapper.deleteById(delId);
        if(count!=1) {
            throw new TipsException("删除失败!");
        }
    }
    /**删除一个*/
    @Override
    public void deleteOne(String delId) {
        int count = userMapper.deleteById(delId);
        if(count!=1) {
            throw new TipsException("删除失败!");
        }
    }
    /**查询条数*/
    /**查询条数*/
    @Override
    public int selectCount(SqlSentence sqlSentence) {
        int count = userMapper.selectCount(sqlSentence);
@@ -3343,8 +3343,8 @@
            userDiagnosisDoctorItem.setRoomName(userDoctorRoomItemDto.getFamiliesRoomName());
            //旧的
            List<UserFamiliesRoom> rooms = oldList.stream().filter(a
                    -> (StringUtils.noNull(a.getFamiliesRoomId()) && a.getFamiliesRoomId().equals(userDoctorRoomItemDto.getFamiliesRoomId()))
                    ||(StringUtils.noNull(a.getFamiliesRoomName()) && a.getFamiliesRoomName().equals(userDoctorRoomItemDto.getFamiliesRoomName())))
                            -> (StringUtils.noNull(a.getFamiliesRoomId()) && a.getFamiliesRoomId().equals(userDoctorRoomItemDto.getFamiliesRoomId()))
                            ||(StringUtils.noNull(a.getFamiliesRoomName()) && a.getFamiliesRoomName().equals(userDoctorRoomItemDto.getFamiliesRoomName())))
                    .collect(Collectors.toList());
            if (rooms.size() > 0){
                userDoctorRoomItemDto.setOldDoctorId(rooms.get(0).getDoctorId());
@@ -3858,7 +3858,10 @@
        List<UserLabelDcpDto> list = new ArrayList<>();
        UserLabelDcpAddDto userLabelAddDto = new UserLabelDcpAddDto();
        userLabelAddDto.setUserId(userInfoCompleteDto.getUserId());
        professionType.setTagName(userInfoCompleteDto.getProfessionTypeName().trim());
        if (!StringUtils.isEmpty(userInfoCompleteDto.getProfessionTypeName())){
            professionType.setTagName(userInfoCompleteDto.getProfessionTypeName().trim());
        }
        list.add(professionType);
        if (!StringUtils.isEmpty(userInfoCompleteDto.getMarriageTypeName())){
            marriageTyp.setTagName(userInfoCompleteDto.getMarriageTypeName().trim());
@@ -3908,11 +3911,6 @@
            }
            data.put("editUserTagInfoList", editUserTagInfoList);
        }
        //List<UserLabelDcpDto> userLabelDtoList = userLabelAddDto.getUserLabelDtoList();
      /*  if (userLabelDtoLists != null && userLabelDtoLists.size() > 0) {
        }*/
        //要删除的标签 固定 - 职位 生育 婚否
        SqlSentence sqlSentence = new SqlSentence();