Browse Source

通过胎号获取轮胎信息

纪新园 1 tháng trước cách đây
mục cha
commit
1c08b44d64

+ 8 - 3
src/main/java/com/gubersail/u9data/controller/B2bController.java

@@ -1,10 +1,9 @@
 package com.gubersail.u9data.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.gubersail.u9data.dto.TeHbbTob;
 import com.gubersail.u9data.service.TeHbbTobService;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -27,5 +26,11 @@ public class B2bController {
         return teHbbTobService.getAll();
     }
 
+    @GetMapping("getMaterialDetail")
+    public TeHbbTob getMaterialDetail(@RequestParam("tireNumber") String tireNumber) {
+        return teHbbTobService.getOne(new LambdaQueryWrapper<TeHbbTob>()
+                .eq(TeHbbTob::getBarCode, tireNumber));
+    }
+
 
 }

+ 1 - 1
src/main/resources/application.yml

@@ -1,5 +1,5 @@
 server:
-  port: 10010
+  port: 11010
   servlet:
     context-path: /
     session: