添加表和类型的数据库

master
lwj 2024-08-24 20:00:37 +08:00
parent 5cee9d222d
commit 95add368e5
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package com.muyu.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
@ -19,6 +20,7 @@ import lombok.experimental.SuperBuilder;
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@TableName(value ="structure",autoResultMap = true) //数据库表相关
public class Structure extends BaseEntity
{
private static final long serialVersionUID = 1L;

View File

@ -144,6 +144,7 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
eq(TableInfo::getBasicId, source.getId());
}});
TableInfo tableInfo = tableInfoService.selectTableInfoByName(tableInfoInsert);
@ -182,6 +183,7 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
eq(TableInfo::getBasicId, source.getId());
}});
TableInfo table = tableInfoService.selectTableInfoByName(build);
//线程池
@ -259,6 +261,7 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
.isNull("YES".equals(isNullable) ? "Y" : "N")
.defaultValue(columnDefault)
.build();
threadPool.submit(() -> {
structureService.saveOrUpdate(build, new LambdaUpdateWrapper<Structure>() {{
eq(Structure::getTableId, build.getTableId());
@ -266,6 +269,7 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
eq(Structure::getColumnRemark, build.getColumnRemark());
}});
});
}
threadPool.shutdown();
ps.close();
@ -274,5 +278,4 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
}