From 567df1f80d71186c39b6c25e84667abf53dc49b6 Mon Sep 17 00:00:00 2001 From: zhouwentao <1577701412@qq.com> Date: Sun, 10 Sep 2023 12:27:05 +0800 Subject: [PATCH] updates --- .../java/com/example/zxweb/controller/IotController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/example/zxweb/controller/IotController.java b/src/main/java/com/example/zxweb/controller/IotController.java index 3050a13..1cf4327 100644 --- a/src/main/java/com/example/zxweb/controller/IotController.java +++ b/src/main/java/com/example/zxweb/controller/IotController.java @@ -155,6 +155,9 @@ public class IotController { if (code!=0) { return Result.error(code, StringUtils.isEmpty(message)?data:message); } - return Result.OK(StringUtils.isEmpty(message)?data:message); + if (StringUtils.isEmpty(message)) { + return Result.OK(jsonObject.getJSONObject("data")); + } + return Result.OK(message); } }