Преглед изворни кода

feature(属性添加重复提示): 属性添加重复提示

属性添加重复提示
mazq пре 4 година
родитељ
комит
dee39efd50

+ 4 - 3
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/sub/AttrController.java

@@ -13,6 +13,7 @@ import com.dragoninfo.dcuc.authweb.restcontroller.sub.vo.attr.AttrInfoTreeVo;
 import com.dragoninfo.dcuc.authweb.restcontroller.sub.vo.attr.AttrRelAcceptVo;
 import com.dragoninfo.dcuc.authweb.util.VersionUtils;
 import com.dragoninfo.duceap.core.response.Result;
+import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
 import com.dragonsoft.duceap.core.search.Searchable;
 import com.dragonsoft.duceap.core.search.filter.Condition;
 import io.swagger.annotations.Api;
@@ -50,11 +51,11 @@ public class AttrController {
         AttrInfoTreeDTO dto = JSON.parseObject(voStr, new TypeReference<AttrInfoTreeDTO>() {{
         }});
         BeanUtils.copyProperties(vo,dto);
-        Boolean b = attrFacade.attrSave(dto);
-        if (b) {
+        ResponseStatus response = attrFacade.attrSave(dto);
+        if (ResponseStatus.SUCCESS_CODE.equals(response.getStatusCode())) {
             return Result.success();
         } else {
-            return Result.fail();
+            return Result.fail(response.getMessage());
         }
     }