添加表和类型的数据库
parent
5cee9d222d
commit
95add368e5
|
@ -2,6 +2,7 @@ package com.muyu.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
@ -19,6 +20,7 @@ import lombok.experimental.SuperBuilder;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@SuperBuilder
|
@SuperBuilder
|
||||||
|
@TableName(value ="structure",autoResultMap = true) //数据库表相关
|
||||||
public class Structure extends BaseEntity
|
public class Structure extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
@ -144,6 +144,7 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
|
||||||
eq(TableInfo::getBasicId, source.getId());
|
eq(TableInfo::getBasicId, source.getId());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|
||||||
TableInfo tableInfo = tableInfoService.selectTableInfoByName(tableInfoInsert);
|
TableInfo tableInfo = tableInfoService.selectTableInfoByName(tableInfoInsert);
|
||||||
|
|
||||||
|
|
||||||
|
@ -182,6 +183,7 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
|
||||||
eq(TableInfo::getBasicId, source.getId());
|
eq(TableInfo::getBasicId, source.getId());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|
||||||
TableInfo table = tableInfoService.selectTableInfoByName(build);
|
TableInfo table = tableInfoService.selectTableInfoByName(build);
|
||||||
|
|
||||||
//线程池
|
//线程池
|
||||||
|
@ -259,6 +261,7 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
|
||||||
.isNull("YES".equals(isNullable) ? "Y" : "N")
|
.isNull("YES".equals(isNullable) ? "Y" : "N")
|
||||||
.defaultValue(columnDefault)
|
.defaultValue(columnDefault)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
threadPool.submit(() -> {
|
threadPool.submit(() -> {
|
||||||
structureService.saveOrUpdate(build, new LambdaUpdateWrapper<Structure>() {{
|
structureService.saveOrUpdate(build, new LambdaUpdateWrapper<Structure>() {{
|
||||||
eq(Structure::getTableId, build.getTableId());
|
eq(Structure::getTableId, build.getTableId());
|
||||||
|
@ -266,6 +269,7 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
|
||||||
eq(Structure::getColumnRemark, build.getColumnRemark());
|
eq(Structure::getColumnRemark, build.getColumnRemark());
|
||||||
}});
|
}});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
threadPool.shutdown();
|
threadPool.shutdown();
|
||||||
ps.close();
|
ps.close();
|
||||||
|
@ -274,5 +278,4 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue