Commit d0d60034 authored by chenyuxi's avatar chenyuxi

feat: 删除判断

parent da0c38e8
...@@ -90,8 +90,8 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -90,8 +90,8 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
public R deleteById(String id) { public R deleteById(String id) {
TInsuranceUnpurchaseApply apply = baseMapper.selectById(id); TInsuranceUnpurchaseApply apply = baseMapper.selectById(id);
if (Common.isNotNull(apply)) { if (Common.isNotNull(apply)) {
if (!CommonConstants.FOUR_STRING.equals(apply.getStatus()) && String[] allowDel = {CommonConstants.ZERO_STRING,CommonConstants.ONE_STRING, CommonConstants.FOUR_STRING};
!CommonConstants.ZERO_STRING.equals(apply.getStatus())) { if(!ArrayUtils.contains(allowDel, apply.getStatus())) {
return R.failed("数据状态发生改变,不能删除"); return R.failed("数据状态发生改变,不能删除");
} }
baseMapper.deleteById(apply); baseMapper.deleteById(apply);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment