Commit cc05efba43145fe22b0fd7cc88779ee616bdfbd3
1 parent
c254c060
修改正式环境菜单栏
Showing
2 changed files
with
51 additions
and
7 deletions
src/main/java/com/cnlive/shenhe/utils/AntiFraudUtil.java
| @@ -26,12 +26,16 @@ public class AntiFraudUtil { | @@ -26,12 +26,16 @@ public class AntiFraudUtil { | ||
| 26 | private static final String REQUEST_URL_VIDEOSTREAM = "http://video-api.fengkongcloud.com/v2/saas/anti_fraud/videostream"; | 26 | private static final String REQUEST_URL_VIDEOSTREAM = "http://video-api.fengkongcloud.com/v2/saas/anti_fraud/videostream"; |
| 27 | private static final String RESPONSE_URL_VIDEOSTREAM = "http://video-api.fengkongcloud.com/v2/saas/anti_fraud/query_videostream"; | 27 | private static final String RESPONSE_URL_VIDEOSTREAM = "http://video-api.fengkongcloud.com/v2/saas/anti_fraud/query_videostream"; |
| 28 | private static final String FINISH_URL_VIDEOSTREAM = "http://video-api.fengkongcloud.com/v2/saas/anti_fraud/finish_videostream"; | 28 | private static final String FINISH_URL_VIDEOSTREAM = "http://video-api.fengkongcloud.com/v2/saas/anti_fraud/finish_videostream"; |
| 29 | + | ||
| 30 | + | ||
| 31 | + private static final String Contents_list = "https://www.fengkongcloud.com/ApiV2/ListService/lists"; | ||
| 32 | + | ||
| 29 | public static void main(String[] args) { | 33 | public static void main(String[] args) { |
| 30 | - String jsonArray = "[{\"imageUrl\":\"http://ffyl.ys2.cnliveimg.com/223/img/2018/0820/ff80808164a7163a016555c9a6ac0208/000002.jpg?imageView2/1/w/704/h/396\"},\n" + | ||
| 31 | - "{\"imageUrl\":\"https://wjj.ys1.cnliveimg.com/769/img/2018/0129/fitnessPhotos.jpg\"},{\"imageUrl\":\"http://ffyl.ys2.cnliveimg.com/223/img/2018/0820/ff80808164a7163a016555c9a6ac0208/000002.jpg?imageView2/1/w/704/h/396\"},{\"imageUrl\":\"http://yweb3.cnliveimg.com/828/img/2018/0802/180802161358328_692.jpg\"},{\"imageUrl\":\"http://ffyl.ys2.cnliveimg.com/223/img/2018/0820/ff80808164a7163a016555c9a6ac0208/000002.jpg?imageView2/1/w/704/h/396\"},\n" + | ||
| 32 | - "{\"imageUrl\":\"http://yweb3.cnliveimg.com/828/img/2018/0802/180802161358328_692.jpg\"},{\"imageUrl\":\"http://ffyl.ys2.cnliveimg.com/223/img/2018/0820/ff80808164a7163a016555c9a6ac0208/000002.jpg?imageView2/1/w/704/h/396\"},{\"imageUrl\":\"http://yweb3.cnliveimg.com/828/img/2018/0802/180802161358328_692.jpg\"},{\"imageUrl\":\"http://yweb3.cnliveimg.com/828/img/2018/0802/180802161358328_692.jpg\"}]"; | ||
| 33 | - UUID uuid = UUID.randomUUID(); | ||
| 34 | - String btId = uuid.toString(); | 34 | +// String jsonArray = "[{\"imageUrl\":\"http://ffyl.ys2.cnliveimg.com/223/img/2018/0820/ff80808164a7163a016555c9a6ac0208/000002.jpg?imageView2/1/w/704/h/396\"},\n" + |
| 35 | +// "{\"imageUrl\":\"https://wjj.ys1.cnliveimg.com/769/img/2018/0129/fitnessPhotos.jpg\"},{\"imageUrl\":\"http://ffyl.ys2.cnliveimg.com/223/img/2018/0820/ff80808164a7163a016555c9a6ac0208/000002.jpg?imageView2/1/w/704/h/396\"},{\"imageUrl\":\"http://yweb3.cnliveimg.com/828/img/2018/0802/180802161358328_692.jpg\"},{\"imageUrl\":\"http://ffyl.ys2.cnliveimg.com/223/img/2018/0820/ff80808164a7163a016555c9a6ac0208/000002.jpg?imageView2/1/w/704/h/396\"},\n" + | ||
| 36 | +// "{\"imageUrl\":\"http://yweb3.cnliveimg.com/828/img/2018/0802/180802161358328_692.jpg\"},{\"imageUrl\":\"http://ffyl.ys2.cnliveimg.com/223/img/2018/0820/ff80808164a7163a016555c9a6ac0208/000002.jpg?imageView2/1/w/704/h/396\"},{\"imageUrl\":\"http://yweb3.cnliveimg.com/828/img/2018/0802/180802161358328_692.jpg\"},{\"imageUrl\":\"http://yweb3.cnliveimg.com/828/img/2018/0802/180802161358328_692.jpg\"}]"; | ||
| 37 | +// UUID uuid = UUID.randomUUID(); | ||
| 38 | +// String btId = uuid.toString(); | ||
| 35 | 39 | ||
| 36 | // System.out.println("文本:"+AntiFraudUtil.filterText("0000001", "王八蛋", "DYNAMIC_USER") + "---"); | 40 | // System.out.println("文本:"+AntiFraudUtil.filterText("0000001", "王八蛋", "DYNAMIC_USER") + "---"); |
| 37 | // System.out.println(AntiFraudUtil.filterArticle("000111","3g.huabian.com/api/hz0227/show/2225530.html",null)); | 41 | // System.out.println(AntiFraudUtil.filterArticle("000111","3g.huabian.com/api/hz0227/show/2225530.html",null)); |
| @@ -39,6 +43,13 @@ public class AntiFraudUtil { | @@ -39,6 +43,13 @@ public class AntiFraudUtil { | ||
| 39 | //System.out.println("视频:"+AntiFraudUtil.filterVideo("http://wjj.ys1.cnliveimg.com/testVideo/test1.mp4",btId,null) + "---"); | 43 | //System.out.println("视频:"+AntiFraudUtil.filterVideo("http://wjj.ys1.cnliveimg.com/testVideo/test1.mp4",btId,null) + "---"); |
| 40 | //queryVideoResult("02b649b7-3451-403e-abd0-592302cec2a0"); | 44 | //queryVideoResult("02b649b7-3451-403e-abd0-592302cec2a0"); |
| 41 | 45 | ||
| 46 | +try { | ||
| 47 | +// System.out.println(addBlackContents("2222")); | ||
| 48 | +} catch (Exception e) { | ||
| 49 | + e.printStackTrace(); | ||
| 50 | +} | ||
| 51 | +//System.out.println(contentsList()); | ||
| 52 | +//System.out.println(blackContentsList()); | ||
| 42 | } | 53 | } |
| 43 | 54 | ||
| 44 | /** | 55 | /** |
| @@ -411,4 +422,37 @@ public class AntiFraudUtil { | @@ -411,4 +422,37 @@ public class AntiFraudUtil { | ||
| 411 | } | 422 | } |
| 412 | return imgs; | 423 | return imgs; |
| 413 | } | 424 | } |
| 425 | + /** | ||
| 426 | + * 名单列表查询 | ||
| 427 | + * @return | ||
| 428 | + */ | ||
| 429 | + private static String contentsList() { | ||
| 430 | + | ||
| 431 | + String url=Contents_list+"?accessKey="+ACCESSKEY+"&type=1&serviceId=POST_TEXT"; | ||
| 432 | + return HttpClientUtils.get(url); | ||
| 433 | + } | ||
| 434 | + /** | ||
| 435 | + * 名单内容列表查询(敏感词黑名单) | ||
| 436 | + * @return | ||
| 437 | + */ | ||
| 438 | + private static String blackContentsList() { | ||
| 439 | + | ||
| 440 | + String url="https://www.fengkongcloud.com/ApiV2/ListService/lists/0f85d5aab7f59a6070c403c57aefcc0a/contents?accessKey="+ACCESSKEY; | ||
| 441 | + return HttpClientUtils.get(url); | ||
| 442 | + } | ||
| 443 | + | ||
| 444 | + /** | ||
| 445 | + * 新增名单内容(敏感词黑名单) | ||
| 446 | + * @param contents | ||
| 447 | + * @return | ||
| 448 | + * @throws Exception | ||
| 449 | + */ | ||
| 450 | + private static JSONObject addBlackContents(String contents) throws Exception { | ||
| 451 | + | ||
| 452 | + JSONObject data = new JSONObject(); | ||
| 453 | + String[] contents1=new String[]{contents}; | ||
| 454 | + data.put("contents", contents1); | ||
| 455 | + | ||
| 456 | + return HttpClientUtils.httpPost("https://www.fengkongcloud.com/ApiV2/ListService/lists/0f85d5aab7f59a6070c403c57aefcc0a/contents?accessKey="+ACCESSKEY, data,false); | ||
| 457 | + } | ||
| 414 | } | 458 | } |
src/main/resources/templates/common/frame.html
| @@ -61,9 +61,9 @@ line-height: 2em; margin: 0 auto;font-size: 2em" th:text="${session.sessionUser. | @@ -61,9 +61,9 @@ line-height: 2em; margin: 0 auto;font-size: 2em" th:text="${session.sessionUser. | ||
| 61 | </a> | 61 | </a> |
| 62 | <ul class="treeview-menu"> | 62 | <ul class="treeview-menu"> |
| 63 | <li class="active"><a href="/videos/page?state=0&receive=0" id="/videos/page">点播审核</a></li> | 63 | <li class="active"><a href="/videos/page?state=0&receive=0" id="/videos/page">点播审核</a></li> |
| 64 | -<!-- <li><a href="/live/page?shenhe_state=0" id="/live/page"> 直播审核</a></li> --> | 64 | + <li><a href="/live/page?shenhe_state=0" id="/live/page"> 直播审核</a></li> |
| 65 | <li><a href="/comments/page?state=0&receive=0" id="/comments/page"> 评论审核</a></li> | 65 | <li><a href="/comments/page?state=0&receive=0" id="/comments/page"> 评论审核</a></li> |
| 66 | -<!-- <li><a href="/content/page?receive_status=0" id="/content/page"> 图文审核</a></li> --> | 66 | + <li><a href="/content/page?receive_status=0" id="/content/page"> 图文审核</a></li> |
| 67 | </ul> | 67 | </ul> |
| 68 | </li> | 68 | </li> |
| 69 | <li class="treeview" th:if="${session.sessionUser.spid==0 or session.sessionUser.master}"> | 69 | <li class="treeview" th:if="${session.sessionUser.spid==0 or session.sessionUser.master}"> |