【fix sonar】CodeGenerateOneToMany文件
This commit is contained in:
+14
-10
@@ -91,6 +91,20 @@ public class CodeGenerateOneToMany extends BaseCodeGenerate implements IGenerate
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setSubTableVo();
|
||||||
|
// put从表集合
|
||||||
|
hashMap.put("subTables", this.subTables);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
|
long serialVersionUID = NonceUtils.getSecureRandomLong() + NonceUtils.getCurrentTimeMillis();
|
||||||
|
hashMap.put("serialVersionUID", String.valueOf(serialVersionUID));
|
||||||
|
log.info("code template data: " + hashMap.toString());
|
||||||
|
return hashMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setSubTableVo() throws Exception {
|
||||||
for (SubTableVo subTableVo : this.subTables) {
|
for (SubTableVo subTableVo : this.subTables) {
|
||||||
// 从表(局部变量)
|
// 从表(局部变量)
|
||||||
List<ColumnVo> originalColumns;
|
List<ColumnVo> originalColumns;
|
||||||
@@ -118,16 +132,6 @@ public class CodeGenerateOneToMany extends BaseCodeGenerate implements IGenerate
|
|||||||
subTableVo.setForeignKeys(list.toArray(new String[0]));
|
subTableVo.setForeignKeys(list.toArray(new String[0]));
|
||||||
subTableVo.setOriginalForeignKeys(foreignKeys);
|
subTableVo.setOriginalForeignKeys(foreignKeys);
|
||||||
}
|
}
|
||||||
// put从表集合
|
|
||||||
hashMap.put("subTables", this.subTables);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
|
|
||||||
long serialVersionUID = NonceUtils.getSecureRandomLong() + NonceUtils.getCurrentTimeMillis();
|
|
||||||
hashMap.put("serialVersionUID", String.valueOf(serialVersionUID));
|
|
||||||
log.info("code template data: " + hashMap.toString());
|
|
||||||
return hashMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user