fix: 增加cmdMap

dev
huangfeng 1 year ago
parent 4e81a4c5ec
commit bc69c14141

@ -1,6 +1,7 @@
package com.shxy.xymanager_common.entity;
import java.util.Date;
import java.util.HashMap;
public class MntnCmdHistory {
/**
@ -276,4 +277,14 @@ public class MntnCmdHistory {
public void setTerminal(Terminals terminal) {
this.terminal = terminal;
}
private HashMap<String, Object> cmdMap;
public HashMap<String, Object> getCmdMap() {
return cmdMap;
}
public void setCmdMap(HashMap<String, Object> cmdMap) {
this.cmdMap = cmdMap;
}
}

@ -1,6 +1,7 @@
package com.shxy.xymanager_common.entity;
import java.util.Date;
import java.util.HashMap;
public class MntnCmds {
/**
@ -210,4 +211,14 @@ public class MntnCmds {
public void setTerminal(Terminals terminal) {
this.terminal = terminal;
}
private HashMap<String, Object> cmdMap;
public HashMap<String, Object> getCmdMap() {
return cmdMap;
}
public void setCmdMap(HashMap<String, Object> cmdMap) {
this.cmdMap = cmdMap;
}
}

@ -101,14 +101,20 @@ public class CmdServiceImpl implements CmdService {
map.put(item.getTermId(), terminal);
}
item.setTerminal(terminal);
try {
if (StringUtils.isNotBlank(item.getCmd())) {
HashMap<String, Object> cmdMap = JSONUtil.json2Object(item.getCmd(), HashMap.class);
item.setCmdMap(cmdMap);
}
} catch (Exception ignore) {
}
}
}
@Override
public PageInfo<MntnCmdHistory> listHistory(String cmdid, String action,
Integer pageNum, Integer pageSize) {
MntnCmdHistoryExample example = new MntnCmdHistoryExample();
MntnCmdHistoryExample.Criteria criteria = example.createCriteria();
if (StringUtils.isNotBlank(cmdid)) {
@ -142,6 +148,14 @@ public class CmdServiceImpl implements CmdService {
map.put(item.getTermId(), terminal);
}
item.setTerminal(terminal);
try {
if (StringUtils.isNotBlank(item.getCmd())) {
HashMap<String, Object> cmdMap = JSONUtil.json2Object(item.getCmd(), HashMap.class);
item.setCmdMap(cmdMap);
}
} catch (Exception ignore) {
}
}
}

Loading…
Cancel
Save