fix:删除开票
This commit is contained in:
1 parent
f437c871d5
commit
c262347106
1 file changed
+2
-2
+2
-2
@@ -217,7 +217,7 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl<WalletRecharge
|
||||
if (ObjectUtil.isEmpty(list)) return;
|
||||
for (Long v : list) {
|
||||
WalletRechargeInvoiceEntity detail = baseMapper.selectById(v);
|
||||
if (ObjectUtil.isEmpty(detail) || ObjectUtil.isEmpty(detail.getApplyId())) continue;
|
||||
if (ObjectUtil.isEmpty(detail)) continue;
|
||||
if (ObjectUtil.isNotEmpty(detail.getStatus()) && ObjectUtil.notEqual(detail.getStatus(), WalletRechargeInvoiceStatusEnum.UNBIND.getCode())) {
|
||||
UserInfo userInfo = remoteUserService.getByUserId(detail.getApplyUserId()).getData();
|
||||
throw new RuntimeException("用户<" + userInfo.getSysUser().getName() + ">创建的发票已经" + WalletRechargeInvoiceStatusEnum.codeOf(detail.getStatus()).getDesc() + "不能删除");
|
||||
@@ -225,7 +225,7 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl<WalletRecharge
|
||||
// 删除申请记录
|
||||
baseMapper.deleteById(v);
|
||||
// 删除申请记录条目
|
||||
importMapper.delete(new LambdaQueryWrapper<WalletRechargeImportEntity>().eq(WalletRechargeImportEntity::getApplyId, v));
|
||||
importMapper.delete(new LambdaQueryWrapper<WalletRechargeImportEntity>().eq(WalletRechargeImportEntity::getInvoiceId, v));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user