From d2570148ec3884de3af721bd99c4b7acbbdee075 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 09 五月 2023 17:07:26 +0800
Subject: [PATCH] 前端代码提交

---
 Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/ddl/DdlMapperProcessor.java |  157 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 157 insertions(+), 0 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/ddl/DdlMapperProcessor.java b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/ddl/DdlMapperProcessor.java
new file mode 100644
index 0000000..94a78d2
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/processor/ddl/DdlMapperProcessor.java
@@ -0,0 +1,157 @@
+package com.vci.ubcs.ddl.processor.ddl;
+
+import com.vci.ubcs.ddl.bo.DdlTableBO;
+import com.vci.ubcs.ddl.bo.DdlTableInDataBaseBO;
+import com.vci.ubcs.ddl.mapper.DdlMapper;
+import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum;
+
+import java.util.List;
+
+/**
+ * Description:
+ *
+ * @author LiHang
+ * @date 2023/4/24
+ */
+public abstract class DdlMapperProcessor implements DdlBehavior{
+
+	public DdlMapperProcessor(DdlMapper mapper) {
+		this.mapper = mapper;
+	}
+
+	private final DdlMapper mapper;
+
+	abstract boolean support(String url);
+
+	/**
+	 * 缁熻琛ㄦ牸涓湁澶氬皯鏁版嵁
+	 * @param tableName 琛ㄦ牸鍚嶇О
+	 * @return 鏁版嵁鐨勬�绘暟
+	 */
+	public int countAll(String tableName){
+		return mapper.countAll(tableName);
+	}
+
+	/**
+	 * 鏍规嵁SQL璇彞鍒涘缓瑙嗗浘
+	 * @param viewCreateSql
+	 * @return 褰卞搷琛屾暟
+	 */
+	public int createViewBySql( String viewCreateSql){
+		return mapper.createViewBySql(viewCreateSql);
+	}
+
+	/**
+	 * 鏍规嵁sql璇彞鎻掑叆鏁版嵁
+	 * @param insertSql 瑕佹墽琛岀殑sql璇彞
+	 * @return 褰卞搷鐨勮鏁�
+	 */
+	public int insertBySql(String insertSql){
+		return mapper.insertBySql(insertSql);
+	}
+
+	/**
+	 * 鍒涘缓鏁版嵁搴撹〃
+	 * @param tableName 琛ㄦ牸鐨勫悕绉�
+	 * @param attributeSql 灞炴�х殑sql
+	 * @return 褰卞搷鐨勮鏁�
+	 */
+	public int createTableBySql(String tableName, String attributeSql){
+		return mapper.createTableBySql(tableName,attributeSql);
+	}
+
+	/**
+	 * 涓鸿〃鏍兼坊鍔犳敞閲婂唴瀹�
+	 * @param tableName 琛ㄦ牸鐨勫悕绉�
+	 * @param comment 娉ㄩ噴鐨勫唴瀹�
+	 * @return 鍙楀奖鍝嶇殑琛屾暟
+	 */
+	public int commentTable(String tableName,  String comment){
+		return mapper.commentTable(tableName,comment);
+	}
+
+	/**
+	 * 涓鸿〃鏍肩殑鍒楁坊鍔犳敞閲婂唴瀹�
+	 * @param tableName 琛ㄦ牸鐨勫悕绉�
+	 * @param columnName 鍒�
+	 * @param comment 娉ㄩ噴鐨勫唴瀹�
+	 * @return 鍙楀奖鍝嶇殑琛屾暟
+	 */
+	public int commentColumnTable(String tableName,String columnName,  String comment){
+		return mapper.commentColumnTable(tableName,columnName,comment);
+	}
+
+	/**
+	 * 鏍¢獙鏁版嵁搴撹〃鎴栬�呰鍥炬槸鍚﹀瓨鍦�
+	 * @param tableName 琛ㄦ牸鐨勫悕绉帮紝涓嶅尯鍒嗗ぇ灏忓啓
+	 * @return 瀛樺湪鐨勪釜鏁�
+	 */
+	public int checkTableExist( String tableName){
+		return mapper.checkTableExist(tableName);
+	}
+
+	/**
+	 * 鏌ヨ琛ㄦ牸鐨勫瓧娈典俊鎭�
+	 * @param tableName 琛ㄦ牸鐨勫悕绉�
+	 * @return 鏁版嵁搴撹〃鐨勫瓧娈典俊鎭�
+	 */
+	public List<DdlTableInDataBaseBO> selectTableColumnInfo( String tableName){
+		return mapper.selectTableColumnInfo(tableName);
+	}
+
+	/**
+	 * 鑾峰彇鎵�鏈夌殑琛ㄦ牸鍚嶇О
+	 * @return 琛ㄦ牸鍚嶇О
+	 */
+	public List<String> selectAllTableName(){
+		return mapper.selectAllTableName();
+	}
+
+	/**
+	 * 鏌ヨ琛ㄦ牸鐨勪腑鏂囧悕绉�
+	 * @param tableName 琛ㄦ牸鍚嶇О
+	 * @return 琛ㄦ牸鍚嶇О鍜岃〃鏍间腑鏂囧悕绉�
+	 */
+	public DdlTableBO selectTableComment(String tableName){
+		return mapper.selectTableComment(tableName);
+	}
+
+	/**
+	 * 鍚戞暟鎹簱琛ㄤ腑娣诲姞鍗曚釜瀛楁
+	 * @param tableName 琛ㄦ牸鐨勫悕绉�
+	 * @param attributeSql 瑕佹坊鍔犵殑鏂扮殑sql
+	 * @return 褰卞搷鐨勮鏁�
+	 */
+	public int addColumn2TableBySql(String tableName, String attributeSql){
+		return mapper.addColumn2TableBySql(tableName,attributeSql);
+	}
+
+	/**
+	 * 鍗曚釜淇敼鏁版嵁琛ㄧ殑瀛楁
+	 * @param tableName 琛ㄦ牸鐨勫悕绉�
+	 * @param attributeSql 灞炴�ф柊鐨剆ql
+	 * @return 褰卞搷鐨勮鏁�
+	 */
+	public int modifyTableBySql( String tableName, String attributeSql){
+		return mapper.modifyTableBySql(tableName,attributeSql);
+	}
+
+	/**
+	 * 鍒犻櫎琛ㄦ牸
+	 * @param tableName 琛ㄦ牸鍚嶇О
+	 * @return 褰卞搷鐨勮鏁�
+	 */
+	public int dropTable( String tableName){
+		return mapper.dropTable(tableName);
+	}
+
+	/**
+	 * 鍒犻櫎琛ㄦ牸涓殑鍒�
+	 * @param tableName 琛ㄥ悕绉�
+	 * @param columnName 鍒楀悕绉�
+	 * @return 鍙楀奖鍝嶇殑琛屾暟
+	 */
+	public int dropTableColumn(String tableName,String columnName){
+		return mapper.dropTableColumn(tableName,columnName);
+	}
+}

--
Gitblit v1.9.3