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