Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
HaiNaAIFaceToFace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
霍传世
HaiNaAIFaceToFace
Commits
0cc8defc
Commit
0cc8defc
authored
Jan 24, 2025
by
霍传世
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HaiNa---接口
parent
4eb49a48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
src/main/java/com/yuda/hainafacetofaceai/controller/CallBackApiController.java
...a/hainafacetofaceai/controller/CallBackApiController.java
+17
-11
No files found.
src/main/java/com/yuda/hainafacetofaceai/controller/CallBackApiController.java
View file @
0cc8defc
...
...
@@ -3,6 +3,7 @@ package com.yuda.hainafacetofaceai.controller;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -19,18 +20,23 @@ public class CallBackApiController {
private
JdbcTemplate
DBOperator
;
@PostMapping
(
"/interviewResultReceiver"
)
public
void
interviewResultsReceiver
(
@RequestBody
String
data
){
JSONObject
result
=
JSONObject
.
parseObject
(
data
);
String
candidateConnectCode
=
result
.
getString
(
"candidateConnectCode"
);
log
.
info
(
"候选人链接码"
+
candidateConnectCode
+
"面试过程回调"
+
data
);
String
event
=
result
.
getString
(
"event"
);
if
(
event
.
equals
(
"aiExamCandidateReviewV2"
)){
try
{
DBOperator
.
update
(
"update candidate_exam set result_back = 1,interview_results = ? where candidate_connect_code = ?"
,
new
Object
[]{
data
,
candidateConnectCode
});
log
.
info
(
"候选人链接码"
+
candidateConnectCode
+
"面试结果入库完成"
);
}
catch
(
Exception
e
){
log
.
info
(
"候选人链接码"
+
candidateConnectCode
+
"面试结果入库回调出错"
);
public
ResponseEntity
interviewResultsReceiver
(
@RequestBody
String
data
){
try
{
JSONObject
result
=
JSONObject
.
parseObject
(
data
);
String
candidateConnectCode
=
result
.
getString
(
"candidateConnectCode"
);
log
.
info
(
"候选人链接码"
+
candidateConnectCode
+
"面试过程回调"
+
data
);
String
event
=
result
.
getString
(
"event"
);
if
(
event
.
equals
(
"aiExamCandidateReviewV2"
)){
try
{
DBOperator
.
update
(
"update candidate_exam set result_back = 1,interview_results = ? where candidate_connect_code = ?"
,
new
Object
[]{
data
,
candidateConnectCode
});
log
.
info
(
"候选人链接码"
+
candidateConnectCode
+
"面试结果入库完成"
);
}
catch
(
Exception
e
){
log
.
info
(
"候选人链接码"
+
candidateConnectCode
+
"面试结果入库回调出错"
);
}
}
}
catch
(
Exception
e
){
return
ResponseEntity
.
status
(
10000
).
body
(
"错误的回调"
);
}
return
ResponseEntity
.
status
(
0
).
body
(
"收到回调"
);
}
}
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