diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java index 59e4579..71b5b43 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java @@ -104,10 +104,14 @@ public class AssetAppServiceImpl extends ServiceImpl i public Boolean edit(AssetApp assetApp) { updateById(assetApp); AssetAppCpPo one = assetAppCpService.lambdaQuery().eq(AssetAppCpPo::getAssetId, assetApp.getId()).one(); - BeanUtil.copyProperties(assetApp, one); - one.setTaskId(unitService.selectTaskId(assetApp.getSsdw(), "4")); - one.setAssetId(assetApp.getId()); - return assetAppCpService.updateById(one); + if (one != null) { + BeanUtil.copyProperties(assetApp, one); + one.setTaskId(unitService.selectTaskId(assetApp.getSsdw(), "4")); + one.setAssetId(assetApp.getId()); + return assetAppCpService.updateById(one); + }else { + return true; + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java index 33fffad..948ddf6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java @@ -104,9 +104,13 @@ public class AssetEmailServiceImpl extends ServiceImpl