|
@@ -128,9 +128,9 @@ public class GenTableServiceImpl implements IGenTableService
|
|
int row = genTableMapper.updateGenTable(genTable);
|
|
int row = genTableMapper.updateGenTable(genTable);
|
|
if (row > 0)
|
|
if (row > 0)
|
|
{
|
|
{
|
|
- for (GenTableColumn cenTableColumn : genTable.getColumns())
|
|
|
|
|
|
+ for (GenTableColumn genTableColumn : genTable.getColumns())
|
|
{
|
|
{
|
|
- genTableColumnMapper.updateGenTableColumn(cenTableColumn);
|
|
|
|
|
|
+ genTableColumnMapper.updateGenTableColumn(genTableColumn);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -424,16 +424,16 @@ public class GenTableServiceImpl implements IGenTableService
|
|
{
|
|
{
|
|
throw new ServiceException("树名称字段不能为空");
|
|
throw new ServiceException("树名称字段不能为空");
|
|
}
|
|
}
|
|
- else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory()))
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory()))
|
|
|
|
+ {
|
|
|
|
+ if (StringUtils.isEmpty(genTable.getSubTableName()))
|
|
{
|
|
{
|
|
- if (StringUtils.isEmpty(genTable.getSubTableName()))
|
|
|
|
- {
|
|
|
|
- throw new ServiceException("关联子表的表名不能为空");
|
|
|
|
- }
|
|
|
|
- else if (StringUtils.isEmpty(genTable.getSubTableFkName()))
|
|
|
|
- {
|
|
|
|
- throw new ServiceException("子表关联的外键名不能为空");
|
|
|
|
- }
|
|
|
|
|
|
+ throw new ServiceException("关联子表的表名不能为空");
|
|
|
|
+ }
|
|
|
|
+ else if (StringUtils.isEmpty(genTable.getSubTableFkName()))
|
|
|
|
+ {
|
|
|
|
+ throw new ServiceException("子表关联的外键名不能为空");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|