Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
event_data_handle
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 58d587e3
authored
Nov 27, 2019
by
杜广伟
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
删除引起异常的错误代码;
1 parent
69360dfa
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
11 deletions
src/main/java/com/viontech/Application.java
src/main/java/com/viontech/feginService/MessagePushAPIHandler.java
src/main/java/com/viontech/service/impl/behavior/BehaviorAuditServiceImpl.java
src/main/resources/application.yml
src/main/java/com/viontech/Application.java
View file @
58d587e
package
com
.
viontech
;
import
com.google.gson.Gson
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.converter.json.GsonHttpMessageConverter
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.web.cors.CorsConfiguration
;
import
org.springframework.web.cors.UrlBasedCorsConfigurationSource
;
import
org.springframework.web.filter.CorsFilter
;
import
java.util.ArrayList
;
import
java.util.List
;
@SpringBootApplication
(
scanBasePackages
=
{
"com.viontech.*"
})
@Configuration
...
...
@@ -33,7 +27,7 @@ public class Application {
*@Date:2019/11/26
*@Author:dugw
*/
@Bean
/*
@Bean
public GsonHttpMessageConverter gsonHttpMessageConverter(Gson gson) {
GsonHttpMessageConverter converter = new GsonHttpMessageConverter();
converter.setGson(gson);
...
...
@@ -44,7 +38,7 @@ public class Application {
converter.setSupportedMediaTypes(supportedMediaTypes);
}
return converter;
}
}
*/
@Configuration
public
class
CorsConfig
{
...
...
src/main/java/com/viontech/feginService/MessagePushAPIHandler.java
View file @
58d587e
...
...
@@ -22,7 +22,8 @@ public interface MessagePushAPIHandler {
* @return
*/
@Headers
({
"Content-Type: application/json"
,
"Accept: application/json"
})
@PostMapping
(
value
=
"/testCode/reciveMessage"
)
@PostMapping
(
value
=
"/external/vionvisionvideo/receiveVideoEvent"
)
// @PostMapping(value = "/testCode/reciveMessage")
Map
auditMessagePush
(
@RequestBody
Map
params
);
}
src/main/java/com/viontech/service/impl/behavior/BehaviorAuditServiceImpl.java
View file @
58d587e
...
...
@@ -87,13 +87,14 @@ public class BehaviorAuditServiceImpl implements IBehaviorAuditService {
if
(
archiveEntityList
.
size
()
==
1
){
return
JsonMessageUtil
.
getSuccessJsonMsg
(
"事件审核未通过操作成功"
);
}
//更新归档和时间的对应关系
String
archiveIds
=
archiveEntityList
.
stream
().
map
(
model
->
model
.
getArchive_unid
().
toString
())
.
collect
(
Collectors
.
joining
(
","
));
BehaviorArchiveEntity
firstArchiveData
=
archiveEntityList
.
get
(
0
);
Integer
firstArchiveId
=
firstArchiveData
.
getArchive_unid
();
String
updateArchive2EventRel
=
"UPDATE tb_event_archive_rel SET archive_unid = "
+
firstArchiveId
+
" where archive_unid in ("
+
archiveIds
+
")"
;
jdbcTemplate
.
update
(
updateArchive2EventRel
);
//除了第一条归档数据外,删除其他
archiveEntityList
.
remove
(
0
);
eventArchiveRepository
.
deleteAll
(
archiveEntityList
);
}
...
...
src/main/resources/application.yml
View file @
58d587e
...
...
@@ -44,5 +44,5 @@ spring:
pub-sub-domain
:
true
message
:
audit
:
isOpen
:
fals
e
isOpen
:
tru
e
httpUrl
:
127.0.0.1:16060
\ No newline at end of file
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