Commit 388af64231452b71a37be8e35d3ced36ab7e6463
Merge branch 'test' into dev
Showing
15 changed files
with
95 additions
and
68 deletions
src/main/java/com/cnlive/shenhe/controller/UsersController.java
| @@ -139,10 +139,10 @@ public class UsersController extends BaseController { | @@ -139,10 +139,10 @@ public class UsersController extends BaseController { | ||
| 139 | return "redirect:/users/login"; | 139 | return "redirect:/users/login"; |
| 140 | } | 140 | } |
| 141 | Integer spid = sessionUser.getSpid(); | 141 | Integer spid = sessionUser.getSpid(); |
| 142 | - usersDTO.setSp_id(spid); | ||
| 143 | - if (spid == 0) { | ||
| 144 | - usersDTO.setSp_id(null); | ||
| 145 | - } | 142 | + //usersDTO.setSp_id(usersDTO.getSp_id()); |
| 143 | + //if (spid == 0) { | ||
| 144 | + // usersDTO.setSp_id(null); | ||
| 145 | + //} | ||
| 146 | 146 | ||
| 147 | PageInfo<ShyUsers> usersPage = usersService.getPage(usersDTO); | 147 | PageInfo<ShyUsers> usersPage = usersService.getPage(usersDTO); |
| 148 | List<ShyUsers> list = usersPage.getList(); | 148 | List<ShyUsers> list = usersPage.getList(); |
src/main/java/com/cnlive/shenhe/job/VideosJob.java
| @@ -47,9 +47,9 @@ public class VideosJob { | @@ -47,9 +47,9 @@ public class VideosJob { | ||
| 47 | /** | 47 | /** |
| 48 | * 定时向易盾发送视频抽帧图片进行检测 | 48 | * 定时向易盾发送视频抽帧图片进行检测 |
| 49 | * 机审 、未审核 、抽帧完成 进行送审 | 49 | * 机审 、未审核 、抽帧完成 进行送审 |
| 50 | - * 每天10点到23点执行,每分钟一次 | 50 | + * 每天8点到23点执行,每分钟一次 |
| 51 | */ | 51 | */ |
| 52 | - @Scheduled(cron = "0 0/1 10-23 * * ? ") | 52 | + @Scheduled(cron = "0 0/1 8-23 * * ? ") |
| 53 | public void videofilter() { | 53 | public void videofilter() { |
| 54 | ShyVideos shyVideos = new ShyVideos(); | 54 | ShyVideos shyVideos = new ShyVideos(); |
| 55 | //审核类型为机审 | 55 | //审核类型为机审 |
src/main/java/com/cnlive/shenhe/job/TextJob.java renamed to src/main/java/com/cnlive/shenhe/utils/TextDetectionUtil.java
| 1 | -package com.cnlive.shenhe.job; | 1 | +package com.cnlive.shenhe.utils; |
| 2 | 2 | ||
| 3 | import com.alibaba.fastjson.JSONObject; | 3 | import com.alibaba.fastjson.JSONObject; |
| 4 | -import com.cnlive.shenhe.utils.YiDunAntiFraudUtil; | ||
| 5 | import lombok.extern.slf4j.Slf4j; | 4 | import lombok.extern.slf4j.Slf4j; |
| 6 | 5 | ||
| 7 | import java.io.*; | 6 | import java.io.*; |
| @@ -11,45 +10,59 @@ import java.io.*; | @@ -11,45 +10,59 @@ import java.io.*; | ||
| 11 | * @DateTime: 2022-06-27 10:30 | 10 | * @DateTime: 2022-06-27 10:30 |
| 12 | */ | 11 | */ |
| 13 | @Slf4j | 12 | @Slf4j |
| 14 | -public class TextJob { | ||
| 15 | - | ||
| 16 | - | 13 | +public class TextDetectionUtil { |
| 14 | + /** | ||
| 15 | + * 文本内容送审方法 | ||
| 16 | + * | ||
| 17 | + * @param args | ||
| 18 | + */ | ||
| 17 | public static void main(String[] args) { | 19 | public static void main(String[] args) { |
| 18 | - BufferedReader bufferedReader = null; | ||
| 19 | - BufferedWriter bufferedWriter = null; | ||
| 20 | - String type = null; | ||
| 21 | - String desc = null; | 20 | + // 输入文件地址 |
| 21 | + String fileReaderUrl = "C:\\Users\\Administrator\\Desktop\\待检测数据.txt"; | ||
| 22 | + // 输出文件地址 | ||
| 23 | + String fileWriterUrl = "C:\\Users\\Administrator\\Desktop\\通过数据.txt"; | ||
| 24 | + // 调用输入流方法 | ||
| 25 | + BufferedReader bufferedReader = FileReaderUrl(fileReaderUrl); | ||
| 26 | + // 调用输出流方法 | ||
| 27 | + BufferedWriter bufferedWriter = FileWriterUrl(fileWriterUrl); | ||
| 22 | try { | 28 | try { |
| 23 | - bufferedReader = new BufferedReader(new FileReader(new File("C:\\Users\\Administrator\\Desktop\\123.txt"))); | ||
| 24 | - bufferedWriter = new BufferedWriter(new BufferedWriter(new FileWriter(new File("C:\\Users\\Administrator\\Desktop\\通过数据.txt")))); | ||
| 25 | - boolean falg = true; | ||
| 26 | - while (falg) { | ||
| 27 | - if (falg = (bufferedReader.readLine()) != null ? true : false) { | ||
| 28 | - String txt = bufferedReader.readLine(); | ||
| 29 | - JSONObject textFilter = YiDunAntiFraudUtil.getTextFilter(txt); | ||
| 30 | - type = textFilter.getString("type"); | ||
| 31 | - desc = textFilter.getString("desc"); | 29 | + boolean flag = true; |
| 30 | + while (flag) { | ||
| 31 | + String textContent = bufferedReader.readLine(); | ||
| 32 | + if (flag = textContent != null ? true : false) { | ||
| 33 | + // 文本内容送审 | ||
| 34 | + JSONObject textFilter = YiDunAntiFraudUtil.getTextFilter(textContent); | ||
| 35 | + // 送审返回结果类型 | ||
| 36 | + String type = textFilter.getString("type"); | ||
| 37 | + // 送审返回结果内容 | ||
| 38 | + String desc = textFilter.getString("desc"); | ||
| 39 | + // 如果是通过的内容 输出到文件中 | ||
| 32 | if (type.equals("PASS")) { | 40 | if (type.equals("PASS")) { |
| 33 | - bufferedWriter.write(txt); | 41 | + // 输出(写)的操作 |
| 42 | + bufferedWriter.write(textContent); | ||
| 43 | + // 换行操作 | ||
| 34 | bufferedWriter.newLine(); | 44 | bufferedWriter.newLine(); |
| 35 | } | 45 | } |
| 36 | log.info("type:{}" + type); | 46 | log.info("type:{}" + type); |
| 37 | log.info("desc:{}" + desc); | 47 | log.info("desc:{}" + desc); |
| 38 | } | 48 | } |
| 39 | } | 49 | } |
| 40 | - | ||
| 41 | } catch (IOException e) { | 50 | } catch (IOException e) { |
| 42 | e.printStackTrace(); | 51 | e.printStackTrace(); |
| 43 | } finally { | 52 | } finally { |
| 53 | + // 如果输入流不为空 | ||
| 44 | if (bufferedReader != null) { | 54 | if (bufferedReader != null) { |
| 45 | try { | 55 | try { |
| 56 | + // 关闭输入流 | ||
| 46 | bufferedReader.close(); | 57 | bufferedReader.close(); |
| 47 | } catch (IOException e) { | 58 | } catch (IOException e) { |
| 48 | e.printStackTrace(); | 59 | e.printStackTrace(); |
| 49 | } | 60 | } |
| 50 | } | 61 | } |
| 62 | + // 如果输出流不为空 | ||
| 51 | if (bufferedWriter != null) { | 63 | if (bufferedWriter != null) { |
| 52 | try { | 64 | try { |
| 65 | + // 关闭输出流 | ||
| 53 | bufferedWriter.close(); | 66 | bufferedWriter.close(); |
| 54 | } catch (IOException e) { | 67 | } catch (IOException e) { |
| 55 | e.printStackTrace(); | 68 | e.printStackTrace(); |
| @@ -58,4 +71,35 @@ public class TextJob { | @@ -58,4 +71,35 @@ public class TextJob { | ||
| 58 | } | 71 | } |
| 59 | } | 72 | } |
| 60 | 73 | ||
| 74 | + /** | ||
| 75 | + * 创建文件输入流 | ||
| 76 | + * | ||
| 77 | + * @param fileReaderUrl | ||
| 78 | + * @return | ||
| 79 | + */ | ||
| 80 | + public static BufferedReader FileReaderUrl(String fileReaderUrl) { | ||
| 81 | + BufferedReader bufferedReader = null; | ||
| 82 | + try { | ||
| 83 | + bufferedReader = new BufferedReader(new FileReader(new File(fileReaderUrl))); | ||
| 84 | + } catch (FileNotFoundException e) { | ||
| 85 | + e.printStackTrace(); | ||
| 86 | + } | ||
| 87 | + return bufferedReader; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + /** | ||
| 91 | + * 创建文件输出流 | ||
| 92 | + * | ||
| 93 | + * @param fileWriterUrl | ||
| 94 | + * @return | ||
| 95 | + */ | ||
| 96 | + public static BufferedWriter FileWriterUrl(String fileWriterUrl) { | ||
| 97 | + BufferedWriter bufferedWriter = null; | ||
| 98 | + try { | ||
| 99 | + bufferedWriter = new BufferedWriter(new FileWriter(new File(fileWriterUrl))); | ||
| 100 | + } catch (IOException e) { | ||
| 101 | + e.printStackTrace(); | ||
| 102 | + } | ||
| 103 | + return bufferedWriter; | ||
| 104 | + } | ||
| 61 | } | 105 | } |
src/main/resources/templates/page/activity.html
| @@ -118,9 +118,9 @@ | @@ -118,9 +118,9 @@ | ||
| 118 | <div class="col-sm-7" style="padding: 0;"> | 118 | <div class="col-sm-7" style="padding: 0;"> |
| 119 | <select class="form-control" id="exempt_from_trial_query" | 119 | <select class="form-control" id="exempt_from_trial_query" |
| 120 | name="exempt_from_trial"> | 120 | name="exempt_from_trial"> |
| 121 | - <option value="">--全部审免类型--</option> | ||
| 122 | - <option value="0" name="未审核" th:selected="${exempt_from_trial ==0}" >未审免</option> | ||
| 123 | - <option value="1" name="已经审核" th:selected="${exempt_from_trial ==1}" >已经审免</option> | 121 | + <option value="">--全部免审类型--</option> |
| 122 | + <option value="0" name="非免审" th:selected="${exempt_from_trial ==0}" >非免审</option> | ||
| 123 | + <option value="1" name="免审" th:selected="${exempt_from_trial ==1}" >免审</option> | ||
| 124 | </select> | 124 | </select> |
| 125 | </div> | 125 | </div> |
| 126 | </div> | 126 | </div> |
| @@ -189,7 +189,7 @@ | @@ -189,7 +189,7 @@ | ||
| 189 | </td> | 189 | </td> |
| 190 | 190 | ||
| 191 | <td style="text-align: center; width: 12%;" | 191 | <td style="text-align: center; width: 12%;" |
| 192 | - th:text="${ShyActivity.exempt_from_trial} == 1 ? 已经免审 : 未免审"> | 192 | + th:text="${ShyActivity.exempt_from_trial} == 1 ? 免审 : 非免审"> |
| 193 | 2016-08-03 | 193 | 2016-08-03 |
| 194 | 14:27:17 | 194 | 14:27:17 |
| 195 | </td> | 195 | </td> |
| @@ -306,8 +306,8 @@ | @@ -306,8 +306,8 @@ | ||
| 306 | 306 | ||
| 307 | <select class="" id="exempt_from_trial" name="exempt_from_trial"> | 307 | <select class="" id="exempt_from_trial" name="exempt_from_trial"> |
| 308 | <option value="" name="-选择审核类型-">-选择审核类型-</option> | 308 | <option value="" name="-选择审核类型-">-选择审核类型-</option> |
| 309 | - <option value="0" name="未审核">未审免</option> | ||
| 310 | - <option value="1" name="已经审核">已经审免</option> | 309 | + <option value="0" name="非免审">非免审</option> |
| 310 | + <option value="1" name="免审">免审</option> | ||
| 311 | </select> | 311 | </select> |
| 312 | </div> | 312 | </div> |
| 313 | </div> | 313 | </div> |
src/main/resources/templates/page/audio.html
| @@ -71,8 +71,8 @@ | @@ -71,8 +71,8 @@ | ||
| 71 | th:onclick="'javascript:yishen()'" value="1">我的已审 | 71 | th:onclick="'javascript:yishen()'" value="1">我的已审 |
| 72 | </button> | 72 | </button> |
| 73 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | 73 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" |
| 74 | - onclick="openOrClose('forms')">查询 | ||
| 75 | - <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | 74 | + onclick="openOrClose('forms')"> |
| 75 | + <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span> | ||
| 76 | </button> | 76 | </button> |
| 77 | </div> | 77 | </div> |
| 78 | <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;"> | 78 | <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;"> |
src/main/resources/templates/page/channel.html
| @@ -78,8 +78,8 @@ | @@ -78,8 +78,8 @@ | ||
| 78 | </button> | 78 | </button> |
| 79 | </div> | 79 | </div> |
| 80 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | 80 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" |
| 81 | - onclick="openOrClose('forms')">高级查询 | ||
| 82 | - <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | 81 | + onclick="openOrClose('forms')"> |
| 82 | + <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span> | ||
| 83 | </button> | 83 | </button> |
| 84 | </div> | 84 | </div> |
| 85 | </div> | 85 | </div> |
src/main/resources/templates/page/comment.html
| @@ -81,8 +81,8 @@ | @@ -81,8 +81,8 @@ | ||
| 81 | </button> | 81 | </button> |
| 82 | </div> | 82 | </div> |
| 83 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | 83 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" |
| 84 | - onclick="openOrClose('forms')">高级查询 | ||
| 85 | - <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | 84 | + onclick="openOrClose('forms')"> |
| 85 | + <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span> | ||
| 86 | </button> | 86 | </button> |
| 87 | </div> | 87 | </div> |
| 88 | </div> | 88 | </div> |
src/main/resources/templates/page/comment2.html
| @@ -78,8 +78,8 @@ | @@ -78,8 +78,8 @@ | ||
| 78 | </button> | 78 | </button> |
| 79 | </div> | 79 | </div> |
| 80 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | 80 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" |
| 81 | - onclick="openOrClose('forms')">高级查询 | ||
| 82 | - <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | 81 | + onclick="openOrClose('forms')"> |
| 82 | + <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span> | ||
| 83 | </button> | 83 | </button> |
| 84 | </div> | 84 | </div> |
| 85 | </div> | 85 | </div> |
src/main/resources/templates/page/content.html
| @@ -71,8 +71,8 @@ | @@ -71,8 +71,8 @@ | ||
| 71 | th:onclick="'javascript:yishen()'" value="1">我的已审 | 71 | th:onclick="'javascript:yishen()'" value="1">我的已审 |
| 72 | </button> | 72 | </button> |
| 73 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | 73 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" |
| 74 | - onclick="openOrClose('forms')">查询 | ||
| 75 | - <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | 74 | + onclick="openOrClose('forms')"> |
| 75 | + <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span> | ||
| 76 | </button> | 76 | </button> |
| 77 | </div> | 77 | </div> |
| 78 | <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;"> | 78 | <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;"> |
src/main/resources/templates/page/live.html
| @@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
| 71 | <button type="button" | 71 | <button type="button" |
| 72 | class="btn btn-primary btn-sm margin-r-5" id="query" | 72 | class="btn btn-primary btn-sm margin-r-5" id="query" |
| 73 | onclick="openOrClose('forms')"> | 73 | onclick="openOrClose('forms')"> |
| 74 | - 查询 <span id="a_up">▼</span><span id="a_down">▲</span> | 74 | + <span id="a_up">展开▼</span><span id="a_down">收起▲</span> |
| 75 | </button> | 75 | </button> |
| 76 | </div> | 76 | </div> |
| 77 | 77 |
src/main/resources/templates/page/liveApply.html
| @@ -70,8 +70,8 @@ | @@ -70,8 +70,8 @@ | ||
| 70 | th:onclick="'javascript:yishen()'" value="1">我的已审 | 70 | th:onclick="'javascript:yishen()'" value="1">我的已审 |
| 71 | </button> | 71 | </button> |
| 72 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | 72 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" |
| 73 | - onclick="openOrClose('forms')">查询 | ||
| 74 | - <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | 73 | + onclick="openOrClose('forms')"> |
| 74 | + <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span> | ||
| 75 | </button> | 75 | </button> |
| 76 | </div> | 76 | </div> |
| 77 | <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;"> | 77 | <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;"> |
src/main/resources/templates/page/notspeak.html
| @@ -107,8 +107,8 @@ input:checked + .slider:before { | @@ -107,8 +107,8 @@ input:checked + .slider:before { | ||
| 107 | <!-- </button> --> | 107 | <!-- </button> --> |
| 108 | </div> | 108 | </div> |
| 109 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | 109 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" |
| 110 | - onclick="openOrClose('forms')">高级查询 | ||
| 111 | - <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | 110 | + onclick="openOrClose('forms')"> |
| 111 | + <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span> | ||
| 112 | </button> | 112 | </button> |
| 113 | </div> | 113 | </div> |
| 114 | </div> | 114 | </div> |
src/main/resources/templates/page/topic.html
| @@ -78,8 +78,8 @@ | @@ -78,8 +78,8 @@ | ||
| 78 | </button> | 78 | </button> |
| 79 | </div> | 79 | </div> |
| 80 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | 80 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" |
| 81 | - onclick="openOrClose('forms')">高级查询 | ||
| 82 | - <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | 81 | + onclick="openOrClose('forms')"> |
| 82 | + <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span> | ||
| 83 | </button> | 83 | </button> |
| 84 | </div> | 84 | </div> |
| 85 | </div> | 85 | </div> |
src/main/resources/templates/page/users.html
| @@ -29,23 +29,6 @@ | @@ -29,23 +29,6 @@ | ||
| 29 | <div class="col-xs-12"> | 29 | <div class="col-xs-12"> |
| 30 | <div class="box box-info"> | 30 | <div class="box box-info"> |
| 31 | <div class="box-body"> | 31 | <div class="box-body"> |
| 32 | -<!-- <div class="bootstrap-table"> --> | ||
| 33 | -<!-- <div class="fixed-table-toolbar"> --> | ||
| 34 | -<!-- <div class="bs-bars pull-left"> --> | ||
| 35 | -<!-- <div id="toolbar" class="btn-group"> --> | ||
| 36 | -<!-- </div> --> | ||
| 37 | -<!-- </div> --> | ||
| 38 | -<!-- <div class="columns columns-right btn-group pull-right"> --> | ||
| 39 | -<!-- <button class="btn btn-default" type="button" name="refresh" title="搜索" id="users_query">搜索</button> --> | ||
| 40 | -<!-- </div> --> | ||
| 41 | -<!-- </div> --> | ||
| 42 | -<!-- <div class="pull-right search"> --> | ||
| 43 | -<!-- <input class="form-control" type="text" placeholder="搜索" id="keyword" name="keyword" th:value="${param.keyword}"> --> | ||
| 44 | -<!-- </div> --> | ||
| 45 | -<!-- <div class="pull-right search"> --> | ||
| 46 | -<!-- <input class="form-control" type="text" placeholder="搜索" id="keyword" name="keyword" th:value="${param.keyword}"> --> | ||
| 47 | -<!-- </div> --> | ||
| 48 | -<!-- </div> --> | ||
| 49 | 32 | ||
| 50 | <div class="btn-group margin-bottom " style="padding: 0;width: 100%;float: left;"> | 33 | <div class="btn-group margin-bottom " style="padding: 0;width: 100%;float: left;"> |
| 51 | <div class="col-md-5" style="padding: 0;width: 20%;"> | 34 | <div class="col-md-5" style="padding: 0;width: 20%;"> |
src/main/resources/templates/page/video.html
| @@ -71,8 +71,8 @@ | @@ -71,8 +71,8 @@ | ||
| 71 | th:onclick="'javascript:yishen()'" value="1">我的已审 | 71 | th:onclick="'javascript:yishen()'" value="1">我的已审 |
| 72 | </button> | 72 | </button> |
| 73 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | 73 | <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" |
| 74 | - onclick="openOrClose('forms')">查询 | ||
| 75 | - <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | 74 | + onclick="openOrClose('forms')"> |
| 75 | + <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span> | ||
| 76 | </button> | 76 | </button> |
| 77 | </div> | 77 | </div> |
| 78 | <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;"> | 78 | <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;"> |