Commit 61765d02 by xmh

添加 unid 字段

1 parent 906d49b1
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<dependency> <dependency>
<groupId>com.viontech.keliu</groupId> <groupId>com.viontech.keliu</groupId>
<artifactId>AlgApiClient</artifactId> <artifactId>AlgApiClient</artifactId>
<version>6.0.6-SNAPSHOT</version> <version>6.0.8-SNAPSHOT</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>javax</groupId> <groupId>javax</groupId>
......
...@@ -182,6 +182,7 @@ public class PersonService { ...@@ -182,6 +182,7 @@ public class PersonService {
Integer bodyType = person.getBodyType(); Integer bodyType = person.getBodyType();
String personChannelSerialNum = person.getChannelSerialNum(); String personChannelSerialNum = person.getChannelSerialNum();
List<FaceFeature> faceFeatures = person.getFaceFeatures(); List<FaceFeature> faceFeatures = person.getFaceFeatures();
String unid = person.getUnid();
if (faceFeatures != null && faceFeatures.size() > 0) { if (faceFeatures != null && faceFeatures.size() > 0) {
for (FaceFeature faceFeature : faceFeatures) { for (FaceFeature faceFeature : faceFeatures) {
Double[] feature = faceFeature.getFeature(); Double[] feature = faceFeature.getFeature();
...@@ -189,7 +190,7 @@ public class PersonService { ...@@ -189,7 +190,7 @@ public class PersonService {
String fid = faceFeature.getFid(); String fid = faceFeature.getFid();
IndexRequest indexRequest = new IndexRequest(poolId) IndexRequest indexRequest = new IndexRequest(poolId)
.source(XContentType.JSON, "personId", personId, .source(XContentType.JSON, "personId", personId, "unid", unid,
"data", feature, "fid", fid, "age", age, "gender", gender, "body_type", bodyType, "data", feature, "fid", fid, "age", age, "gender", gender, "body_type", bodyType,
"counttime", personCountTime == null ? null : Constant.DATE_FORMAT.get().format(personCountTime), "channelSerialNum", personChannelSerialNum); "counttime", personCountTime == null ? null : Constant.DATE_FORMAT.get().format(personCountTime), "channelSerialNum", personChannelSerialNum);
bulkRequest.add(indexRequest); bulkRequest.add(indexRequest);
...@@ -214,7 +215,7 @@ public class PersonService { ...@@ -214,7 +215,7 @@ public class PersonService {
Date counttime = bodyFeature.getCounttime() == null ? personCountTime : bodyFeature.getCounttime(); Date counttime = bodyFeature.getCounttime() == null ? personCountTime : bodyFeature.getCounttime();
String channelSerialNum = bodyFeature.getChannelSerialNum() == null ? personChannelSerialNum : person.getChannelSerialNum(); String channelSerialNum = bodyFeature.getChannelSerialNum() == null ? personChannelSerialNum : person.getChannelSerialNum();
IndexRequest indexRequest = new IndexRequest(poolId) IndexRequest indexRequest = new IndexRequest(poolId)
.source(XContentType.JSON, "personId", personId, .source(XContentType.JSON, "personId", personId,"unid", unid,
"body", feature, "fid", fid, "age", age, "gender", gender, "body_type", bodyType, "body", feature, "fid", fid, "age", age, "gender", gender, "body_type", bodyType,
"counttime", counttime == null ? null : Constant.DATE_FORMAT.get().format(counttime), "channelSerialNum", channelSerialNum); "counttime", counttime == null ? null : Constant.DATE_FORMAT.get().format(counttime), "channelSerialNum", channelSerialNum);
bulkRequest.add(indexRequest); bulkRequest.add(indexRequest);
......
...@@ -234,6 +234,13 @@ public class PoolService { ...@@ -234,6 +234,13 @@ public class PoolService {
} }
builder.endObject(); builder.endObject();
// 抓拍id
builder.startObject("unid");
{
builder.field("type", "keyword");
}
builder.endObject();
// 特征id // 特征id
builder.startObject("fid"); builder.startObject("fid");
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!