|
@@ -201,9 +201,12 @@ public class IotedgeCollectDataController extends JeecgController<IotedgeCollect
|
|
|
public Result<String> addGroup(@RequestBody InterlockBaseVo interlockBaseVo, HttpServletRequest request) {
|
|
|
String code = iotedgeCollectDataService.addGroup(interlockBaseVo, request);
|
|
|
if ("200".equals(code)){
|
|
|
- return Result.OK(code);
|
|
|
+ return Result.OK("添加成功!");
|
|
|
}
|
|
|
- return Result.error(code);
|
|
|
+ if ("500".equals(code)){
|
|
|
+ return Result.error("IoTedge中该组织已经存在!");
|
|
|
+ }
|
|
|
+ return Result.error("添加失败!");
|
|
|
}
|
|
|
|
|
|
|
|
@@ -215,9 +218,12 @@ public class IotedgeCollectDataController extends JeecgController<IotedgeCollect
|
|
|
|
|
|
String code = iotedgeCollectDataService.deleteGroup(id,request);
|
|
|
if ("200".equals(code)){
|
|
|
- return Result.OK(code);
|
|
|
+ return Result.OK("删除成功");
|
|
|
+ }
|
|
|
+ if ("400".equals(code)){
|
|
|
+ return Result.error("IoTedge中该组织已被使用,IoTedge删除组织失败!请到IoTedge系统中进行处理");
|
|
|
}
|
|
|
- return Result.error(code);
|
|
|
+ return Result.error("删除失败");
|
|
|
}
|
|
|
|
|
|
@AutoLog(value = "IoTEdge-修改组织")
|
|
@@ -228,9 +234,9 @@ public class IotedgeCollectDataController extends JeecgController<IotedgeCollect
|
|
|
String code = iotedgeCollectDataService.updateGroup(interlockBaseVo,request);
|
|
|
|
|
|
if ("200".equals(code)){
|
|
|
- return Result.OK(code);
|
|
|
+ return Result.OK("修改成功!");
|
|
|
}
|
|
|
- return Result.error(code);
|
|
|
+ return Result.error("修改失败!");
|
|
|
//return restClientService.updateGroup(groupName,groupId);
|
|
|
}
|
|
|
|