| | |
| | | |
| | | @Override |
| | | public int saveFunctionalDistribution(FunctionalDistributionVo reqVo) { |
| | | Long companyId = SecurityUtils.getLoginUser().getUser().getCompanyId(); |
| | | Long companyId = SecurityUtils.getCompanyId(); |
| | | if (!companyId.equals(reqVo.getCompanyId())){ |
| | | throw new ApiException("无权操作!"); |
| | | } |
| | | List<SysFunctionalDistribution> list = reqVo.getList(); |
| | | if (list != null && !list.isEmpty()) |
| | | { |
| | | for (SysFunctionalDistribution sysFunctionalDistribution : list) { |
| | | sysFunctionalDistribution.setCompanyId(companyId); |
| | | sysFunctionalDistribution.setUpdateBy(SecurityUtils.getUsername()); |
| | | sysFunctionalDistribution.setUpdateTime(LocalDateTime.now()); |
| | | } |
| | | } |
| | | int i = sysFunctionalDistributionMapper.batchUpdate(list); |
| | | if (i < 1){ |
| | | throw new ApiException("保存失败!"); |