Browse Source

获取学员报Invalid column type: 1111 问题处理

小么熊🐻 2 years ago
parent
commit
0b183822e8

+ 34 - 23
jsjp-admin/src/test/java/com/miaxis/test/Test4.java

@@ -3,8 +3,10 @@ package com.miaxis.test;
 import com.miaxis.JsjpApplication;
 import com.miaxis.newgzpt.domain.GzptSchActivation;
 import com.miaxis.newgzpt.domain.GzptSchPayLog;
+import com.miaxis.newgzpt.domain.GzptUserInfo;
 import com.miaxis.newgzpt.service.IGzptSchActivationService;
 import com.miaxis.newgzpt.service.IGzptSchPayLogService;
+import com.miaxis.newgzpt.service.IGzptUserInfoService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -24,31 +26,40 @@ public class Test4 {
     @Autowired
     private IGzptSchPayLogService schPayLogService;
 
+    @Autowired
+    private IGzptUserInfoService userInfoService;
+
+
     @Test
     public void test() throws Exception {
-        GzptSchActivation schActivation = new GzptSchActivation();
-        schActivation.setDqbh("9999");
-        schActivation.setDqmc("天堂");
-        schActivation.setJxbh("99999");
-        schActivation.setJxmc("天堂驾校");
-        schActivation.setUserId(996098008l);
-        schActivation.setStuId(996098008l);
-        schActivation.setCrtime(new Date());
-        schActivation.setSync(0);
-        schActivation.setSynctime(null);
-        schActivation.setIsDel(0);
-        schActivationService.saveSchActivation(schActivation);
-
-        GzptSchPayLog schPayLog = new GzptSchPayLog();
-        schPayLog.setStuId(996098008l);
-        schPayLog.setDqbh("9999");
-        schPayLog.setPrice(999);
-        schPayLog.setJxbh("99999");
-        schPayLog.setCrtime(new Date());
-        schPayLog.setState(1); // 1充值  2退款
-        schPayLog.setGoodsName("天堂美女");
-        schPayLog.setOutTradeNo("69696969696");
-        schPayLogService.saveSchPayLog(schPayLog);
+//        GzptSchActivation schActivation = new GzptSchActivation();
+//        schActivation.setDqbh("9999");
+//        schActivation.setDqmc("天堂");
+//        schActivation.setJxbh("99999");
+//        schActivation.setJxmc("天堂驾校");
+//        schActivation.setUserId(996098008l);
+//        schActivation.setStuId(996098008l);
+//        schActivation.setCrtime(new Date());
+//        schActivation.setSync(0);
+//        schActivation.setSynctime(null);
+//        schActivation.setIsDel(0);
+//        schActivationService.saveSchActivation(schActivation);
+//
+//        GzptSchPayLog schPayLog = new GzptSchPayLog();
+//        schPayLog.setStuId(996098008l);
+//        schPayLog.setDqbh("9999");
+//        schPayLog.setPrice(999);
+//        schPayLog.setJxbh("99999");
+//        schPayLog.setCrtime(new Date());
+//        schPayLog.setState(1); // 1充值  2退款
+//        schPayLog.setGoodsName("天堂美女");
+//        schPayLog.setOutTradeNo("69696969696");
+//        schPayLogService.saveSchPayLog(schPayLog);
+
+
+        GzptUserInfo userInfo = userInfoService.getInfoById(1l);
+        System.out.println(userInfo);
+
 
     }
 

+ 1 - 1
jsjp-service/src/main/resources/mapper/newgzpt/GzptUserInfoMapper.xml

@@ -16,7 +16,7 @@
 
 
     <select id="getInfoById"  resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
-        select * from GZPT_USER_INFO where id =#{id}
+        select * from GZPT_USER_INFO where id =#{id,jdbcType=NUMERIC}
     </select>