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