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
c34ea62e
Commit
c34ea62e
authored
Dec 18, 2023
by
liufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化:设备列表,新增时异常情况的处理
parent
2edf0213
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+15
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
c34ea62e
...
...
@@ -51,6 +51,7 @@ import org.elasticsearch.index.query.QueryBuilders;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.elasticsearch.search.sort.SortOrder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -158,7 +159,20 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
checkEsData
(
record
);
}
}
catch
(
Exception
e
)
{
//删除Es数据
log
.
error
(
e
.
getMessage
(),
e
);
//删除数据库数据和ES数据
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
List
<
String
>
records
=
new
ArrayList
<>();
records
.
add
(
record
);
superviseInfoMapper
.
deleteDataAll
(
records
);
esEquipmentCategory
.
deleteById
(
record
);
}
ResponseModel
<
Object
>
response
=
new
ResponseModel
<>();
response
.
setDevMessage
(
e
.
getMessage
());
response
.
setResult
(
null
);
response
.
setMessage
(
"操作失败,请检查数据输入后重新提交"
);
response
.
setStatus
(
HttpStatus
.
BAD_REQUEST
.
value
());
return
response
;
}
return
ResponseHelper
.
buildResponse
(
record
);
}
...
...
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