From d2108ee735894d73bf655bda1651ecaefbc4c09d Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Sat, 23 Mar 2024 09:35:02 +0800
Subject: [PATCH] 图斑

---
 src/main/java/com/dji/sample/map/service/impl/WorkspaceElementServiceImpl.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/dji/sample/map/service/impl/WorkspaceElementServiceImpl.java b/src/main/java/com/dji/sample/map/service/impl/WorkspaceElementServiceImpl.java
index 49b5805..4662614 100644
--- a/src/main/java/com/dji/sample/map/service/impl/WorkspaceElementServiceImpl.java
+++ b/src/main/java/com/dji/sample/map/service/impl/WorkspaceElementServiceImpl.java
@@ -47,7 +47,7 @@
     public ResponseResult saveElement(String groupId, ElementCreateDTO elementCreate) {
         boolean saveElement = groupElementService.saveElement(groupId, elementCreate);
         if (!saveElement) {
-            return ResponseResult.error("Failed to save the element.");
+            return ResponseResult.error("保存元素失败");
         }
 
         // save coordinate
@@ -55,7 +55,7 @@
                         elementCreate.getResource().getContent().getGeometry().convertToList(), elementCreate.getId());
 
         return saveCoordinate ?
-                ResponseResult.success() : ResponseResult.error("Failed to save the coordinate.");
+                ResponseResult.success() : ResponseResult.error("保存坐标失败");
     }
 
 
@@ -63,7 +63,7 @@
     public ResponseResult updateElement(String elementId, ElementUpdateDTO elementUpdate, String username) {
         boolean updElement = groupElementService.updateElement(elementId, elementUpdate, username);
         if (!updElement) {
-            return ResponseResult.error("Failed to update the element.");
+            return ResponseResult.error("更新元素失败");
         }
 
         // delete all coordinates according to element id.
@@ -73,21 +73,21 @@
                 elementUpdate.getContent().getGeometry().convertToList(), elementId);
 
         return delCoordinate && saveCoordinate ?
-                ResponseResult.success() : ResponseResult.error("Failed to update the coordinate.");
+                ResponseResult.success() : ResponseResult.error("更新坐标失败");
     }
 
     @Override
     public ResponseResult deleteElement(String elementId) {
         boolean delElement = groupElementService.deleteElement(elementId);
         if (!delElement) {
-            return ResponseResult.error("Failed to delete the element.");
+            return ResponseResult.error("删除元素失败");
         }
 
         // delete all coordinates according to element id.
         boolean delCoordinate = elementCoordinateService.deleteCoordinateByElementId(elementId);
 
         return delCoordinate ?
-                ResponseResult.success() : ResponseResult.error("Failed to delete the coordinate.");
+                ResponseResult.success() : ResponseResult.error("删除坐标失败");
     }
 
     @Override

--
Gitblit v1.9.3