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

提交

上级 823d1523
...@@ -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>
...@@ -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");
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 _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");
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 _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 _pojoschema;
} }
}
return null;
}
public BaseData setKey(Object key) public BaseData setKey(Object key)
{ {
return this.set("key",key); return this.set("_key",key);
} }
} }
...@@ -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;
} }
} }
...@@ -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.getBatchData(poSchema,batch)); rt.addAll(dbDataMapper.getBatchKey(poSchema,batch));
batch.clear(); batch.clear();
} }
}); });
if(batch.size()>=0) if(batch.size()>=0)
{ {
rt.addAll(dbDataMapper.getBatchData(poSchema,batch)); rt.addAll(dbDataMapper.getBatchKey(poSchema,batch));
batch.clear(); batch.clear();
} }
Map<Serializable,Integer> keys=new LinkedHashMap<>(); Map<Serializable,Integer> keys=new LinkedHashMap<>();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册