Showing
1 changed file
with
4 additions
and
0 deletions
| @@ -375,6 +375,10 @@ public class ContractDistributorStandardServiceImpl extends | @@ -375,6 +375,10 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 375 | throw new DefaultClientException("合同不存在!"); | 375 | throw new DefaultClientException("合同不存在!"); |
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | + if (!"DRAFT".equals(data.getStatus())) { | ||
| 379 | + throw new DefaultClientException("只有草稿合同才能删除!"); | ||
| 380 | + } | ||
| 381 | + | ||
| 378 | Wrapper<ContractDistributorStandard> wrapper = Wrappers.lambdaUpdate(ContractDistributorStandard.class) | 382 | Wrapper<ContractDistributorStandard> wrapper = Wrappers.lambdaUpdate(ContractDistributorStandard.class) |
| 379 | .set(ContractDistributorStandard::getStatus, "DELETED") | 383 | .set(ContractDistributorStandard::getStatus, "DELETED") |
| 380 | .eq(ContractDistributorStandard::getId, id); | 384 | .eq(ContractDistributorStandard::getId, id); |