浏览代码

增加保存时,返回id

xiewenjie 3 年之前
父节点
当前提交
b81953def4
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/SceneLightStyleController.java

+ 5 - 3
sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/SceneLightStyleController.java

@@ -68,9 +68,11 @@ public class SceneLightStyleController extends BaseController {
             sceneLightStyleService.updateById(entity);
             sceneLightStyleService.updateById(entity);
             return Result.success();
             return Result.success();
         }
         }
-
-        sceneLightStyleService.save(entity);
-        return Result.success();
+        boolean save = sceneLightStyleService.save(entity);
+        if (save) {
+            return Result.success("保存成功", entity.getId());
+        }
+        return failure(4001, "保存失败");
     }
     }
 
 
     /**
     /**