| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.enums.IsDeleteEnum; |
| | | import com.ruoyi.common.enums.SaleEnum; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.projectManagement.dto.ContractInfoDto; |
| | | import com.ruoyi.projectManagement.dto.SaveInfoDto; |
| | | import com.ruoyi.projectManagement.dto.ShippingAddressDto; |
| | |
| | | @Override |
| | | @Transactional |
| | | public void deleteInfo(Long id) { |
| | | Info current = infoMapper.selectById(id); |
| | | if (current == null || Integer.valueOf(IsDeleteEnum.DELETED.getCode()).equals(current.getIsDelete())) { |
| | | throw new ServiceException("项目不存在"); |
| | | } |
| | | if (!"未开始".equals(current.getCurrentPhase())) { |
| | | throw new ServiceException("项目已开始,不能删除"); |
| | | } |
| | | LambdaUpdateWrapper<Info> updateWrapper = new LambdaUpdateWrapper<Info>(); |
| | | updateWrapper.eq(Info::getId, id); |
| | | updateWrapper.set(Info::getIsDelete, IsDeleteEnum.DELETED.getCode()); |