Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
VVAS-Match
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e4494cd1
authored
Jan 06, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
完成人员更新功能
1 parent
f198fc81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
src/main/java/com/viontech/match/entity/vo/RequestVo.java
src/main/java/com/viontech/match/service/PersonService.java
src/main/java/com/viontech/match/entity/vo/RequestVo.java
View file @
e4494cd
package
com
.
viontech
.
match
.
entity
.
vo
;
import
com.viontech.keliu.model.FaceFeature
;
import
com.viontech.keliu.model.Person
;
import
com.viontech.match.enumeration.CommandEnum
;
import
lombok.Getter
;
...
...
@@ -42,6 +43,8 @@ public class RequestVo {
private
String
personPoolId
;
private
List
<
String
>
unionPersonPoolId
;
private
FaceFeature
newFaceFeature
;
public
void
setPoolId
(
String
poolId
)
{
this
.
poolId
=
poolId
.
toLowerCase
();
}
...
...
src/main/java/com/viontech/match/service/PersonService.java
View file @
e4494cd
...
...
@@ -9,7 +9,6 @@ import com.viontech.match.config.Constant;
import
com.viontech.match.entity.vo.RequestVo
;
import
com.viontech.match.entity.vo.ResponseVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.tomcat.util.http.fileupload.FileUtils
;
import
org.elasticsearch.ElasticsearchStatusException
;
import
org.elasticsearch.action.bulk.BulkRequest
;
import
org.elasticsearch.action.bulk.BulkResponse
;
...
...
@@ -113,8 +112,21 @@ public class PersonService {
* 修改人员特征
*/
public
ResponseVo
updatePerson
(
RequestVo
requestVo
)
{
return
null
;
String
rid
=
requestVo
.
getRid
();
Person
person
=
requestVo
.
getPerson
();
String
personId
=
person
.
getPersonId
();
String
poolId
=
requestVo
.
getPoolId
();
log
.
info
(
"人员修改操作开始,poolId:[{}],personId:[{}]"
,
poolId
,
personId
);
// 先删除
try
{
BulkByScrollResponse
bulkByScrollResponse
=
deletePerson
(
poolId
,
personId
);
BulkResponse
bulkItemResponses
=
addPerson
(
poolId
,
Collections
.
singletonList
(
person
));
}
catch
(
IOException
e
)
{
log
.
error
(
"人员修改操作异常"
,
e
);
return
ResponseVo
.
error
(
rid
,
"update failed"
);
}
log
.
info
(
"人员修改操作完成,poolId:[{}],personId:[{}]"
,
poolId
,
personId
);
return
ResponseVo
.
success
(
rid
);
}
/**
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment