Commit 054c237b1f65dd41bd6de0e712e8d8daeda65d95
1 parent
e8368bb7
支付 app、商户,删除时,需要校验关联数据
Showing
2 changed files
with
2 additions
and
0 deletions
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/impl/PayAppServiceImpl.java
| @@ -61,6 +61,7 @@ public class PayAppServiceImpl implements PayAppService { | @@ -61,6 +61,7 @@ public class PayAppServiceImpl implements PayAppService { | ||
| 61 | public void deleteApp(Long id) { | 61 | public void deleteApp(Long id) { |
| 62 | // 校验存在 | 62 | // 校验存在 |
| 63 | this.validateAppExists(id); | 63 | this.validateAppExists(id); |
| 64 | + // TODO aquan:校验是否存在进行中的支付单、退款单,如果是,则不允许删除。 | ||
| 64 | // 删除 | 65 | // 删除 |
| 65 | appMapper.deleteById(id); | 66 | appMapper.deleteById(id); |
| 66 | } | 67 | } |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/impl/PayMerchantServiceImpl.java
| @@ -57,6 +57,7 @@ public class PayMerchantServiceImpl implements PayMerchantService { | @@ -57,6 +57,7 @@ public class PayMerchantServiceImpl implements PayMerchantService { | ||
| 57 | public void deleteMerchant(Long id) { | 57 | public void deleteMerchant(Long id) { |
| 58 | // 校验存在 | 58 | // 校验存在 |
| 59 | this.validateMerchantExists(id); | 59 | this.validateMerchantExists(id); |
| 60 | + // TODO @aquan:需要校验 PayApp 是否都在。如果在的情况下,不允许删除 | ||
| 60 | // 删除 | 61 | // 删除 |
| 61 | merchantMapper.deleteById(id); | 62 | merchantMapper.deleteById(id); |
| 62 | } | 63 | } |