fix
This commit is contained in:
parent
f154af5352
commit
dc349561bf
@ -188,7 +188,7 @@ public class DeviceServiceImpl implements DeviceService {
|
|||||||
ParamConf tmkInit = paramConfMapper.selectByKey("tmk_init");
|
ParamConf tmkInit = paramConfMapper.selectByKey("tmk_init");
|
||||||
if (tmkInit != null && "true".equals(tmkInit.getValue())) {
|
if (tmkInit != null && "true".equals(tmkInit.getValue())) {
|
||||||
status.setHasDevice(true);
|
status.setHasDevice(true);
|
||||||
status.setTmkInit(false);
|
status.setTmkInit(true);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
status.setTmkInit(false);
|
status.setTmkInit(false);
|
||||||
@ -260,11 +260,16 @@ public class DeviceServiceImpl implements DeviceService {
|
|||||||
// sdfApi.closeSession(sh);
|
// sdfApi.closeSession(sh);
|
||||||
// sdfApi.closeDevice(dh);
|
// sdfApi.closeDevice(dh);
|
||||||
|
|
||||||
ParamConf conf = new ParamConf();
|
if (tmkInit == null) {
|
||||||
conf.setKey("tmk_init");
|
tmkInit = new ParamConf();
|
||||||
conf.setValue("true");
|
tmkInit.setValue("true");
|
||||||
conf.setCreatTime(LocalDateTime.now());
|
tmkInit.setKey("tmk_init");
|
||||||
paramConfMapper.insert(conf);
|
tmkInit.setCreatTime(LocalDateTime.now());
|
||||||
|
paramConfMapper.insert(tmkInit);
|
||||||
|
} else {
|
||||||
|
tmkInit.setValue("true");
|
||||||
|
paramConfMapper.updateById(tmkInit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkName(String name) {
|
private void checkName(String name) {
|
||||||
|
Loading…
Reference in New Issue
Block a user