fix:1.补路径分隔符 2.SQL语句分号

This commit is contained in:
nieziyan 2023-11-03 19:34:56 +08:00
parent 45811d00e0
commit dfb536fbbb
2 changed files with 7 additions and 10 deletions

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.system.mapper.GardsSampleDataMapper">
<delete id="delTables">
<foreach collection="tableNames" item="tableName" index="index">
DELETE FROM ${tableName} WHERE SAMPLE_ID = #{sampleId}
<foreach collection = "tableNames" item = "tableName" index = "index">
DELETE FROM ${tableName} WHERE SAMPLE_ID = #{sampleId};
</foreach>
</delete>

View File

@ -91,8 +91,8 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
public Result<?> deleteById(Integer sampleId, boolean sampleData,
boolean rnAuto, boolean rnMan) {
String ftpRootPath = ftpUtil.getFtpRootPath();
String savePath = ftpRootPath + pathProperties.getSaveFilePath();
String logPath = ftpRootPath + pathProperties.getLogPath();
String savePath = ftpRootPath + pathProperties.getSaveFilePath() + StrUtil.SLASH;
String logPath = ftpRootPath + pathProperties.getLogPath() + StrUtil.SLASH;
/* 删除数据库数据 */
// 过滤掉多余的表
String ORIGINAL = "ORIGINAL";String RNAUTO = "RNAUTO";String RNMAN = "RNMAN";
@ -169,8 +169,7 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
.orElse(new GardsSampleDataSystem());
}
private String samplePath(String savePath,
Integer sampleId){
private String samplePath(String savePath, Integer sampleId){
GardsSampleDataSystem sampleData = getOne(sampleId);
String inputFileName = sampleData.getInputFileName();
if (StrUtil.isBlank(inputFileName))
@ -178,10 +177,8 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
return savePath + inputFileName;
}
private List<String> manOrAutoPath(String savePath,
String logPath,
Integer sampleId,
String owner){
private List<String> manOrAutoPath(String savePath, String logPath,
Integer sampleId, String owner){
List<String> fileList = new ArrayList<>();
GardsAnalyses analysisMan = baseMapper.getAnalysis(sampleId, owner);
if (ObjectUtil.isNull(analysisMan))