Browse Source

修改接口返回的时候 序列号的方式 否则会因为大小写的问题,导致部分字段没有获取到

王苗苗 1 month ago
parent
commit
e40fb0c31b

+ 15 - 9
.idea/workspace.xml

@@ -5,15 +5,12 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="494e7e12-0e43-41f1-b914-44d06666de04" name="Changes" comment="">
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/domain/TXinyiRobot.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/mapper/TXinyiRobotMapper.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/resources/mapper/TXinyiRobotMapper.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/controller/TestController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/controller/TestController.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.yml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application.yml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/com/robot/remote/smartrobotremote/controller/TestController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/robot/remote/smartrobotremote/controller/TestController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/controller/DataController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/robot/remote/smartrobotremote/controller/DataController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/target/classes/com/robot/remote/smartrobotremote/controller/DataController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/robot/remote/smartrobotremote/controller/DataController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/target/robot-sync-0.0.1-SNAPSHOT.jar" beforeDir="false" afterPath="$PROJECT_DIR$/target/robot-sync-0.0.1-SNAPSHOT.jar" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/target/robot-sync-0.0.1-SNAPSHOT.jar.original" beforeDir="false" afterPath="$PROJECT_DIR$/target/robot-sync-0.0.1-SNAPSHOT.jar.original" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -30,6 +27,9 @@
   <component name="Git.Settings">
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
   </component>
+  <component name="MavenRunner">
+    <option name="skipTests" value="true" />
+  </component>
   <component name="ProjectColorInfo">{
   &quot;associatedIndex&quot;: 6
 }</component>
@@ -41,11 +41,16 @@
   </component>
   <component name="PropertiesComponent"><![CDATA[{
   "keyToString": {
+    "Maven.robot-sync [clean].executor": "Run",
+    "Maven.robot-sync [package].executor": "Run",
+    "Maven.smart-robot-remote [clean].executor": "Run",
+    "Maven.smart-robot-remote [package].executor": "Run",
     "RequestMappingsPanelOrder0": "0",
     "RequestMappingsPanelOrder1": "1",
     "RequestMappingsPanelWidth0": "75",
     "RequestMappingsPanelWidth1": "75",
     "RunOnceActivity.ShowReadmeOnStart": "true",
+    "SHARE_PROJECT_CONFIGURATION_FILES": "true",
     "Spring Boot.SmartRobotRemoteApplication.executor": "Debug",
     "git-widget-placeholder": "master",
     "kotlin-language-version-configured": "true",
@@ -112,7 +117,8 @@
       <workItem from="1736944947909" duration="5000" />
       <workItem from="1736989247063" duration="600000" />
       <workItem from="1739515108280" duration="313000" />
-      <workItem from="1739517551016" duration="2305000" />
+      <workItem from="1739517551016" duration="5130000" />
+      <workItem from="1740362913385" duration="3202000" />
     </task>
     <servers />
   </component>

+ 7 - 0
pom.xml

@@ -52,6 +52,13 @@
             <version>2.2.0</version>
         </dependency>
 
+        <!-- 阿里JSON解析器 -->
+        <dependency>
+            <groupId>com.alibaba.fastjson2</groupId>
+            <artifactId>fastjson2</artifactId>
+            <version>2.0.41</version>
+        </dependency>
+
     </dependencies>
     <dependencyManagement>
         <dependencies>

+ 9 - 2
src/main/java/com/robot/remote/smartrobotremote/controller/DataController.java

@@ -1,6 +1,7 @@
 package com.robot.remote.smartrobotremote.controller;
 
 
+import com.alibaba.fastjson2.JSON;
 import com.robot.remote.smartrobotremote.domain.BizDevice;
 import com.robot.remote.smartrobotremote.domain.TXinyiRobot;
 import com.robot.remote.smartrobotremote.mapper.BizDeviceMapper;
@@ -17,6 +18,7 @@ import java.util.Map;
 
 @Slf4j
 @RestController
+//@Controller
 public class DataController {
 
 
@@ -63,8 +65,13 @@ public class DataController {
      *
      */
     @GetMapping("/selectTXinyiRobotListByTime")
-    public List<TXinyiRobot> selectTXinyiRobotListByTime(@RequestParam String lastTime) {
-        return this.tXinyiRobotMapper.selectTXinyiRobotListByTime(lastTime);
+    public String selectTXinyiRobotListByTime(@RequestParam String lastTime) {
+//        List<TXinyiRobot> tXinyiRobots = this.tXinyiRobotMapper.selectTXinyiRobotListByTime(lastTime);
+//        return tXinyiRobots;
+        String result = JSON.toJSONString(this.tXinyiRobotMapper.selectTXinyiRobotListByTime(lastTime));
+        log.info("返回的数据是{}", result);
+        return result;
+
     }
 
 }

BIN
target/classes/com/robot/remote/smartrobotremote/controller/DataController.class


File diff suppressed because it is too large
+ 40 - 42
target/robot-sync-0.0.1-SNAPSHOT.jar


BIN
target/robot-sync-0.0.1-SNAPSHOT.jar.original


Some files were not shown because too many files changed in this diff