zhangnaisong
2024-07-11 cd538c205628f28839323b49b7f77f33196a601f
ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarServiceImpl.java
@@ -26,6 +26,7 @@
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.sy.domain.ArdAccessFence;
import com.ruoyi.sy.mapper.ArdTankLockMapper;
import com.ruoyi.sy.param.ArdSyCarParam;
import com.ruoyi.sy.vo.ArdSyCarVo;
import com.ruoyi.system.mapper.SysDeptMapper;
@@ -98,6 +99,9 @@
    @Resource
    private SysDeptMapper sysDeptMapper;
    @Resource
    private ArdTankLockMapper ardTankLockMapper;
    @Value("${minio.endpoint}")
    private String minioEndpoint;
@@ -212,7 +216,16 @@
            }
        }
        MinioUtil.removeObjects("sycar", objectNames);
        return ardSyCarMapper.deleteArdSyCarByIds(ids);
        try{
            return ardSyCarMapper.deleteArdSyCarByIds(ids);
        }finally {
            List<String> carIds = new ArrayList();
            for(ArdSyCar ardSyCar : result){
                carIds.add(ardSyCar.getCarId());
            }
            ardTankLockMapper.deleteArdTankLockAndWallByCarIds(carIds);
        }
    }
    /**