From 84ee37e1f485a1d3136535f9ef1c43058d9308ab Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 29 十一月 2023 11:39:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/mapper/DllMapper.java | 33 ++++++++++++++++++++++++---------
1 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/mapper/DllMapper.java b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/mapper/DllMapper.java
index d7664a2..ce77cee 100644
--- a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/mapper/DllMapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/mapper/DllMapper.java
@@ -1,6 +1,11 @@
package com.vci.ubcs.ddl.mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.ResultType;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+
/**
* Description:
*
@@ -9,21 +14,31 @@
*/
public interface DllMapper {
- int createViewBySql(String viewCreateSql);
+ @Update({"${viewCreateSql}"})
+ int createViewBySql(@Param("viewCreateSql") String viewCreateSql);
- int createTableBySql(String tableName,String attributeSql);
+ @Update({"create table ${tableName} ( ${attributeSql} )"})
+ int createTableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql);
- int checkTableExist(String tableName);
+ @Update({"COMMENT ON TABLE ${tableName} IS '${comment}' "})
+ int commentTable(@Param("tableName") String tableName, @Param("comment") String comment);
- int countAll(String tableName);
+ @Update({"COMMENT ON column ${tableName}.${columnName} IS '${comment}' "})
+ int commentColumnTable(@Param("tableName") String tableName, @Param("columnName") String columnName, @Param("comment") String comment);
- int commentTable(String tableName, String comment);
+ @Update({"alter table ${tableName} modify ( ${attributeSql} ) "})
+ int modifyTableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql);
- int commentColumnTable(String tableName, String columnName, String comment);
+ @Update({"alter table ${tableName} add ( ${attributeSql} )"})
+ int addColumn2TableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql);
- int modifyTableBySql(String tableName, String attributeSql);
+ @Update({"drop table if exists ${tableName}"})
+ int dropTable(@Param("tableName") String tableName);
- int addColumn2TableBySql(String tableName, String attributeSql);
+ @Select({"select count(table_name) from user_tables where upper(table_name) = upper(#{tableName,jdbcType=VARCHAR})"})
+ int checkTableExist(@Param("tableName") String tableName);
- int dropTable(String tableName);
+ @Select({"select count(*) from ${tableName}"})
+ @ResultType(Integer.class)
+ int countAll(@Param("tableName") String tableName);
}
--
Gitblit v1.9.3