From 32929606943fedfca286b052bcb280193a3e0222 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期六, 18 一月 2025 10:23:58 +0800 Subject: [PATCH] git ch --- server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java index 3ecda64..2acfe51 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java @@ -221,7 +221,22 @@ @Override public void deleteById(Integer id) { - solutionsMapper.deleteById(id); + //鏌ヨ鏄惁宸插瓨鍦ㄤ娇鐢ㄤ腑鐨勪繚鍗� + if(insuranceApplyMapper.selectCount(new QueryWrapper<InsuranceApply>().lambda() + .apply(" solution_id in ( select id from solutions where BASE_ID = "+id+" or id = "+id+" )" ) + .notIn(InsuranceApply::getStatus + ,Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey() + ,Constants.InsuranceApplyStatus.CLOSE.getKey() + ,Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() + ) + )>Constants.ZERO){ + throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀛樺湪宸叉姇淇濈殑淇濆崟鏁版嵁,鏃犳硶杩涜鍒犻櫎"); + }; + solutionsMapper.update(null,new UpdateWrapper<Solutions>() + .lambda() + .set(Solutions::getIsdeleted,Constants.ONE) + .and(i->i.eq(Solutions::getId,id).or().eq(Solutions::getBaseId,id)) + ); } @Override -- Gitblit v1.9.3