Explorar el Código

修改添加记录的bug 无法显示用户ID

wzh hace 2 años
padre
commit
4ded2ac18f

+ 2 - 1
ruoyi-iot/src/main/java/com/ruoyi/iot/controller/TDevicePlanController.java

@@ -54,7 +54,8 @@ public class TDevicePlanController extends BaseController {
         String createTime = String.valueOf(LocalDateTime.now());
         long planType = realData.getLongValue("planType");
         long status = realData.getLongValue("status");
-        long userId = realData.getLongValue("userId");
+        LoginUser loginUser = getLoginUser();
+        Long userId = loginUser.getUserId();
         String runTime = realData.getString("runTime");
         String ccid = realData.getString("ccid");
         LocalDateTime parsedRunTime = null; // 初始化为null