Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdata
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdata
提交
9bfe1ae2
提交
9bfe1ae2
编写于
8月 24, 2021
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交
上级
823d1523
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
46 行增加
和
203 行删除
+46
-203
pom.xml
ibzdata-core/pom.xml
+9
-152
BaseData.java
...core/src/main/java/cn/ibizlab/core/data/dto/BaseData.java
+28
-48
ModelService.java
.../main/java/cn/ibizlab/core/data/service/ModelService.java
+7
-1
DbDataServiceImpl.java
.../cn/ibizlab/core/data/service/impl/DbDataServiceImpl.java
+2
-2
未找到文件。
ibzdata-core/pom.xml
浏览文件 @
9bfe1ae2
...
@@ -29,20 +29,7 @@
...
@@ -29,20 +29,7 @@
<artifactId>
logstash-logback-encoder
</artifactId>
<artifactId>
logstash-logback-encoder
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-mongodb
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-security
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
io.jsonwebtoken
</groupId>
<groupId>
io.jsonwebtoken
</groupId>
...
@@ -55,26 +42,6 @@
...
@@ -55,26 +42,6 @@
</dependency>
</dependency>
<dependency>
<groupId>
com.github.ben-manes.caffeine
</groupId>
<artifactId>
caffeine
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
<dependency>
<groupId>
com.esotericsoftware
</groupId>
<artifactId>
kryo-shaded
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-pool2
</artifactId>
</dependency>
<!-- Swagger2 -->
<!-- Swagger2 -->
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
...
@@ -90,45 +57,7 @@
...
@@ -90,45 +57,7 @@
<artifactId>
feign-httpclient
</artifactId>
<artifactId>
feign-httpclient
</artifactId>
</dependency>
</dependency>
<!-- drools -->
<dependency>
<groupId>
org.drools
</groupId>
<artifactId>
drools-compiler
</artifactId>
</dependency>
<dependency>
<groupId>
org.drools
</groupId>
<artifactId>
drools-core
</artifactId>
</dependency>
<dependency>
<groupId>
org.kie
</groupId>
<artifactId>
kie-spring
</artifactId>
</dependency>
<dependency>
<groupId>
org.kie
</groupId>
<artifactId>
kie-api
</artifactId>
</dependency>
<dependency>
<groupId>
org.flowable
</groupId>
<artifactId>
flowable-json-converter
</artifactId>
</dependency>
<dependency>
<groupId>
org.flowable
</groupId>
<artifactId>
flowable-ui-modeler-conf
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-slf4j-impl
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-commons
</artifactId>
</dependency>
<!-- JBPM -->
<!-- JBPM -->
<dependency>
<dependency>
...
@@ -157,6 +86,7 @@
...
@@ -157,6 +86,7 @@
<groupId>
org.kie
</groupId>
<groupId>
org.kie
</groupId>
<artifactId>
kie-api
</artifactId>
<artifactId>
kie-api
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
...
@@ -174,37 +104,28 @@
...
@@ -174,37 +104,28 @@
<artifactId>
druid
</artifactId>
<artifactId>
druid
</artifactId>
</dependency>
</dependency>
<!--MapStruct高性能属性映射工具-->
<dependency>
<groupId>
org.mapstruct
</groupId>
<artifactId>
mapstruct-jdk8
</artifactId>
</dependency>
<dependency>
<groupId>
org.mapstruct
</groupId>
<artifactId>
mapstruct-processor
</artifactId>
</dependency>
<!--MongoDB-->
<!--MongoDB-->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-mongodb
</artifactId>
<artifactId>
spring-boot-starter-data-mongodb
</artifactId>
</dependency>
</dependency>
<!--Liquibase数据库版本更新工具-->
<dependency>
<dependency>
<groupId>
org.liquibase
</groupId>
<groupId>
com.baomidou
</groupId>
<artifactId>
liquibase-core
</artifactId>
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
</dependency>
</dependency>
<!--
baomidou-jobs定时服务
-->
<!--
达梦数据库
-->
<dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<groupId>
com.dameng
</groupId>
<artifactId>
jobs-spring-boot-starter
</artifactId>
<artifactId>
Dm7JdbcDriver17
</artifactId>
<version>
7.6.0.165
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
net.ibizsys.model
</groupId>
<groupId>
net.ibizsys.model
</groupId>
<artifactId>
ibizlab-model
</artifactId>
<artifactId>
ibizlab-model
</artifactId>
<version>
1.2.
5
</version>
<version>
1.2.
7
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
@@ -213,71 +134,7 @@
...
@@ -213,71 +134,7 @@
<maven.build.timestamp.format>
yyyyMMddHHmmss
</maven.build.timestamp.format>
<maven.build.timestamp.format>
yyyyMMddHHmmss
</maven.build.timestamp.format>
</properties>
</properties>
<profiles>
<profiles>
<profile>
<id>
diff
</id>
<build>
<plugins>
<plugin>
<groupId>
org.liquibase
</groupId>
<artifactId>
liquibase-maven-plugin
</artifactId>
<version>
${liquibase.version}
</version>
<executions>
<execution>
<id>
prepare-newdb
</id>
<configuration>
<changeLogFile>
${project.basedir}/src/main/resources/liquibase/h2_table.xml
</changeLogFile>
<driver>
org.h2.Driver
</driver>
<url>
jdbc:h2:file:${project.build.directory}/db/new;MODE=mysql
</url>
<username>
root
</username>
<dropFirst>
true
</dropFirst>
</configuration>
<phase>
process-resources
</phase>
<goals>
<goal>
update
</goal>
</goals>
</execution>
<execution>
<id>
prepare-olddb
</id>
<configuration>
<changeLogFile>
${project.basedir}/src/main/resources/liquibase/master_table.xml
</changeLogFile>
<driver>
org.h2.Driver
</driver>
<url>
jdbc:h2:file:${project.build.directory}/db/last;MODE=mysql
</url>
<username>
root
</username>
<dropFirst>
true
</dropFirst>
</configuration>
<phase>
process-resources
</phase>
<goals>
<goal>
update
</goal>
</goals>
</execution>
<execution>
<id>
make-diff
</id>
<configuration>
<changeLogFile>
${project.basedir}/src/main/resources/liquibase/empty.xml
</changeLogFile>
<diffChangeLogFile>
${project.basedir}/src/main/resources/liquibase/changelog/${maven.build.timestamp}_changelog.xml
</diffChangeLogFile>
<driver>
org.h2.Driver
</driver>
<url>
jdbc:h2:file:${project.build.directory}/db/last;MODE=mysql
</url>
<username>
root
</username>
<password></password>
<referenceUrl>
jdbc:h2:file:${project.build.directory}/db/new;MODE=mysql
</referenceUrl>
<referenceDriver>
org.h2.Driver
</referenceDriver>
<referenceUsername>
root
</referenceUsername>
<verbose>
true
</verbose>
<logging>
debug
</logging>
<contexts>
!test
</contexts>
<diffExcludeObjects>
Index:.*,table:ibzfile,ibzuser,ibzdataaudit,ibzcfg,IBZFILE,IBZUSER,IBZDATAAUDIT,IBZCFG
</diffExcludeObjects>
</configuration>
<phase>
process-resources
</phase>
<goals>
<goal>
diff
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</profiles>
</project>
</project>
ibzdata-core/src/main/java/cn/ibizlab/core/data/dto/BaseData.java
浏览文件 @
9bfe1ae2
...
@@ -4,8 +4,6 @@ import cn.ibizlab.core.data.domain.DOModel;
...
@@ -4,8 +4,6 @@ import cn.ibizlab.core.data.domain.DOModel;
import
cn.ibizlab.core.data.domain.DTOModel
;
import
cn.ibizlab.core.data.domain.DTOModel
;
import
cn.ibizlab.core.data.model.POSchema
;
import
cn.ibizlab.core.data.model.POSchema
;
import
cn.ibizlab.core.data.model.PojoSchema
;
import
cn.ibizlab.core.data.model.PojoSchema
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
...
@@ -59,81 +57,63 @@ public class BaseData extends DataObj
...
@@ -59,81 +57,63 @@ public class BaseData extends DataObj
return
this
;
return
this
;
}
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
DOModel
_domodel
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
DOModel
getDOModel
()
public
DOModel
getDOModel
()
{
{
Object
obj
=
this
.
get
(
"_domodel"
);
return
_domodel
;
if
(
obj
!=
null
)
{
if
(
obj
instanceof
DOModel
)
return
(
DOModel
)
obj
;
else
if
(
obj
instanceof
Map
)
{
DOModel
_domodel
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
obj
),
DOModel
.
class
);
this
.
put
(
"_domodel"
,
_domodel
);
return
_domodel
;
}
}
return
null
;
}
}
public
BaseData
setDOModel
(
DOModel
doModel
)
public
BaseData
setDOModel
(
DOModel
doModel
)
{
{
return
this
.
set
(
"_domodel"
,
doModel
);
this
.
_domodel
=
doModel
;
return
this
;
}
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
DTOModel
_dtomodel
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
DTOModel
getDTOModel
()
public
DTOModel
getDTOModel
()
{
{
Object
obj
=
this
.
get
(
"_dtomodel"
);
return
_dtomodel
;
if
(
obj
!=
null
)
{
if
(
obj
instanceof
DTOModel
)
return
(
DTOModel
)
obj
;
else
if
(
obj
instanceof
Map
)
{
DTOModel
_dtomodel
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
obj
),
DTOModel
.
class
);
this
.
put
(
"_dtomodel"
,
_dtomodel
);
return
_dtomodel
;
}
}
return
null
;
}
}
public
BaseData
setDTOModel
(
DTOModel
dtoModel
)
public
BaseData
setDTOModel
(
DTOModel
dtoModel
)
{
{
return
this
.
set
(
"_dtomodel"
,
dtoModel
);
this
.
_dtomodel
=
dtoModel
;
return
this
;
}
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
PojoSchema
_pojoschema
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
PojoSchema
getPojoSchema
()
public
PojoSchema
getPojoSchema
()
{
{
Object
obj
=
this
.
get
(
"_pojoschema"
);
if
(
_pojoschema
==
null
)
if
(
obj
==
null
)
{
{
DOModel
doModel
=
this
.
getDOModel
();
DOModel
doModel
=
this
.
getDOModel
();
if
(
doModel
!=
null
)
if
(
doModel
!=
null
)
obj
=
doModel
.
getSchema
();
_pojoschema
=
doModel
.
getSchema
();
}
}
if
(
obj
==
null
)
if
(
_pojoschema
==
null
)
{
{
DTOModel
dtoModel
=
this
.
getDTOModel
();
DTOModel
dtoModel
=
this
.
getDTOModel
();
if
(
dtoModel
!=
null
)
if
(
dtoModel
!=
null
)
obj
=
dtoModel
.
getSchema
();
_pojoschema
=
dtoModel
.
getSchema
();
}
if
(
obj
!=
null
)
{
if
(
obj
instanceof
PojoSchema
)
return
(
PojoSchema
)
obj
;
else
if
(
obj
instanceof
Map
)
{
PojoSchema
_pojoschema
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
obj
),
PojoSchema
.
class
);
this
.
put
(
"_pojoschema"
,
_pojoschema
);
return
_pojoschema
;
}
}
}
return
null
;
return
_pojoschema
;
}
}
public
BaseData
setKey
(
Object
key
)
public
BaseData
setKey
(
Object
key
)
{
{
return
this
.
set
(
"key"
,
key
);
return
this
.
set
(
"
_
key"
,
key
);
}
}
}
}
ibzdata-core/src/main/java/cn/ibizlab/core/data/service/ModelService.java
浏览文件 @
9bfe1ae2
...
@@ -48,6 +48,10 @@ public class ModelService {
...
@@ -48,6 +48,10 @@ public class ModelService {
@Lazy
@Lazy
private
DynamicModelService
dynamicService
;
private
DynamicModelService
dynamicService
;
@Autowired
@Lazy
private
ModelService
proxy
;
public
DOModel
getDOModel
(
String
system
,
String
entity
)
public
DOModel
getDOModel
(
String
system
,
String
entity
)
{
{
...
@@ -94,7 +98,7 @@ public class ModelService {
...
@@ -94,7 +98,7 @@ public class ModelService {
@Cacheable
(
value
=
"meta-entities"
,
key
=
"'system:'+#p0"
)
@Cacheable
(
value
=
"meta-entities"
,
key
=
"'system:
keymap-
'+#p0"
)
public
Map
<
String
,
String
>
getEntitiesBySystem
(
String
system
)
throws
Exception
{
public
Map
<
String
,
String
>
getEntitiesBySystem
(
String
system
)
throws
Exception
{
Map
<
String
,
String
>
entities
=
new
HashMap
<>();
Map
<
String
,
String
>
entities
=
new
HashMap
<>();
Map
<
String
,
MetaEntityModel
>
entityModels
=
dynamicService
.
getEntities
(
system
);
Map
<
String
,
MetaEntityModel
>
entityModels
=
dynamicService
.
getEntities
(
system
);
...
@@ -105,4 +109,6 @@ public class ModelService {
...
@@ -105,4 +109,6 @@ public class ModelService {
return
null
;
return
null
;
}
}
}
}
ibzdata-core/src/main/java/cn/ibizlab/core/data/service/impl/DbDataServiceImpl.java
浏览文件 @
9bfe1ae2
...
@@ -245,13 +245,13 @@ public class DbDataServiceImpl implements IDataService {
...
@@ -245,13 +245,13 @@ public class DbDataServiceImpl implements IDataService {
batch
.
add
(
et
);
batch
.
add
(
et
);
if
(
batch
.
size
()>=
BATCH_SIZE
)
if
(
batch
.
size
()>=
BATCH_SIZE
)
{
{
rt
.
addAll
(
dbDataMapper
.
getBatch
Data
(
poSchema
,
batch
));
rt
.
addAll
(
dbDataMapper
.
getBatch
Key
(
poSchema
,
batch
));
batch
.
clear
();
batch
.
clear
();
}
}
});
});
if
(
batch
.
size
()>=
0
)
if
(
batch
.
size
()>=
0
)
{
{
rt
.
addAll
(
dbDataMapper
.
getBatch
Data
(
poSchema
,
batch
));
rt
.
addAll
(
dbDataMapper
.
getBatch
Key
(
poSchema
,
batch
));
batch
.
clear
();
batch
.
clear
();
}
}
Map
<
Serializable
,
Integer
>
keys
=
new
LinkedHashMap
<>();
Map
<
Serializable
,
Integer
>
keys
=
new
LinkedHashMap
<>();
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录