Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
lefull-lot-microservice
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yangqi
lefull-lot-microservice
Commits
9547a645
提交
9547a645
authored
12月 20, 2022
作者:
yangqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1
上级
b20eb8b3
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
42 行增加
和
32 行删除
+42
-32
LisaController.java
...t-api-web/src/main/java/cn/lefull/api/LisaController.java
+7
-0
Face.java
...mon/src/main/java/cn/lefull/common/sdk/ali/base/Face.java
+1
-0
FaceService.java
...vice/src/main/java/cn/lefull/service/ali/FaceService.java
+1
-1
FaceServiceImpl.java
.../src/main/java/cn/lefull/service/ali/FaceServiceImpl.java
+3
-27
EquipmentService.java
...rc/main/java/cn/lefull/service/lisa/EquipmentService.java
+2
-0
EquipmentServiceImpl.java
...ain/java/cn/lefull/service/lisa/EquipmentServiceImpl.java
+28
-4
没有找到文件。
lefull-lot-api-web/src/main/java/cn/lefull/api/LisaController.java
浏览文件 @
9547a645
...
@@ -62,4 +62,11 @@ public class LisaController {
...
@@ -62,4 +62,11 @@ public class LisaController {
Pagination
<
EntityListVO
>
entityListVOPageInfo
=
equipmentService
.
getEntityList
(
apartmentId
,
page
,
pageSize
);
Pagination
<
EntityListVO
>
entityListVOPageInfo
=
equipmentService
.
getEntityList
(
apartmentId
,
page
,
pageSize
);
return
new
ApiResponse
<>(
entityListVOPageInfo
);
return
new
ApiResponse
<>(
entityListVOPageInfo
);
}
}
@NoAuth
@GetMapping
(
"/searchFace"
)
public
ApiResponse
<
Object
>
searchFace
(
int
apartmentId
,
String
url
)
throws
Exception
{
equipmentService
.
searchFace
(
apartmentId
,
url
);
return
new
ApiResponse
<>();
}
}
}
lefull-lot-common/src/main/java/cn/lefull/common/sdk/ali/base/Face.java
浏览文件 @
9547a645
...
@@ -183,6 +183,7 @@ public class Face {
...
@@ -183,6 +183,7 @@ public class Face {
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"entityId"
,
item
.
getEntityId
());
map
.
put
(
"entityId"
,
item
.
getEntityId
());
map
.
put
(
"faceId"
,
item
.
getFaceId
());
map
.
put
(
"faceId"
,
item
.
getFaceId
());
map
.
put
(
"ossUrl"
,
url
);
return
map
;
return
map
;
}
}
...
...
lefull-lot-service/src/main/java/cn/lefull/service/ali/FaceService.java
浏览文件 @
9547a645
...
@@ -46,7 +46,7 @@ public interface FaceService {
...
@@ -46,7 +46,7 @@ public interface FaceService {
/**
/**
* 搜索人脸
* 搜索人脸
*/
*/
boolean
searchFace
(
String
dbName
,
String
url
)
throws
Exception
;
Map
<
String
,
String
>
searchFace
(
String
dbName
,
String
url
)
throws
Exception
;
/**
/**
* 搜索人脸
* 搜索人脸
...
...
lefull-lot-service/src/main/java/cn/lefull/service/ali/FaceServiceImpl.java
浏览文件 @
9547a645
...
@@ -152,36 +152,12 @@ public class FaceServiceImpl implements FaceService{
...
@@ -152,36 +152,12 @@ public class FaceServiceImpl implements FaceService{
}
}
@Override
@Override
public
boolean
searchFace
(
String
dbName
,
String
url
)
throws
Exception
{
public
Map
<
String
,
String
>
searchFace
(
String
dbName
,
String
url
)
throws
Exception
{
Utils
.
checkParamsNotEmpty
(
dbName
,
"dbName"
);
Utils
.
checkParamsNotEmpty
(
dbName
,
"dbName"
);
Utils
.
checkParamsNotEmpty
(
url
,
"url"
);
Utils
.
checkParamsNotEmpty
(
url
,
"url"
);
AliFaceDb
db
=
dbMapper
.
getDbByName
(
dbName
);
if
(
db
==
null
){
return
false
;
}
String
ossUrl
=
sdk
.
uploadImageUrl
(
url
);
String
ossUrl
=
sdk
.
uploadImageUrl
(
url
);
Map
<
String
,
String
>
map
=
sdk
.
searchFace
(
dbName
,
ossUrl
);
return
sdk
.
searchFace
(
dbName
,
ossUrl
);
if
(
map
==
null
){
return
false
;
}
int
dbId
=
db
.
getAliFaceDbId
();
String
entityId
=
map
.
get
(
"entityId"
);
String
faceId
=
map
.
get
(
"faceId"
);
AliFaceEntity
entityDb
=
new
AliFaceEntity
();
entityDb
.
setAliFaceDbId
(
dbId
);
entityDb
.
setEntityId
(
entityId
);
AliFaceEntity
entity
=
entityMapper
.
getEntityByEntityId
(
entityDb
);
if
(
entity
==
null
){
return
false
;
}
AliFaceLog
log
=
new
AliFaceLog
();
log
.
setAliFaceDbId
(
dbId
);
log
.
setAliFaceEntityId
(
entity
.
getAliFaceEntityId
());
log
.
setFaceId
(
faceId
);
log
.
setImageUrl
(
url
);
log
.
setOssUrl
(
ossUrl
);
logMapper
.
addLog
(
log
);
return
true
;
}
}
@Override
@Override
...
...
lefull-lot-service/src/main/java/cn/lefull/service/lisa/EquipmentService.java
浏览文件 @
9547a645
...
@@ -25,4 +25,6 @@ public interface EquipmentService {
...
@@ -25,4 +25,6 @@ public interface EquipmentService {
void
updateEntity
(
int
entityId
,
String
userName
,
Byte
sex
,
String
roomNumber
,
Byte
identity
,
String
mobile
,
String
idCard
,
String
imgUrl
,
int
employeeId
)
throws
Exception
;
void
updateEntity
(
int
entityId
,
String
userName
,
Byte
sex
,
String
roomNumber
,
Byte
identity
,
String
mobile
,
String
idCard
,
String
imgUrl
,
int
employeeId
)
throws
Exception
;
Pagination
<
EntityListVO
>
getEntityList
(
int
apartmentId
,
int
page
,
int
pageSize
)
throws
Exception
;
Pagination
<
EntityListVO
>
getEntityList
(
int
apartmentId
,
int
page
,
int
pageSize
)
throws
Exception
;
boolean
searchFace
(
int
apartmentId
,
String
url
)
throws
Exception
;
}
}
lefull-lot-service/src/main/java/cn/lefull/service/lisa/EquipmentServiceImpl.java
浏览文件 @
9547a645
...
@@ -11,10 +11,7 @@ import cn.lefull.repository.mapper.face.AliFaceDbMapper;
...
@@ -11,10 +11,7 @@ import cn.lefull.repository.mapper.face.AliFaceDbMapper;
import
cn.lefull.repository.mapper.face.CameraApartmentDbMapper
;
import
cn.lefull.repository.mapper.face.CameraApartmentDbMapper
;
import
cn.lefull.repository.mapper.face.CameraEntityMapper
;
import
cn.lefull.repository.mapper.face.CameraEntityMapper
;
import
cn.lefull.repository.mapper.face.CameraEquipmentMapper
;
import
cn.lefull.repository.mapper.face.CameraEquipmentMapper
;
import
cn.lefull.repository.model.face.AliFaceDb
;
import
cn.lefull.repository.model.face.*
;
import
cn.lefull.repository.model.face.CameraApartmentDb
;
import
cn.lefull.repository.model.face.CameraEntity
;
import
cn.lefull.repository.model.face.CameraEquipment
;
import
cn.lefull.service.ali.FaceService
;
import
cn.lefull.service.ali.FaceService
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
...
@@ -257,4 +254,31 @@ public class EquipmentServiceImpl implements EquipmentService {
...
@@ -257,4 +254,31 @@ public class EquipmentServiceImpl implements EquipmentService {
}
}
return
PageBuilder
.
buildPageResult
(
objects
,
entityListVOS
);
return
PageBuilder
.
buildPageResult
(
objects
,
entityListVOS
);
}
}
@Override
public
boolean
searchFace
(
int
apartmentId
,
String
url
)
throws
Exception
{
Utils
.
checkParamsNotEmpty
(
apartmentId
,
"apartmentId"
);
Utils
.
checkParamsNotEmpty
(
url
,
"url"
);
String
dbName
=
this
.
getFaceDbName
(
apartmentId
);
int
dbId
=
this
.
getFaceDbId
(
apartmentId
);
Map
<
String
,
String
>
map
=
faceService
.
searchFace
(
dbName
,
url
);
if
(
map
==
null
){
//校验失败
return
false
;
}
String
entityId
=
map
.
get
(
"entityId"
);
String
faceId
=
map
.
get
(
"faceId"
);
String
ossUrl
=
map
.
get
(
"ossUrl"
);
AliFaceLog
log
=
new
AliFaceLog
();
log
.
setAliFaceDbId
(
dbId
);
log
.
setAliFaceEntityId
(
entityId
);
log
.
setFaceId
(
faceId
);
log
.
setImageUrl
(
url
);
log
.
setOssUrl
(
ossUrl
);
logMapper
.
addLog
(
log
);
return
true
;
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论