chenw 7 年 前
コミット
f36a85c169

+ 9 - 9
bi-server/src/main/java/com/usoftchina/bi/server/dao/dataSource/DataConnectorMapper.java

@@ -179,15 +179,15 @@ public interface DataConnectorMapper {
      */
     @Update("<script>"+
             "UPDATE BI_DATABASES set "  +
-            "BASES_NAME = #{name}" +
-            "<if test=\"addrass != null\"> , ADDRASS = #{addrass} </if>" +
-            "<if test=\"port != null\"> , PORT = #{port} </if>" +
-            "<if test=\"databaseType != null\"> , DATABASE_TYPE = #{databaseType} </if>" +
-            "<if test=\"dataName != null\"> , DATA_NAME = #{dataName} </if>" +
-            "<if test=\"userName != null\"> , USER_NAME = #{userName} </if>" +
-            "<if test=\"passWord != null\"> , PASS_WORD = #{passWord} </if>" +
-            "<if test=\"note != null\"> , NOTE = #{note} </if>" +
-            "where id = #{id}" +
+            "<if test=\"name != null\">BASES_NAME = #{name, jdbcType=VARCHAR},</if>" +
+            "<if test=\"addrass != null\"> ADDRASS = #{addrass, jdbcType=VARCHAR}, </if>" +
+            "<if test=\"port != null\"> PORT = #{port, jdbcType=INTEGER}, </if>" +
+            "<if test=\"databaseType != null\"> DATABASE_TYPE = #{databaseType, jdbcType=VARCHAR}, </if>" +
+            "<if test=\"dataName != null\"> DATA_NAME = #{dataName, jdbcType=VARCHAR}, </if>" +
+            "<if test=\"userName != null\"> USER_NAME = #{userName, jdbcType=VARCHAR}, </if>" +
+            "<if test=\"passWord != null\"> PASS_WORD = #{passWord, jdbcType=VARCHAR}, </if>" +
+            "<if test=\"note != null\"> NOTE = #{note, jdbcType=VARCHAR}, </if>" +
+            "where id = #{id, jdbcType=INTEGER}" +
             "</script>")
     void updatabases(Databases databases);