|
|
|
@ -29,6 +29,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
@ -208,6 +209,9 @@ public class ModelController extends BladeController {
|
|
|
|
|
Iterator<TableInfo> iterator = tableInfoList.stream().filter(table -> table.getName().equals(tableName)).collect(Collectors.toList()).iterator(); |
|
|
|
|
if (iterator.hasNext()) { |
|
|
|
|
tableInfo = iterator.next(); |
|
|
|
|
if (!tableName.contains(StringPool.UNDERSCORE)) { |
|
|
|
|
throw new ServiceException("请添加表前缀后再进行配置!"); |
|
|
|
|
} |
|
|
|
|
tableInfo.setEntityName(tableInfo.getEntityName().replace(StringUtil.firstCharToUpper(tableName.split(StringPool.UNDERSCORE)[0]), StringPool.EMPTY)); |
|
|
|
|
} |
|
|
|
|
return tableInfo; |
|
|
|
|