提交 9bfe1ae2 编写于 作者: sq3536's avatar sq3536

提交

上级 823d1523
......@@ -29,20 +29,7 @@
<artifactId>logstash-logback-encoder</artifactId>
</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>
<groupId>io.jsonwebtoken</groupId>
......@@ -55,26 +42,6 @@
</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 -->
<dependency>
<groupId>io.springfox</groupId>
......@@ -90,45 +57,7 @@
<artifactId>feign-httpclient</artifactId>
</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 -->
<dependency>
......@@ -157,6 +86,7 @@
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
......@@ -174,37 +104,28 @@
<artifactId>druid</artifactId>
</dependency>
<!--MapStruct高性能属性映射工具-->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
</dependency>
<!--MongoDB-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<!--Liquibase数据库版本更新工具-->
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</dependency>
<!--baomidou-jobs定时服务 -->
<!--达梦数据库-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>jobs-spring-boot-starter</artifactId>
<groupId>com.dameng</groupId>
<artifactId>Dm7JdbcDriver17</artifactId>
<version>7.6.0.165</version>
</dependency>
<dependency>
<groupId>net.ibizsys.model</groupId>
<artifactId>ibizlab-model</artifactId>
<version>1.2.5</version>
<version>1.2.7</version>
</dependency>
</dependencies>
......@@ -213,71 +134,7 @@
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
</properties>
<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>
</project>
......@@ -4,8 +4,6 @@ import cn.ibizlab.core.data.domain.DOModel;
import cn.ibizlab.core.data.domain.DTOModel;
import cn.ibizlab.core.data.model.POSchema;
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.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
......@@ -59,81 +57,63 @@ public class BaseData extends DataObj
return this;
}
@JsonIgnore
@JSONField(serialize = false)
private DOModel _domodel;
@JsonIgnore
@JSONField(serialize = false)
public DOModel getDOModel()
{
Object obj=this.get("_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;
return _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()
{
Object obj=this.get("_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;
return _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()
{
Object obj=this.get("_pojoschema");
if(obj==null)
if(_pojoschema==null)
{
DOModel doModel=this.getDOModel();
if(doModel!=null)
obj=doModel.getSchema();
_pojoschema=doModel.getSchema();
}
if(obj==null)
if(_pojoschema==null)
{
DTOModel dtoModel=this.getDTOModel();
if(dtoModel!=null)
obj=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;
}
_pojoschema=dtoModel.getSchema();
}
return null;
return _pojoschema;
}
public BaseData setKey(Object key)
{
return this.set("key",key);
return this.set("_key",key);
}
}
......@@ -48,6 +48,10 @@ public class ModelService {
@Lazy
private DynamicModelService dynamicService;
@Autowired
@Lazy
private ModelService proxy;
public DOModel getDOModel(String system,String entity)
{
......@@ -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 {
Map<String, String> entities = new HashMap<>();
Map<String, MetaEntityModel> entityModels = dynamicService.getEntities(system);
......@@ -105,4 +109,6 @@ public class ModelService {
return null;
}
}
......@@ -245,13 +245,13 @@ public class DbDataServiceImpl implements IDataService {
batch.add(et);
if(batch.size()>=BATCH_SIZE)
{
rt.addAll(dbDataMapper.getBatchData(poSchema,batch));
rt.addAll(dbDataMapper.getBatchKey(poSchema,batch));
batch.clear();
}
});
if(batch.size()>=0)
{
rt.addAll(dbDataMapper.getBatchData(poSchema,batch));
rt.addAll(dbDataMapper.getBatchKey(poSchema,batch));
batch.clear();
}
Map<Serializable,Integer> keys=new LinkedHashMap<>();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册