|
|
|
@ -29,7 +29,6 @@ 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; |
|
|
|
@ -209,10 +208,11 @@ 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("请添加表前缀后再进行配置!"); |
|
|
|
|
} |
|
|
|
|
if (tableName.contains(StringPool.UNDERSCORE)) { |
|
|
|
|
tableInfo.setEntityName(tableInfo.getEntityName().replace(StringUtil.firstCharToUpper(tableName.split(StringPool.UNDERSCORE)[0]), StringPool.EMPTY)); |
|
|
|
|
} else { |
|
|
|
|
tableInfo.setEntityName(StringUtil.firstCharToUpper(tableName)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return tableInfo; |
|
|
|
|
} |
|
|
|
|