|
@@ -1,5 +1,7 @@
|
1
|
1
|
package com.example.springbootdemo.controller;
|
2
|
2
|
|
|
3
|
+import com.example.springbootdemo.entity.FootScanEntity;
|
|
4
|
+import com.example.springbootdemo.service.FootScanService;
|
3
|
5
|
import com.example.springbootdemo.zxyTeST.sql.dao.ArmGrabRepository;
|
4
|
6
|
import com.example.springbootdemo.zxyTeST.sql.dao.ColorRepository;
|
5
|
7
|
import com.example.springbootdemo.zxyTeST.sql.entity.ArmGrabEntity;
|
|
@@ -8,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
8
|
10
|
import org.springframework.dao.EmptyResultDataAccessException;
|
9
|
11
|
import org.springframework.jdbc.core.JdbcTemplate;
|
10
|
12
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
13
|
+import org.springframework.web.bind.annotation.RequestParam;
|
11
|
14
|
import org.springframework.web.bind.annotation.RestController;
|
12
|
15
|
|
13
|
16
|
import java.util.List;
|
|
@@ -20,6 +23,8 @@ public class HelloController {
|
20
|
23
|
ArmGrabRepository armGrabRepository;
|
21
|
24
|
@Autowired
|
22
|
25
|
JdbcTemplate jdbcTemplate;
|
|
26
|
+ @Autowired
|
|
27
|
+ FootScanService footScanService;
|
23
|
28
|
@RequestMapping("/hello")
|
24
|
29
|
public void hello() {
|
25
|
30
|
List<Color> listColors = colorRepository.findByColorId(2314);
|
|
@@ -42,6 +47,10 @@ public class HelloController {
|
42
|
47
|
return "hha我snull";
|
43
|
48
|
}
|
44
|
49
|
|
|
50
|
+ }
|
|
51
|
+ @RequestMapping("mybatis")
|
|
52
|
+ public List<FootScanEntity> getById(@RequestParam("foot_scan_id") Long foot_scan_id) {
|
|
53
|
+ return footScanService.getFootScanById(foot_scan_id);
|
45
|
54
|
|
46
|
55
|
}
|
47
|
56
|
|