mirror of https://gitee.com/y_project/RuoYi.git
代码生成选择主子表关联元素必填
parent
033017c0ab
commit
bf6ec64f15
|
@ -59,7 +59,7 @@ public class GenUtils
|
|||
{
|
||||
column.setHtmlType(GenConstants.HTML_INPUT);
|
||||
|
||||
// 如果是浮点型
|
||||
// 如果是浮点型 统一用BigDecimal
|
||||
String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ",");
|
||||
if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0)
|
||||
{
|
||||
|
@ -250,20 +250,4 @@ public class GenUtils
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取空数组列表
|
||||
*
|
||||
* @param length 长度
|
||||
* @return 数组信息
|
||||
*/
|
||||
public static String[] emptyList(int length)
|
||||
{
|
||||
String[] values = new String[length];
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
values[i] = StringUtils.EMPTY;
|
||||
}
|
||||
return values;
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ import com.ruoyi.common.constant.Constants;
|
|||
/**
|
||||
* VelocityEngine工厂
|
||||
*
|
||||
* @author RuoYi
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class VelocityInitializer
|
||||
{
|
||||
|
|
|
@ -160,8 +160,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<set>
|
||||
<if test="tableName != null">table_name = #{tableName},</if>
|
||||
<if test="tableComment != null and tableComment != ''">table_comment = #{tableComment},</if>
|
||||
<if test="subTableName != null and subTableName != ''">sub_table_name = #{subTableName},</if>
|
||||
<if test="subTableFkName != null and subTableFkName != ''">sub_table_fk_name = #{subTableFkName},</if>
|
||||
<if test="subTableName != null">sub_table_name = #{subTableName},</if>
|
||||
<if test="subTableFkName != null">sub_table_fk_name = #{subTableFkName},</if>
|
||||
<if test="className != null and className != ''">class_name = #{className},</if>
|
||||
<if test="functionAuthor != null and functionAuthor != ''">function_author = #{functionAuthor},</if>
|
||||
<if test="genType != null and genType != ''">gen_type = #{genType},</if>
|
||||
|
|
|
@ -494,6 +494,8 @@
|
|||
$("#treeCode").select2("val", [""]);
|
||||
$("#treeParentCode").select2("val", [""]);
|
||||
$("#treeName").select2("val", [""]);
|
||||
$("#subTableName").attr("required", "true");
|
||||
$("#subTableFkName").attr("required", "true");
|
||||
$("#otherInfo").addClass("hidden");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue