Commit aa437cf06161ed06172e440015a926ed5dd1f688
1 parent
f1a77727
数美审核报错处理
Showing
1 changed file
with
14 additions
and
4 deletions
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
| @@ -306,9 +306,19 @@ public class VideosServiceImpl { | @@ -306,9 +306,19 @@ public class VideosServiceImpl { | ||
| 306 | list.add(map); | 306 | list.add(map); |
| 307 | } | 307 | } |
| 308 | String jsonList = JSONArray.toJSONString(list); | 308 | String jsonList = JSONArray.toJSONString(list); |
| 309 | - //调用数美接口 | ||
| 310 | - JSONObject result = AntiFraudUtil.filterImg(shyVideos.getTask_id(),jsonList,CommonConst.DYNAMIC_USER); | ||
| 311 | - String type=result.getString("type"); | 309 | + JSONObject result = null;//数美返回结果 |
| 310 | + String type="";//数美返回结果的类型 | ||
| 311 | + String desc="";//数美失败结果的详情 | ||
| 312 | + try{ | ||
| 313 | + //调用数美接口 | ||
| 314 | + result = AntiFraudUtil.filterImg(shyVideos.getTask_id(),jsonList,CommonConst.DYNAMIC_USER); | ||
| 315 | + type=result.getString("type"); | ||
| 316 | + desc=result.getString("desc");//数美失败结果的详情 | ||
| 317 | + }catch(Exception e){ | ||
| 318 | + type=CommonConst.REJECT;//报错就给一个拒绝状态 | ||
| 319 | + desc="数美审核报错了"; | ||
| 320 | + shyVideos.setMsg(desc); | ||
| 321 | + } | ||
| 312 | if(type.toLowerCase().equals(CommonConst.PASS)){//数美通过 | 322 | if(type.toLowerCase().equals(CommonConst.PASS)){//数美通过 |
| 313 | //修改点播云视频状态 | 323 | //修改点播云视频状态 |
| 314 | videosService.updateDianboAndShenhe(shyVideos,3); | 324 | videosService.updateDianboAndShenhe(shyVideos,3); |
| @@ -317,7 +327,7 @@ public class VideosServiceImpl { | @@ -317,7 +327,7 @@ public class VideosServiceImpl { | ||
| 317 | } | 327 | } |
| 318 | ShyVideofilter videofilter=new ShyVideofilter(); | 328 | ShyVideofilter videofilter=new ShyVideofilter(); |
| 319 | videofilter.setChannel(channel); | 329 | videofilter.setChannel(channel); |
| 320 | - videofilter.setDesc_msg(result.getString("desc")); | 330 | + videofilter.setDesc_msg(desc); |
| 321 | videofilter.setResult_type(type); | 331 | videofilter.setResult_type(type); |
| 322 | videofilter.setToken_id(shyVideos.getTask_id()); | 332 | videofilter.setToken_id(shyVideos.getTask_id()); |
| 323 | videofilter.setVideos_id(cid); | 333 | videofilter.setVideos_id(cid); |