Commit 0cc8defc authored by 霍传世's avatar 霍传世

HaiNa---接口

parent 4eb49a48
......@@ -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,7 +20,8 @@ public class CallBackApiController {
private JdbcTemplate DBOperator;
@PostMapping("/interviewResultReceiver")
public void interviewResultsReceiver(@RequestBody String data){
public ResponseEntity interviewResultsReceiver(@RequestBody String data){
try{
JSONObject result = JSONObject.parseObject(data);
String candidateConnectCode = result.getString("candidateConnectCode");
log.info("候选人链接码"+candidateConnectCode+"面试过程回调"+data);
......@@ -32,5 +34,9 @@ public class CallBackApiController {
log.info("候选人链接码"+candidateConnectCode+"面试结果入库回调出错");
}
}
}catch (Exception e){
return ResponseEntity.status(10000).body("错误的回调");
}
return ResponseEntity.status(0).body("收到回调");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment