|
@@ -46,6 +46,7 @@ public class GroupController {
|
|
|
@PostMapping("save.do")
|
|
|
public ServerResponse save(Group group) {
|
|
|
try {
|
|
|
+ group.setItemId(1);
|
|
|
groupService.save(group);
|
|
|
} catch (Exception e) {
|
|
|
return ServerResponse.warning("设备组编号重复!");
|
|
@@ -58,7 +59,12 @@ public class GroupController {
|
|
|
*/
|
|
|
@PostMapping("update.do")
|
|
|
public ServerResponse update(Group group) {
|
|
|
- return ServerResponse.success(groupService.updateById(group));
|
|
|
+ try {
|
|
|
+ groupService.updateById(group);
|
|
|
+ } catch (Exception e) {
|
|
|
+ return ServerResponse.warning("设备组编号重复!");
|
|
|
+ }
|
|
|
+ return ServerResponse.success();
|
|
|
}
|
|
|
|
|
|
}
|