Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
683e9ced
Commit
683e9ced
authored
Jun 23, 2021
by
郭武斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)修改相似警情api
parent
f4278632
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+2
-2
ESAlertCalledService.java
...oot/module/jcs/biz/service/impl/ESAlertCalledService.java
+10
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
683e9ced
...
@@ -206,10 +206,10 @@ public class AlertCalledController extends BaseController {
...
@@ -206,10 +206,10 @@ public class AlertCalledController extends BaseController {
@ApiOperation
(
value
=
"相似警情分页查询"
)
@ApiOperation
(
value
=
"相似警情分页查询"
)
@RequestMapping
(
value
=
"/page/similar"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/page/similar"
,
method
=
RequestMethod
.
POST
)
public
ResponseModel
<
Page
<
ESAlertCalledDto
>>
pageBySimilar
(
public
ResponseModel
<
Page
<
ESAlertCalledDto
>>
pageBySimilar
(
@RequestBody
ESAlertCalledDto
alertCalled
,
@RequestBody
AlertCalledVo
alertCalledVo
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
throws
Exception
{
@RequestParam
(
value
=
"size"
)
int
size
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
eSAlertCalledService
.
queryByKeys
(
alertCalled
,
current
,
size
));
return
ResponseHelper
.
buildResponse
(
eSAlertCalledService
.
queryByKeys
(
alertCalled
Vo
,
current
,
size
));
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ESAlertCalledService.java
View file @
683e9ced
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledDto;
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledDto;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ESAlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ESAlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo
;
import
com.yeejoin.amos.boot.module.jcs.biz.dao.ESAlertCalledRepository
;
import
com.yeejoin.amos.boot.module.jcs.biz.dao.ESAlertCalledRepository
;
/**
/**
...
@@ -100,8 +101,15 @@ public class ESAlertCalledService {
...
@@ -100,8 +101,15 @@ public class ESAlertCalledService {
* @return
* @return
*/
*/
@SuppressWarnings
({
"rawtypes"
})
@SuppressWarnings
({
"rawtypes"
})
public
Page
<
ESAlertCalledDto
>
queryByKeys
(
ESAlertCalledDto
alertCalled
,
int
current
,
int
size
)
public
Page
<
ESAlertCalledDto
>
queryByKeys
(
AlertCalledVo
alertCalledVo
,
int
current
,
int
size
)
{
{
Page
<
ESAlertCalledDto
>
result
=
new
Page
<
ESAlertCalledDto
>(
current
,
size
);
AlertCalled
alertCalled
=
alertCalledVo
.
getAlertCalled
();
if
(
ValidationUtil
.
isEmpty
(
alertCalled
))
{
return
result
;
}
/**
/**
* 通用匹配规则,条件构建
* 通用匹配规则,条件构建
*/
*/
...
@@ -144,7 +152,6 @@ public class ESAlertCalledService {
...
@@ -144,7 +152,6 @@ public class ESAlertCalledService {
// 对高亮词条进行操作
// 对高亮词条进行操作
SearchHits
<
ESAlertCalled
>
searchHits
=
elasticsearchTemplate
.
search
(
queryBuilder
.
build
(),
ESAlertCalled
.
class
);
SearchHits
<
ESAlertCalled
>
searchHits
=
elasticsearchTemplate
.
search
(
queryBuilder
.
build
(),
ESAlertCalled
.
class
);
Page
<
ESAlertCalledDto
>
result
=
new
Page
<
ESAlertCalledDto
>(
current
,
size
);
List
<
ESAlertCalledDto
>
list
=
new
LinkedList
<>();
List
<
ESAlertCalledDto
>
list
=
new
LinkedList
<>();
for
(
SearchHit
searchHit
:
searchHits
.
getSearchHits
())
for
(
SearchHit
searchHit
:
searchHits
.
getSearchHits
())
{
{
...
@@ -215,7 +222,7 @@ public class ESAlertCalledService {
...
@@ -215,7 +222,7 @@ public class ESAlertCalledService {
{
{
ESAlertCalled
esAlertCalled
=
new
ESAlertCalled
();
ESAlertCalled
esAlertCalled
=
new
ESAlertCalled
();
esAlertCalled
.
setSequenceNbr
(
alertCalled
.
getSequenceNbr
());
esAlertCalled
.
setSequenceNbr
(
alertCalled
.
getSequenceNbr
());
esAlertCalled
.
setAlertType
(
alertCalled
.
getAl
arm
Type
());
esAlertCalled
.
setAlertType
(
alertCalled
.
getAl
ert
Type
());
esAlertCalled
.
setCallTime
(
alertCalled
.
getCallTime
());
esAlertCalled
.
setCallTime
(
alertCalled
.
getCallTime
());
esAlertCalled
.
setCallTimeLong
(
alertCalled
.
getCallTime
().
getTime
());
esAlertCalled
.
setCallTimeLong
(
alertCalled
.
getCallTime
().
getTime
());
esAlertCalled
.
setContactUser
(
alertCalled
.
getContactUser
());
esAlertCalled
.
setContactUser
(
alertCalled
.
getContactUser
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment