From 2fed0b52d9c8e98d46c1eb8bd3876dafa60fc0b6 Mon Sep 17 00:00:00 2001 From: fengjin <1435304038@qq.com> Date: 星期五, 25 十一月 2022 10:14:16 +0800 Subject: [PATCH] 1.修改导办数量可能是负数的问题 --- flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java b/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java index c804e74..c3bde4d 100644 --- a/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java +++ b/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java @@ -378,7 +378,10 @@ //删除进展记录 guideEvolveMapper.delete(new QueryWrapper<GuideEvolveEntity>().lambda().eq(GuideEvolveEntity::getGuideId, Id)); TransactionEvent transactionEvent = transactionEventMapper.selectOne(new QueryWrapper<TransactionEvent>().lambda().eq(TransactionEvent::getId, guideRepairOrderDelete.getMatterId())); - transactionEvent.setTransactionNum(transactionEvent.getTransactionNum() - 1); + if (transactionEvent.getTransactionNum()>0) + { + transactionEvent.setTransactionNum(transactionEvent.getTransactionNum() - 1); + } //对应办事指南减一 transactionEventMapper.updateById(transactionEvent); SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId, guideRepairOrderDelete.getGuideUserId())); -- Gitblit v1.7.1