update 优化 去除GenUtils设置createby逻辑 统一走自动注入设置
This commit is contained in:
parent
a21fa666fd
commit
1757e5519d
@ -29,7 +29,6 @@ import org.dromara.common.core.utils.file.FileUtils;
|
||||
import org.dromara.common.json.utils.JsonUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.generator.constant.GenConstants;
|
||||
import org.dromara.generator.domain.GenTable;
|
||||
import org.dromara.generator.domain.GenTableColumn;
|
||||
@ -269,11 +268,10 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
@DSTransactional
|
||||
@Override
|
||||
public void importGenTable(List<GenTable> tableList, String dataName) {
|
||||
Long operId = LoginHelper.getUserId();
|
||||
try {
|
||||
for (GenTable table : tableList) {
|
||||
String tableName = table.getTableName();
|
||||
GenUtils.initTable(table, operId);
|
||||
GenUtils.initTable(table);
|
||||
table.setDataName(dataName);
|
||||
int row = baseMapper.insert(table);
|
||||
if (row > 0) {
|
||||
|
@ -22,14 +22,13 @@ public class GenUtils {
|
||||
/**
|
||||
* 初始化表信息
|
||||
*/
|
||||
public static void initTable(GenTable genTable, Long operId) {
|
||||
public static void initTable(GenTable genTable) {
|
||||
genTable.setClassName(convertClassName(genTable.getTableName()));
|
||||
genTable.setPackageName(GenConfig.getPackageName());
|
||||
genTable.setModuleName(getModuleName(GenConfig.getPackageName()));
|
||||
genTable.setBusinessName(getBusinessName(genTable.getTableName()));
|
||||
genTable.setFunctionName(replaceText(genTable.getTableComment()));
|
||||
genTable.setFunctionAuthor(GenConfig.getAuthor());
|
||||
genTable.setCreateBy(operId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user