Browse Source

测试代码

luhg 7 years ago
parent
commit
1fbcd1539a
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/main/java/com/uas/eis/controller/TestController.java

+ 5 - 2
src/main/java/com/uas/eis/controller/TestController.java

@@ -32,11 +32,14 @@ public class TestController {
     BaseDao baseDao;
 
     @GetMapping(value = "/test/jdbc")
-    public void testJdbc(Integer id){
+    public String testJdbc(Integer id){
+        String res = "1";
         SqlRowSet rs = baseDao.getJdbcTemplate().queryForRowSet("select pi_inoutno from prodinout where rownum=1");
         if(rs.next()){
-            System.out.println(rs.getString("pi_inoutno"));
+            res = rs.getString("pi_inoutno");
+            System.out.println(res);
         }
+        return res;
     }
 
     @GetMapping(value = "/test/socket")