| | |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("规章制度重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>().eq(BsRules::getVersionCode, bo.getVersionCode())); |
| | | if (vList.size() > 0) { |
| | | throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | // List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>().eq(BsRules::getVersionCode, bo.getVersionCode())); |
| | | // if (vList.size() > 0) { |
| | | // throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | // } |
| | | BsRules add = BeanUtil.toBean(bo, BsRules.class); |
| | | validEntityBeforeSave(add); |
| | | boolean flag = save(add); |
| | |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("规章制度重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>() |
| | | .eq(BsRules::getVersionCode, bo.getVersionCode()) |
| | | .ne(BsRules::getId, bo.getId())); |
| | | if (vList.size() > 0) { |
| | | throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | // List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>() |
| | | // .eq(BsRules::getVersionCode, bo.getVersionCode()) |
| | | // .ne(BsRules::getId, bo.getId())); |
| | | // if (vList.size() > 0) { |
| | | // throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | // } |
| | | BsRules update = BeanUtil.toBean(bo, BsRules.class); |
| | | validEntityBeforeSave(update); |
| | | return updateById(update); |