| | |
| | | dealSolutionsData(company); |
| | | return company; |
| | | } |
| | | @Override |
| | | @Transactional |
| | | public void updateSolutions(Company company) { |
| | | if(company.getId()==null |
| | | ||company.getSolutionList() == null |
| | | ||company.getSolutionList().size() == 0 ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | Company model = findById(company.getId()); |
| | | if(model == null || !Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO) ){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY ); |
| | | } |
| | | companySolutionJoinMapper.delete(new UpdateWrapper<CompanySolution>().lambda().eq(CompanySolution::getCompanyId,company.getId())); |
| | | //处理关联方案 |
| | | dealSolutionsData(company); |
| | | } |
| | | |
| | | private void dealSystemUserData(Company company) { |
| | | if(systemUserMapper.selectCount(new QueryWrapper<SystemUser>().lambda() |