Commit f2968d1e authored by kongfm's avatar kongfm

添加liquibase

parent 95455d43
......@@ -282,7 +282,6 @@ public class ESElevatorServiceImpl {
if(isSingle) {
size = 400;
}
System.out.println(boolMust.toString());
// 创建查询构造器
NativeSearchQueryBuilder queryBuilder = new NativeSearchQueryBuilder()
......@@ -401,7 +400,6 @@ public class ESElevatorServiceImpl {
//过滤条件
.withQuery(boolMust).addAggregation(new GeoHashGridAggregationBuilder("96333").precision(esSpecialEquipmentDto.getPrecision()).field("location"));
System.out.println(constantScore.toString());
SearchHits<EsElevator> searchHits = elasticsearchTemplate.search(queryBuilder.build(), EsElevator.class);
Aggregations aggregations = searchHits.getAggregations();
ParsedGeoHashGrid aggregation = aggregations.get("96333");
......
......@@ -16,6 +16,10 @@
<artifactId>amos-boot-module-tzs-biz</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>
</dependencies>
<build>
......
......@@ -8,6 +8,10 @@ spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
logging.config=classpath:logback-${spring.profiles.active}.xml
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
##liquibase
spring.liquibase.change-log = classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled= true
## DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
......
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<include file="tzs-1.0.0.0.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>
liqiubase 有新改动,提交测试,需查看是否执行成功,以免造成执行失败,数据不能同步,造成数据不统一
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet author="kongfm" id="2021-11-09">
<preConditions onFail="MARK_RAN">
<tableExists tableName="tz_template_export"/>
<not>
<primaryKeyExists primaryKeyName="sequence_nbr" tableName="tz_template_export"/>
</not>
</preConditions>
<comment>insert record export temp</comment>
<sql>
INSERT INTO tz_template_export (
`sequence_nbr`,
`template_name`,
`template_content`,
`template_type`,
`is_standard`,
`rec_user_name`,
`rec_user_id`,
`rec_date`,
`is_delete`
)
VALUES
(
'7',
'标准模板',
'[{\"key\":\"tel\",\"value\":\"电话号码\"},{\"key\":\"telStartTime\",\"value\":\"通话开始时间\"},{\"key\":\"telEndTime\",\"value\":\"通话结束时间\"},{\"key\":\"telTime\",\"value\":\"通话时长\"},{\"key\":\"fileType\",\"value\":\"通话类型\"},{\"key\":\"workNum\",\"value\":\"关联工单编号\"}]',
'VOICE_RECORD',
true,
NULL,
NULL,
NULL,
'\0'
);
</sql>
</changeSet>
</databaseChangeLog>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment