|
@@ -13,6 +13,7 @@ import com.boman.domain.GenTableColumn;
|
|
import com.boman.domain.constant.MysqlDataTypeConst;
|
|
import com.boman.domain.constant.MysqlDataTypeConst;
|
|
import com.boman.domain.exception.UnknownColumnException;
|
|
import com.boman.domain.exception.UnknownColumnException;
|
|
import com.boman.web.core.domain.TableContext;
|
|
import com.boman.web.core.domain.TableContext;
|
|
|
|
+import com.google.common.base.Joiner;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import org.apache.commons.collections4.MapUtils;
|
|
import org.apache.commons.collections4.MapUtils;
|
|
import org.apache.commons.lang3.math.NumberUtils;
|
|
import org.apache.commons.lang3.math.NumberUtils;
|
|
@@ -392,6 +393,18 @@ public class ColumnUtils {
|
|
return result.substring(0, result.length() - 2);
|
|
return result.substring(0, result.length() - 2);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 连接字符串数组集合
|
|
|
|
+ * eg: System.out.println(joinList(Lists.newArrayList(1, 3, 2, 5))); 输出 1, 3, 2, 5
|
|
|
|
+ *
|
|
|
|
+ * @param iterable 集合
|
|
|
|
+ * @return 连接结果
|
|
|
|
+ */
|
|
|
|
+ public static <T> String joinList1(Iterable<T> iterable) {
|
|
|
|
+ Joiner joiner = Joiner.on(", ").skipNulls();
|
|
|
|
+ return joiner.join(iterable);
|
|
|
|
+ }
|
|
|
|
+
|
|
public static String getColumnTypeByColumnName(List<GenTableColumn> columns, String columnName){
|
|
public static String getColumnTypeByColumnName(List<GenTableColumn> columns, String columnName){
|
|
String result = "";
|
|
String result = "";
|
|
for (GenTableColumn column : columns) {
|
|
for (GenTableColumn column : columns) {
|