Commit 9f8a0b9e2f9d443e366a833e5e05eaf918e9c8d9

Authored by 郑超
1 parent d94a2113

增加免审类型

src/main/java/com/cnlive/shenhe/api/VideosControllerApi.java
@@ -122,7 +122,8 @@ public class VideosControllerApi { @@ -122,7 +122,8 @@ public class VideosControllerApi {
122 shyVideos.setReceive(CommonConst.RECEIVE_BEFORE); 122 shyVideos.setReceive(CommonConst.RECEIVE_BEFORE);
123 shyVideos.setReceive_user_id(null); 123 shyVideos.setReceive_user_id(null);
124 shyVideos.setUpdated_at(CommonUtils.getCurrentTime()); 124 shyVideos.setUpdated_at(CommonUtils.getCurrentTime());
125 - videosService.getShenheType(shyVideos);//获取审核类型 125 + //获取审核类型
  126 + videosService.getShenheType(shyVideos);
126 boolean YorN = videosService.updateshyVideos(shyVideos); 127 boolean YorN = videosService.updateshyVideos(shyVideos);
127 if (YorN == true) { 128 if (YorN == true) {
128 return new ResponseBean(ErrorEnum.SUCCESS); 129 return new ResponseBean(ErrorEnum.SUCCESS);
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
1 package com.cnlive.shenhe.serviceImpl; 1 package com.cnlive.shenhe.serviceImpl;
2 2
3 -import com.alibaba.fastjson.JSON;  
4 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
5 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
6 import com.cnlive.shenhe.bean.ErrorEnum; 5 import com.cnlive.shenhe.bean.ErrorEnum;
7 import com.cnlive.shenhe.bean.ResponseBean; 6 import com.cnlive.shenhe.bean.ResponseBean;
8 -import com.cnlive.shenhe.entity.*;  
9 -import com.cnlive.shenhe.job.VideosJob; 7 +import com.cnlive.shenhe.entity.ShyUsers;
  8 +import com.cnlive.shenhe.entity.ShyUsersfree;
  9 +import com.cnlive.shenhe.entity.ShyVideos;
  10 +import com.cnlive.shenhe.entity.ShyYidun;
10 import com.cnlive.shenhe.mapper.ShySitesMapper; 11 import com.cnlive.shenhe.mapper.ShySitesMapper;
11 import com.cnlive.shenhe.mapper.ShyUsersMapper; 12 import com.cnlive.shenhe.mapper.ShyUsersMapper;
12 import com.cnlive.shenhe.mapper.ShyVideosMapper; 13 import com.cnlive.shenhe.mapper.ShyVideosMapper;
13 -import com.cnlive.shenhe.utils.*; 14 +import com.cnlive.shenhe.utils.AuditPass;
  15 +import com.cnlive.shenhe.utils.CommonConst;
  16 +import com.cnlive.shenhe.utils.CommonUtils;
  17 +import com.cnlive.shenhe.utils.YiDunAntiFraudUtil;
14 import com.github.pagehelper.PageHelper; 18 import com.github.pagehelper.PageHelper;
15 import com.github.pagehelper.PageInfo; 19 import com.github.pagehelper.PageInfo;
16 -  
17 -  
18 import org.apache.ibatis.session.RowBounds; 20 import org.apache.ibatis.session.RowBounds;
19 import org.slf4j.Logger; 21 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory; 22 import org.slf4j.LoggerFactory;
@@ -25,7 +27,9 @@ import tk.mybatis.mapper.entity.Example; @@ -25,7 +27,9 @@ import tk.mybatis.mapper.entity.Example;
25 27
26 import java.sql.Timestamp; 28 import java.sql.Timestamp;
27 import java.text.ParseException; 29 import java.text.ParseException;
28 -import java.util.*; 30 +import java.util.Date;
  31 +import java.util.List;
  32 +import java.util.UUID;
29 33
30 /** 34 /**
31 * @Auther: chenhao 35 * @Auther: chenhao
@@ -109,7 +113,7 @@ public class VideosServiceImpl { @@ -109,7 +113,7 @@ public class VideosServiceImpl {
109 return shyVideosMapper.updateByPrimaryKey(shyVideos); 113 return shyVideosMapper.updateByPrimaryKey(shyVideos);
110 } 114 }
111 115
112 - public PageInfo<ShyVideos> getListContent(String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, Integer spid, String userId, String sp_Id,String source,String video_user_id,String shen_auditor_id,String video_id) { 116 + public PageInfo<ShyVideos> getListContent(String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, Integer spid, String userId, String sp_Id, String source, String video_user_id, String shen_auditor_id, String video_id) {
113 Example example = new Example(ShyVideos.class); 117 Example example = new Example(ShyVideos.class);
114 Example.Criteria criteria = example.createCriteria(); 118 Example.Criteria criteria = example.createCriteria();
115 Example.Criteria criteria2 = example.createCriteria(); 119 Example.Criteria criteria2 = example.createCriteria();
@@ -147,11 +151,11 @@ public class VideosServiceImpl { @@ -147,11 +151,11 @@ public class VideosServiceImpl {
147 criteria2.andEqualTo("video_id", video_id); 151 criteria2.andEqualTo("video_id", video_id);
148 } 152 }
149 153
150 - if(CommonUtils.isNotEmpty(shen_auditor_id)){  
151 - if("白名单".equals(shen_auditor_id)||"自动审核".equals(shen_auditor_id)){ 154 + if (CommonUtils.isNotEmpty(shen_auditor_id)) {
  155 + if ("白名单".equals(shen_auditor_id) || "自动审核".equals(shen_auditor_id)) {
152 criteria.andEqualTo("updater", shen_auditor_id); 156 criteria.andEqualTo("updater", shen_auditor_id);
153 criteria2.andEqualTo("updater", shen_auditor_id); 157 criteria2.andEqualTo("updater", shen_auditor_id);
154 - }else{ 158 + } else {
155 criteria.andEqualTo("auditor_id", shen_auditor_id); 159 criteria.andEqualTo("auditor_id", shen_auditor_id);
156 criteria2.andEqualTo("auditor_id", shen_auditor_id); 160 criteria2.andEqualTo("auditor_id", shen_auditor_id);
157 } 161 }
@@ -173,7 +177,7 @@ public class VideosServiceImpl { @@ -173,7 +177,7 @@ public class VideosServiceImpl {
173 if (CommonUtils.isNotNull(spid)) { 177 if (CommonUtils.isNotNull(spid)) {
174 criteria.andEqualTo("spid", spid); 178 criteria.andEqualTo("spid", spid);
175 criteria2.andEqualTo("spid", spid); 179 criteria2.andEqualTo("spid", spid);
176 - } else if(CommonUtils.isNotEmpty(sp_Id)) { 180 + } else if (CommonUtils.isNotEmpty(sp_Id)) {
177 criteria.andEqualTo("spid", sp_Id); 181 criteria.andEqualTo("spid", sp_Id);
178 criteria2.andEqualTo("spid", sp_Id); 182 criteria2.andEqualTo("spid", sp_Id);
179 } 183 }
@@ -283,7 +287,7 @@ public class VideosServiceImpl { @@ -283,7 +287,7 @@ public class VideosServiceImpl {
283 * @param userId 287 * @param userId
284 * @return 288 * @return
285 */ 289 */
286 - public List<ShyVideos> findByCondition(String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, String orderByClause, Integer spid, String userId,Integer source,String video_user_id) { 290 + public List<ShyVideos> findByCondition(String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, String orderByClause, Integer spid, String userId, Integer source, String video_user_id) {
287 Example example = new Example(ShyVideos.class); 291 Example example = new Example(ShyVideos.class);
288 Example.Criteria criteria = example.createCriteria(); 292 Example.Criteria criteria = example.createCriteria();
289 Example.Criteria criteria2 = example.createCriteria(); 293 Example.Criteria criteria2 = example.createCriteria();
@@ -317,7 +321,7 @@ public class VideosServiceImpl { @@ -317,7 +321,7 @@ public class VideosServiceImpl {
317 criteria.andEqualTo("video_user_id", video_user_id); 321 criteria.andEqualTo("video_user_id", video_user_id);
318 } 322 }
319 323
320 - if (source!=null) { 324 + if (source != null) {
321 criteria.andEqualTo("source", source); 325 criteria.andEqualTo("source", source);
322 } 326 }
323 327
@@ -467,7 +471,14 @@ public class VideosServiceImpl { @@ -467,7 +471,14 @@ public class VideosServiceImpl {
467 //审核类型,1:免审,2:机审,3:人工审 471 //审核类型,1:免审,2:机审,3:人工审
468 Integer shenheType = 3; 472 Integer shenheType = 3;
469 //如果当前sp是免审sp 473 //如果当前sp是免审sp
470 - if (sites.contains(shyVideo.getSpid()) || "1".equals(shyVideo.getSource()) || "9".equals(shyVideo.getSource()) || "8".equals(shyVideo.getSource()) || "29".equals(shyVideo.getSource()) || "30".equals(shyVideo.getSource()) || "31".equals(shyVideo.getSource()) || "36".equals(shyVideo.getSource()) || "38".equals(shyVideo.getSource()) || "39".equals(shyVideo.getSource())|| "40".equals(shyVideo.getSource())) { 474 + if (sites.contains(shyVideo.getSpid()) || "1".equals(shyVideo.getSource())
  475 + || "9".equals(shyVideo.getSource()) || "8".equals(shyVideo.getSource())
  476 + || "29".equals(shyVideo.getSource())
  477 + || "30".equals(shyVideo.getSource()) || "31".equals(shyVideo.getSource())
  478 + || "36".equals(shyVideo.getSource()) || "38".equals(shyVideo.getSource())
  479 + || "39".equals(shyVideo.getSource())
  480 + || "40".equals(shyVideo.getSource()) || "50".equals(shyVideo.getSource())
  481 + || "51".equals(shyVideo.getSource())) {
471 //免审 482 //免审
472 shenheType = 1; 483 shenheType = 1;
473 } else { 484 } else {