Commit 4b97da2a57fbf1eb1fd227e7f852249a7134f751
1 parent
cb0064a7
音频审核增加免审功能
Showing
3 changed files
with
30 additions
and
1 deletions
src/main/java/com/cnlive/shenhe/api/AudioControllerApi.java
| @@ -70,7 +70,7 @@ public class AudioControllerApi { | @@ -70,7 +70,7 @@ public class AudioControllerApi { | ||
| 70 | shyAudio.setCreateTime(new Date()); | 70 | shyAudio.setCreateTime(new Date()); |
| 71 | shyAudio.setState(0); | 71 | shyAudio.setState(0); |
| 72 | //目前直接设置为人工审 | 72 | //目前直接设置为人工审 |
| 73 | - shyAudio.setShenhe_type(3); | 73 | + audioService.getShenheType(shyAudio); |
| 74 | shyAudio.setReceive(0); | 74 | shyAudio.setReceive(0); |
| 75 | audioService.importAudioMsg(shyAudio); | 75 | audioService.importAudioMsg(shyAudio); |
| 76 | } | 76 | } |
src/main/java/com/cnlive/shenhe/serviceImpl/AudioServiceImpl.java
| @@ -5,6 +5,7 @@ import com.cnlive.shenhe.bean.ErrorEnum; | @@ -5,6 +5,7 @@ import com.cnlive.shenhe.bean.ErrorEnum; | ||
| 5 | import com.cnlive.shenhe.bean.ResponseBean; | 5 | import com.cnlive.shenhe.bean.ResponseBean; |
| 6 | import com.cnlive.shenhe.entity.ShyAudio; | 6 | import com.cnlive.shenhe.entity.ShyAudio; |
| 7 | import com.cnlive.shenhe.entity.ShyUsers; | 7 | import com.cnlive.shenhe.entity.ShyUsers; |
| 8 | +import com.cnlive.shenhe.entity.ShyUsersfree; | ||
| 8 | import com.cnlive.shenhe.entity.ShyVideos; | 9 | import com.cnlive.shenhe.entity.ShyVideos; |
| 9 | import com.cnlive.shenhe.mapper.ShyAudioMapper; | 10 | import com.cnlive.shenhe.mapper.ShyAudioMapper; |
| 10 | import com.cnlive.shenhe.mapper.ShyUsersMapper; | 11 | import com.cnlive.shenhe.mapper.ShyUsersMapper; |
| @@ -45,6 +46,9 @@ public class AudioServiceImpl { | @@ -45,6 +46,9 @@ public class AudioServiceImpl { | ||
| 45 | @Autowired | 46 | @Autowired |
| 46 | ShyUsersMapper shyUsersMapper; | 47 | ShyUsersMapper shyUsersMapper; |
| 47 | 48 | ||
| 49 | + @Autowired | ||
| 50 | + SitesServiceImpl sitesService; | ||
| 51 | + | ||
| 48 | public ShyAudio getAudioMsg(String audioId) { | 52 | public ShyAudio getAudioMsg(String audioId) { |
| 49 | return shyAudioMapper.getAudioMsg(audioId); | 53 | return shyAudioMapper.getAudioMsg(audioId); |
| 50 | } | 54 | } |
| @@ -295,4 +299,25 @@ public class AudioServiceImpl { | @@ -295,4 +299,25 @@ public class AudioServiceImpl { | ||
| 295 | List<ShyAudio> shyAudioList = shyAudioMapper.selectByExample(example); | 299 | List<ShyAudio> shyAudioList = shyAudioMapper.selectByExample(example); |
| 296 | return shyAudioList; | 300 | return shyAudioList; |
| 297 | } | 301 | } |
| 302 | + | ||
| 303 | + | ||
| 304 | + /** | ||
| 305 | + * 根据sp、栏目、用户id来判断审核类型 | ||
| 306 | + * | ||
| 307 | + * @param shyAudio | ||
| 308 | + */ | ||
| 309 | + public void getShenheType(ShyAudio shyAudio) { | ||
| 310 | + //获取点播免审sp | ||
| 311 | + List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_AUDIO); | ||
| 312 | + logger.info("sites" + sites.toString()); | ||
| 313 | + //初始化一个审核状态 | ||
| 314 | + //审核类型 1-免审 2-机审 3-人工审 | ||
| 315 | + Integer shenheType = 3; | ||
| 316 | + //如果当前sp是免审sp | ||
| 317 | + if (sites.contains(shyAudio.getSpId())) { | ||
| 318 | + //免审 | ||
| 319 | + shenheType = 1; | ||
| 320 | + } | ||
| 321 | + shyAudio.setShenhe_type(shenheType); | ||
| 322 | + } | ||
| 298 | } | 323 | } |
src/main/java/com/cnlive/shenhe/utils/CommonConst.java
| @@ -112,6 +112,10 @@ public class CommonConst { | @@ -112,6 +112,10 @@ public class CommonConst { | ||
| 112 | * 白名单业务:话题申请 | 112 | * 白名单业务:话题申请 |
| 113 | */ | 113 | */ |
| 114 | public static Integer BUSINESS_TOPIC = 6; | 114 | public static Integer BUSINESS_TOPIC = 6; |
| 115 | + /** | ||
| 116 | + * 白名单业务:音频 | ||
| 117 | + */ | ||
| 118 | + public static Integer BUSINESS_AUDIO = 7; | ||
| 115 | 119 | ||
| 116 | //白名单设置 | 120 | //白名单设置 |
| 117 | public static JSONObject BUSINESS = JSONObject.parseObject("{\"1\":\"点播业务\",\"2\":\"评论业务\",\"3\":\"图文业务\",\"4\":\"频道业务\",\"5\":\"直播申请业务\",\"6\":\"话题业务\",\"7\":\"音频业务\"}"); | 121 | public static JSONObject BUSINESS = JSONObject.parseObject("{\"1\":\"点播业务\",\"2\":\"评论业务\",\"3\":\"图文业务\",\"4\":\"频道业务\",\"5\":\"直播申请业务\",\"6\":\"话题业务\",\"7\":\"音频业务\"}"); |