This commit is contained in:
zhangheng 2024-06-19 18:09:17 +08:00
parent 2b1af1752c
commit da882d8475

View File

@ -239,11 +239,12 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
for (Node node : scriptVO.getNodes()) { for (Node node : scriptVO.getNodes()) {
node.setScriptInfoId(scriptVO.getScriptInfoId()); node.setScriptInfoId(scriptVO.getScriptInfoId());
String[] split = node.getLabel().split("\\n"); String[] split = node.getLabel().split("\\n");
int i1 = node.getLabel().indexOf("\n");
if (split.length > 0) { if (split.length > 0) {
node.setScriptNodeName(split[0]); node.setScriptNodeName(split[0]);
} }
if (split.length > 1) { if (split.length > 1) {
node.setScriptContent(split[1]); node.setScriptContent(node.getLabel().substring(i1 + 1));
} }
node.setScriptNodeType(node.getType()); node.setScriptNodeType(node.getType());
node.setCreateBy(SecurityUtils.getUsername()); node.setCreateBy(SecurityUtils.getUsername());