Commit 0d3de2e7a2cd105ebd83ecc45e52fa5a4d39bedc

Authored by 周伟鹏
1 parent 49670c93

update

src/main/java/com/cnlive/shenhe/api/AvsampleCallBackControllerApi.java
... ... @@ -38,8 +38,10 @@ public class AvsampleCallBackControllerApi {
38 38 */
39 39 @PostMapping("/callback")
40 40 @ResponseBody
41   - public ResponseBean callback(@RequestBody JSONObject json) {
  41 + public JSONObject callback(@RequestBody JSONObject json) {
42 42 logger.info("抽帧回调请求。。。。json=="+json.toJSONString());
  43 + JSONObject result = new JSONObject();
  44 + result.put("code",1);
43 45 String taskId = json.getString("taskId");
44 46 if(CommonUtils.isNotEmpty(taskId)){
45 47 ShyVideos shyVideo = new ShyVideos();
... ... @@ -55,11 +57,12 @@ public class AvsampleCallBackControllerApi {
55 57 video.setAvsample(CommonConst.AVSAMPLE_FAIL);
56 58 }
57 59 video.setAvsample_msg(json.toJSONString());
58   - videosService.updateshyVideos(video);
  60 + boolean success = videosService.updateshyVideos(video);
  61 + if(!success){
  62 + result.put("code",-1);
  63 + }
59 64 }
60   -
61   - return new ResponseBean();
62 65 }
63   - return new ResponseBean(ErrorEnum.ERROR);
  66 + return result;
64 67 }
65 68 }
... ...