|
|
@@ -52,7 +52,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
if (StringUtils.isNotEmpty(param.getId())) {
|
|
|
template = iotTemplateDao.findTopById(param.getId());
|
|
|
if (ObjectUtils.isEmpty(template)) {
|
|
|
- return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIT, param.getId()));
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, param.getId()));
|
|
|
}
|
|
|
IotTemplate temp = iotTemplateDao.findTopByName(param.getName());
|
|
|
if (ObjectUtils.isNotEmpty(temp) && !temp.getId().equals(param.getId())) {
|
|
|
@@ -73,7 +73,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
public ResultContent deleteTemplate(String id) {
|
|
|
IotTemplate template = iotTemplateDao.findTopById(id);
|
|
|
if (ObjectUtils.isEmpty(template)) {
|
|
|
- return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIT, id));
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, id));
|
|
|
}
|
|
|
iotTemplateDao.delete(template);
|
|
|
return ResultContent.buildSuccess();
|
|
|
@@ -82,7 +82,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
public ResultContent<IotTemplateModel> getIotTemplate(String id) {
|
|
|
IotTemplate template = iotTemplateDao.findTopById(id);
|
|
|
if (ObjectUtils.isEmpty(template)) {
|
|
|
- return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIT, id));
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, id));
|
|
|
}
|
|
|
return ResultContent.buildSuccess(toModel(template));
|
|
|
}
|
|
|
@@ -107,7 +107,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
if (StringUtils.isNotEmpty(param.getId())) {
|
|
|
entity = iotTopicDao.findTopById(param.getId());
|
|
|
if (ObjectUtils.isEmpty(entity)) {
|
|
|
- return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIT, param.getId()));
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, param.getId()));
|
|
|
}
|
|
|
IotTopic temp = iotTopicDao.findTopByTopicAndIotTemplate(param.getTopic(), iotTemplate);
|
|
|
if (ObjectUtils.isNotEmpty(temp) && !temp.getId().equals(param.getId())) {
|
|
|
@@ -129,7 +129,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
public ResultContent deleteIotTopic(String id) {
|
|
|
IotTopic entity = iotTopicDao.findTopById(id);
|
|
|
if (ObjectUtils.isEmpty(entity)) {
|
|
|
- return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIT, id));
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, id));
|
|
|
}
|
|
|
iotTopicDao.delete(entity);
|
|
|
return ResultContent.buildSuccess();
|
|
|
@@ -138,7 +138,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
public ResultContent<IotTopicModel> getIotTopic(String id) {
|
|
|
IotTopic entity = iotTopicDao.findTopById(id);
|
|
|
if (ObjectUtils.isEmpty(entity)) {
|
|
|
- return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIT, id));
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, id));
|
|
|
}
|
|
|
return ResultContent.buildSuccess(toModel(entity));
|
|
|
}
|
|
|
@@ -163,7 +163,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
if (StringUtils.isNotEmpty(param.getId())) {
|
|
|
entity = iotMainDao.findTopById(param.getId());
|
|
|
if (ObjectUtils.isEmpty(entity)) {
|
|
|
- return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIT, param.getId()));
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, param.getId()));
|
|
|
}
|
|
|
IotTopic temp = iotTopicDao.findTopByTopicAndIotTemplate(param.getName(), iotTemplate);
|
|
|
if (ObjectUtils.isNotEmpty(temp) && !temp.getId().equals(param.getId())) {
|
|
|
@@ -185,7 +185,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
public ResultContent deleteIotMain(String id) {
|
|
|
IotMain entity = iotMainDao.findTopById(id);
|
|
|
if (ObjectUtils.isEmpty(entity)) {
|
|
|
- return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIT, id));
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, id));
|
|
|
}
|
|
|
iotMainDao.delete(entity);
|
|
|
return ResultContent.buildSuccess();
|
|
|
@@ -194,7 +194,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
public ResultContent<IotMainModel> getIotMain(String id) {
|
|
|
IotMain entity = iotMainDao.findTopById(id);
|
|
|
if (ObjectUtils.isEmpty(entity)) {
|
|
|
- return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIT, id));
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, id));
|
|
|
}
|
|
|
return ResultContent.buildSuccess(toModel(entity));
|
|
|
}
|