Commit 9f8a0b9e2f9d443e366a833e5e05eaf918e9c8d9

Authored by 郑超
1 parent d94a2113

增加免审类型

src/main/java/com/cnlive/shenhe/api/VideosControllerApi.java
... ... @@ -122,7 +122,8 @@ public class VideosControllerApi {
122 122 shyVideos.setReceive(CommonConst.RECEIVE_BEFORE);
123 123 shyVideos.setReceive_user_id(null);
124 124 shyVideos.setUpdated_at(CommonUtils.getCurrentTime());
125   - videosService.getShenheType(shyVideos);//获取审核类型
  125 + //获取审核类型
  126 + videosService.getShenheType(shyVideos);
126 127 boolean YorN = videosService.updateshyVideos(shyVideos);
127 128 if (YorN == true) {
128 129 return new ResponseBean(ErrorEnum.SUCCESS);
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
1 1 package com.cnlive.shenhe.serviceImpl;
2 2  
3   -import com.alibaba.fastjson.JSON;
4 3 import com.alibaba.fastjson.JSONArray;
5 4 import com.alibaba.fastjson.JSONObject;
6 5 import com.cnlive.shenhe.bean.ErrorEnum;
7 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 11 import com.cnlive.shenhe.mapper.ShySitesMapper;
11 12 import com.cnlive.shenhe.mapper.ShyUsersMapper;
12 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 18 import com.github.pagehelper.PageHelper;
15 19 import com.github.pagehelper.PageInfo;
16   -
17   -
18 20 import org.apache.ibatis.session.RowBounds;
19 21 import org.slf4j.Logger;
20 22 import org.slf4j.LoggerFactory;
... ... @@ -25,7 +27,9 @@ import tk.mybatis.mapper.entity.Example;
25 27  
26 28 import java.sql.Timestamp;
27 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 35 * @Auther: chenhao
... ... @@ -109,7 +113,7 @@ public class VideosServiceImpl {
109 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 117 Example example = new Example(ShyVideos.class);
114 118 Example.Criteria criteria = example.createCriteria();
115 119 Example.Criteria criteria2 = example.createCriteria();
... ... @@ -147,11 +151,11 @@ public class VideosServiceImpl {
147 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 156 criteria.andEqualTo("updater", shen_auditor_id);
153 157 criteria2.andEqualTo("updater", shen_auditor_id);
154   - }else{
  158 + } else {
155 159 criteria.andEqualTo("auditor_id", shen_auditor_id);
156 160 criteria2.andEqualTo("auditor_id", shen_auditor_id);
157 161 }
... ... @@ -173,7 +177,7 @@ public class VideosServiceImpl {
173 177 if (CommonUtils.isNotNull(spid)) {
174 178 criteria.andEqualTo("spid", spid);
175 179 criteria2.andEqualTo("spid", spid);
176   - } else if(CommonUtils.isNotEmpty(sp_Id)) {
  180 + } else if (CommonUtils.isNotEmpty(sp_Id)) {
177 181 criteria.andEqualTo("spid", sp_Id);
178 182 criteria2.andEqualTo("spid", sp_Id);
179 183 }
... ... @@ -283,7 +287,7 @@ public class VideosServiceImpl {
283 287 * @param userId
284 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 291 Example example = new Example(ShyVideos.class);
288 292 Example.Criteria criteria = example.createCriteria();
289 293 Example.Criteria criteria2 = example.createCriteria();
... ... @@ -317,7 +321,7 @@ public class VideosServiceImpl {
317 321 criteria.andEqualTo("video_user_id", video_user_id);
318 322 }
319 323  
320   - if (source!=null) {
  324 + if (source != null) {
321 325 criteria.andEqualTo("source", source);
322 326 }
323 327  
... ... @@ -467,7 +471,14 @@ public class VideosServiceImpl {
467 471 //审核类型,1:免审,2:机审,3:人工审
468 472 Integer shenheType = 3;
469 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 483 shenheType = 1;
473 484 } else {
... ...