Commit 41dc65d0 by wqc

组件调整、通用接口修改

parent 7d2fadcb
......@@ -238,7 +238,8 @@ public class SqlUtils {
public static String jointInsertSql(String tableName, Set<String> cloums){
StringBuilder fileds = new StringBuilder();
for (String cloum : cloums) {
fileds.append(cloum.replaceAll("\\p{Punct}", "")).append(",");
// fileds.append(cloum.replaceAll("\\p{Punct}", "")).append(",");
fileds.append(cloum).append(",");
}
fileds.deleteCharAt(fileds.length()-1);
StringBuilder sql = new StringBuilder("INSERT INTO ").append(tableName).append("(").append(fileds).append(") VALUES (");
......@@ -256,9 +257,10 @@ public class SqlUtils {
public static String joinCreateTableSql(String tableName, Set<String> cloums){
StringBuilder sql = new StringBuilder("CREATE TABLE ").append(tableName).append("(");
for (String cloum : cloums) {
sql.append(cloum.replaceAll("\\p{Punct}", "")).append(" VARCHAR(255),");
// sql.append(cloum.replaceAll("\\p{Punct}", "")).append(" VARCHAR(255),");
sql.append(cloum).append(" VARCHAR(255),");
}
sql.deleteCharAt(sql.length()-1).append(")");
return sql.toString();
}
}
\ No newline at end of file
}
......@@ -41,7 +41,7 @@
meta_data_mapping t
LEFT JOIN meta_data m ON t.metadata_id = m.id
LEFT JOIN meta_data_category y ON m.category_id = y.id
WHERE y.id=#{id}
WHERE t.table_sqlname=#{tableName} OR y.id=#{id}
</select>
<select id="getMetaByTable" resultType="com.zq.dataoperation.vo.MetaDataReq">
SELECT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment