#237 违规视频使用通知

Otwarty
wangyunpeng chce scalić 5 commity/ów z Server/20250912-wyp-illegalNotice do Server/master
24 zmienionych plików z 2513 dodań i 65 usunięć
  1. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/component/TouLiuHttpClient.java
  2. 59 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformNoticeController.java
  3. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformIllegalMsgMapper.java
  4. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformIllegalVideoMapper.java
  5. 14 2
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java
  6. 0 12
      api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformDatastatJob.java
  7. 172 0
      api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformIllegalVideoJob.java
  8. 27 21
      api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformVideoJob.java
  9. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/PageParam.java
  10. 9 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/NoticeListParam.java
  11. 9 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/NoticeReadParam.java
  12. 101 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalMsg.java
  13. 711 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalMsgExample.java
  14. 79 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalVideo.java
  15. 531 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalVideoExample.java
  16. 12 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/PlanIllegalVideoDTO.java
  17. 23 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/NoticeItemVO.java
  18. 17 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformNoticeService.java
  19. 86 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformNoticeServiceImpl.java
  20. 261 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformIllegalMsgMapper.xml
  21. 276 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformIllegalVideoMapper.xml
  22. 30 2
      api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml
  23. 25 23
      api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml
  24. 2 2
      common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/MessageAttachmentServiceImpl.java

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/component/TouLiuHttpClient.java

@@ -44,7 +44,7 @@ public class TouLiuHttpClient {
                 "\"putCarrierId\":\"" + putCarrierId + "\"," +
                 "\"path\":\"" + "pages/category" + "\"," +
                 "\"requestParam\":{" +
-                "\"jumpPage\":\"" + "pages/user-videos?id=" + videoId + "&fromGzh=1&rootShareId=" + uuid + "&shareId=" + uuid + "&rootSourceId=[rootSourceId]" + "\"" +
+                "\"jumpPage\":\"" + "pages/user-videos?fromGzh=1&rootShareId=" + uuid + "&id=" + videoId + "&shareId=" + uuid + "&rootSourceId=[rootSourceId]" + "\"" +
                 "}" +
                 "}";
         try {

+ 59 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformNoticeController.java

@@ -0,0 +1,59 @@
+package com.tzld.piaoquan.api.controller.contentplatform;
+
+import com.tzld.piaoquan.api.annotation.JwtIgnore;
+import com.tzld.piaoquan.api.job.contentplatform.ContentPlatformIllegalVideoJob;
+import com.tzld.piaoquan.api.model.param.contentplatform.NoticeListParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.NoticeReadParam;
+import com.tzld.piaoquan.api.model.vo.contentplatform.NoticeItemVO;
+import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformNoticeService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/contentPlatform/notice")
+@CrossOrigin(origins = "*")
+public class ContentPlatformNoticeController {
+
+    @Autowired
+    ContentPlatformNoticeService noticeService;
+
+    @Autowired
+    private ContentPlatformIllegalVideoJob job;
+
+    @ApiOperation(value = "通知列表")
+    @PostMapping("/list")
+    public CommonResponse<Page<NoticeItemVO>> noticeList(@RequestBody NoticeListParam param) {
+        return CommonResponse.success(noticeService.noticeList(param));
+    }
+
+    @ApiOperation(value = "获取未读通知数量")
+    @PostMapping("/getNotReadCount")
+    public CommonResponse<Long> getNotReadCount() {
+        return CommonResponse.success(noticeService.getNotReadCount());
+    }
+
+    @ApiOperation(value = "通知已读")
+    @PostMapping("/read")
+    public CommonResponse<Void> noticeRead(@RequestBody NoticeReadParam param) {
+        noticeService.noticeRead(param);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "一键全部已读")
+    @PostMapping("/readAll")
+    public CommonResponse<Void> noticeReadAll() {
+        noticeService.noticeReadAll();
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "检查违规视频发送通知", hidden = true)
+    @JwtIgnore
+    @GetMapping("/job/checkContentPlatformIllegalVideoJob")
+    public CommonResponse<Void> checkContentPlatformIllegalVideoJob(String dateStr) {
+        job.checkContentPlatformIllegalVideoJob(dateStr);
+        return CommonResponse.success();
+    }
+}

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformIllegalMsgMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.api.dao.mapper.contentplatform;
+
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsgExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface ContentPlatformIllegalMsgMapper {
+    long countByExample(ContentPlatformIllegalMsgExample example);
+
+    int deleteByExample(ContentPlatformIllegalMsgExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(ContentPlatformIllegalMsg record);
+
+    int insertSelective(ContentPlatformIllegalMsg record);
+
+    List<ContentPlatformIllegalMsg> selectByExample(ContentPlatformIllegalMsgExample example);
+
+    ContentPlatformIllegalMsg selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") ContentPlatformIllegalMsg record, @Param("example") ContentPlatformIllegalMsgExample example);
+
+    int updateByExample(@Param("record") ContentPlatformIllegalMsg record, @Param("example") ContentPlatformIllegalMsgExample example);
+
+    int updateByPrimaryKeySelective(ContentPlatformIllegalMsg record);
+
+    int updateByPrimaryKey(ContentPlatformIllegalMsg record);
+}

+ 36 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformIllegalVideoMapper.java

@@ -0,0 +1,36 @@
+package com.tzld.piaoquan.api.dao.mapper.contentplatform;
+
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideo;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideoExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface ContentPlatformIllegalVideoMapper {
+    long countByExample(ContentPlatformIllegalVideoExample example);
+
+    int deleteByExample(ContentPlatformIllegalVideoExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(ContentPlatformIllegalVideo record);
+
+    int insertSelective(ContentPlatformIllegalVideo record);
+
+    List<ContentPlatformIllegalVideo> selectByExampleWithBLOBs(ContentPlatformIllegalVideoExample example);
+
+    List<ContentPlatformIllegalVideo> selectByExample(ContentPlatformIllegalVideoExample example);
+
+    ContentPlatformIllegalVideo selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") ContentPlatformIllegalVideo record, @Param("example") ContentPlatformIllegalVideoExample example);
+
+    int updateByExampleWithBLOBs(@Param("record") ContentPlatformIllegalVideo record, @Param("example") ContentPlatformIllegalVideoExample example);
+
+    int updateByExample(@Param("record") ContentPlatformIllegalVideo record, @Param("example") ContentPlatformIllegalVideoExample example);
+
+    int updateByPrimaryKeySelective(ContentPlatformIllegalVideo record);
+
+    int updateByPrimaryKeyWithBLOBs(ContentPlatformIllegalVideo record);
+
+    int updateByPrimaryKey(ContentPlatformIllegalVideo record);
+}

+ 14 - 2
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java

@@ -64,6 +64,8 @@ public interface ContentPlatformPlanMapperExt {
 
     void batchInsertContentPlatformVideo(@Param("records") List<ContentPlatformVideo> saveList);
 
+    void batchInsertContentPlatformIllegalVideo(@Param("records") List<ContentPlatformIllegalVideo> saveList);
+
     void batchInsertContentPlatformVideoAgg(@Param("records") List<ContentPlatformVideoAgg> saveList);
 
     int getQwPlanCount(@Param("param") QwPlanListParam param,
@@ -80,9 +82,15 @@ public interface ContentPlatformPlanMapperExt {
 
     List<ContentPlatformGzhPlanVideo> getGzhPlanVideoListByCooperateAccountId(@Param("ghId") String ghId);
 
-    void updateVideoStatus(@Param("videoId") Long videoId, @Param("status") Integer status, @Param("now") Long now);
+    void updateVideoStatusWithOldStatus(@Param("videoId") Long videoId,
+                                        @Param("status") Integer status,
+                                        @Param("oldStatus") Integer oldStatus,
+                                        @Param("now") Long now);
 
-    void updateVideoAggStatus(@Param("videoId") Long videoId, @Param("status") Integer status, @Param("now") Long now);
+    void updateVideoAggStatusWithOldStatus(@Param("videoId") Long videoId,
+                                           @Param("status") Integer status,
+                                           @Param("oldStatus") Integer oldStatus,
+                                           @Param("now") Long now);
 
     List<ContentPlatformVideoAgg> getVideoAggList(@Param("dtList") List<String> dtList);
 
@@ -101,4 +109,8 @@ public interface ContentPlatformPlanMapperExt {
     void batchInsertContentPlatformVideoDatastatAgg(@Param("records") List<ContentPlatformVideoDataStatAgg> saveAggList);
 
     void updateOtherVideoStatus(@Param("dt") String dt, @Param("videoIdList") List<Long> videoIdList, @Param("now") Long now);
+
+    List<PlanIllegalVideoDTO> getGzhPlanIllegalVideoList(@Param("videoId") Long videoId);
+
+    List<PlanIllegalVideoDTO> getQwPlanIllegalVideoList(@Param("videoId") Long videoId);
 }

+ 0 - 12
api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformDatastatJob.java

@@ -567,18 +567,6 @@ public class ContentPlatformDatastatJob {
         return gzhAccountMapper.selectByExample(example);
     }
 
-    private long getGzhDatastatCount(String dt) {
-        ContentPlatformGzhDataStatExample example = new ContentPlatformGzhDataStatExample();
-        example.createCriteria().andDateStrEqualTo(dt);
-        return gzhDataStatMapper.countByExample(example);
-    }
-
-    private long getFwhDatastatCount(String dt) {
-        ContentPlatformFwhDataStatExample example = new ContentPlatformFwhDataStatExample();
-        example.createCriteria().andDateStrEqualTo(dt);
-        return fwhDataStatMapper.countByExample(example);
-    }
-
     private List<ContentPlatformQwDataStat> getQwDatastatCount(String dt) {
         ContentPlatformQwDataStatExample example = new ContentPlatformQwDataStatExample();
         example.createCriteria().andDateStrEqualTo(dt);

+ 172 - 0
api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformIllegalVideoJob.java

@@ -0,0 +1,172 @@
+package com.tzld.piaoquan.api.job.contentplatform;
+
+import com.aliyun.odps.data.Record;
+import com.tzld.piaoquan.api.common.enums.contentplatform.ContentPlatformGzhPlanTypeEnum;
+import com.tzld.piaoquan.api.common.enums.contentplatform.QwPlanTypeEnum;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformIllegalMsgMapper;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformIllegalVideoMapper;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformPlanMapperExt;
+import com.tzld.piaoquan.api.model.po.contentplatform.*;
+import com.tzld.piaoquan.growth.common.utils.DateUtil;
+import com.tzld.piaoquan.growth.common.utils.OdpsUtil;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Component
+public class ContentPlatformIllegalVideoJob {
+
+    @Resource
+    private ContentPlatformIllegalVideoMapper illegalVideoMapper;
+    @Resource
+    private ContentPlatformIllegalMsgMapper illegalMsgMapper;
+    @Resource
+    private ContentPlatformPlanMapperExt planMapperExt;
+
+    @XxlJob("checkContentPlatformIllegalVideoJob")
+    public ReturnT<String> checkContentPlatformIllegalVideoJob(String param) {
+        String dtMin = DateUtil.getBeforeDayDateString(1, "yyyyMMdd") + "000000";
+        if (StringUtils.isNotBlank(param)) {
+            dtMin = param;
+        }
+        String sql = String.format("select dt, content, title from loghubods.wxgzh_message_log_per5min where dt > %s and title like '%%封禁%%';", dtMin);
+        List<Record> dataList = OdpsUtil.getOdpsData(sql);
+        Long now = System.currentTimeMillis();
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            List<ContentPlatformIllegalVideo> saveList = new ArrayList<>();
+            for (Record record : dataList) {
+                ContentPlatformIllegalVideo item = new ContentPlatformIllegalVideo();
+                Long dt = Long.parseLong((String) record.get(0));
+                String content = (String) record.get(1);
+                String title = (String) record.get(2);
+                item.setDateStr(String.valueOf(dt));
+                String videoId = getVideoIdFromContent(content);
+                if (Objects.isNull(videoId)) {
+                    continue;
+                }
+                item.setVideoId(Long.parseLong(videoId));
+                item.setContent(content);
+                item.setTitle(title);
+                item.setCreateTimestamp(now);
+                saveList.add(item);
+            }
+            List<Long> videoIdList = saveList.stream().map(ContentPlatformIllegalVideo::getVideoId).collect(Collectors.toList());
+            List<ContentPlatformIllegalVideo> existIllegalVideo = getIllegalVideoList(videoIdList);
+            List<Long> existVideoIdList = existIllegalVideo.stream().map(ContentPlatformIllegalVideo::getVideoId).collect(Collectors.toList());
+            List<ContentPlatformIllegalVideo> filterList = saveList.stream().filter(item -> !existVideoIdList.contains(item.getVideoId())).collect(Collectors.toList());
+            // save
+            if (CollectionUtils.isNotEmpty(filterList)) {
+                planMapperExt.batchInsertContentPlatformIllegalVideo(filterList);
+            }
+        }
+        // 发送违规通知
+        sendIllegalVideoNotify(dtMin);
+
+        return ReturnT.SUCCESS;
+    }
+
+    private void sendIllegalVideoNotify(String dtMin) {
+        List<ContentPlatformIllegalVideo> illegalVideoList = getIllegalVideoListByDt(dtMin);
+        if (CollectionUtils.isEmpty(illegalVideoList)) {
+            return;
+        }
+        for (ContentPlatformIllegalVideo item : illegalVideoList) {
+            // 公众号-自动回复、公众号-服务号推送、公众号-公众号推送、企微-社群、企微-自动回复
+            List<PlanIllegalVideoDTO> gzhPlanIllegalVideoList = planMapperExt.getGzhPlanIllegalVideoList(item.getVideoId());
+            List<PlanIllegalVideoDTO> qwPlanIllegalVideoList = planMapperExt.getQwPlanIllegalVideoList(item.getVideoId());
+            List<PlanIllegalVideoDTO> allPlanIllegalVideoList = new ArrayList<>();
+            allPlanIllegalVideoList.addAll(gzhPlanIllegalVideoList);
+            allPlanIllegalVideoList.addAll(qwPlanIllegalVideoList);
+            if (CollectionUtils.isEmpty(allPlanIllegalVideoList)) {
+                continue;
+            }
+            Map<Long, Map<Long, List<PlanIllegalVideoDTO>>> accountVideoPlanMap = allPlanIllegalVideoList.stream()
+                    .collect(Collectors.groupingBy(PlanIllegalVideoDTO::getAccountId, Collectors.groupingBy(PlanIllegalVideoDTO::getVideoId)));
+            for (Map.Entry<Long, Map<Long, List<PlanIllegalVideoDTO>>> accountEntry : accountVideoPlanMap.entrySet()) {
+                Long accountId = accountEntry.getKey();
+                Map<Long, List<PlanIllegalVideoDTO>> videoPlanMap = accountEntry.getValue();
+                for (Map.Entry<Long, List<PlanIllegalVideoDTO>> videoEntry : videoPlanMap.entrySet()) {
+                    Long videoId = videoEntry.getKey();
+                    List<PlanIllegalVideoDTO> planList = videoEntry.getValue();
+                    // 发送通知
+                    sendNotifyMsg(accountId, videoId, planList);
+                }
+            }
+        }
+    }
+
+    private void sendNotifyMsg(Long accountId, Long videoId, List<PlanIllegalVideoDTO> planList) {
+        ContentPlatformIllegalMsg existMsg = getIllegalMsg(accountId, videoId);
+        if (Objects.nonNull(existMsg)) {
+            return;
+        }
+        Set<String> businessTypeList = new HashSet<>();
+        for (PlanIllegalVideoDTO plan : planList) {
+            String channel = plan.getChannel();
+            if (StringUtils.equals(channel, "公众号")) {
+                // 公众号-自动回复、公众号-服务号推送、公众号-公众号推送
+                ContentPlatformGzhPlanTypeEnum gzhPlanTypeEnum = ContentPlatformGzhPlanTypeEnum.from(plan.getType());
+                businessTypeList.add("“" + channel + "-" + gzhPlanTypeEnum.getDescription() + "”");
+            } else if (StringUtils.equals(channel, "企微")) {
+                // 企微-社群、企微-自动回复
+                QwPlanTypeEnum qwPlanTypeEnum = QwPlanTypeEnum.from(plan.getType());
+                businessTypeList.add("“" + channel + "-" + qwPlanTypeEnum.getDescription() + "”");
+            }
+        }
+        String businessType = String.join("、", businessTypeList);
+        Long now = System.currentTimeMillis();
+        ContentPlatformIllegalMsg illegalMsg = new ContentPlatformIllegalMsg();
+        illegalMsg.setAccountId(accountId);
+        illegalMsg.setVideoId(videoId);
+        illegalMsg.setTitle(planList.get(0).getTitle());
+        illegalMsg.setBusinessType(businessType);
+        illegalMsg.setStatus(0);
+        illegalMsg.setCreateTimestamp(now);
+        illegalMsg.setUpdateTimestamp(now);
+        illegalMsgMapper.insertSelective(illegalMsg);
+    }
+
+    private ContentPlatformIllegalMsg getIllegalMsg(Long accountId, Long videoId) {
+        ContentPlatformIllegalMsgExample example = new ContentPlatformIllegalMsgExample();
+        example.createCriteria().andAccountIdEqualTo(accountId).andVideoIdEqualTo(videoId);
+        List<ContentPlatformIllegalMsg> list = illegalMsgMapper.selectByExample(example);
+        return CollectionUtils.isNotEmpty(list) ? list.get(0) : null;
+    }
+
+    private List<ContentPlatformIllegalVideo> getIllegalVideoListByDt(String dtMin) {
+        ContentPlatformIllegalVideoExample example = new ContentPlatformIllegalVideoExample();
+        example.createCriteria().andDateStrGreaterThan(dtMin);
+        return illegalVideoMapper.selectByExample(example);
+    }
+
+    private List<ContentPlatformIllegalVideo> getIllegalVideoList(List<Long> videoIdList) {
+        ContentPlatformIllegalVideoExample example = new ContentPlatformIllegalVideoExample();
+        example.createCriteria().andVideoIdIn(videoIdList);
+        return illegalVideoMapper.selectByExample(example);
+    }
+
+
+    public static String getVideoIdFromContent(String content) {
+        if (content == null || content.isEmpty()) {
+            return null;
+        }
+        // 匹配 "id=数字" 部分
+        Pattern pattern = Pattern.compile("id%3D(\\d+)");
+        Matcher matcher = pattern.matcher(content);
+        if (matcher.find()) {
+            return matcher.group(1);
+        }
+        return null;
+    }
+
+}

+ 27 - 21
api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformVideoJob.java

@@ -2,10 +2,7 @@ package com.tzld.piaoquan.api.job.contentplatform;
 
 import com.aliyun.odps.data.Record;
 import com.google.common.collect.Lists;
-import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformVideoAggMapper;
-import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformVideoDataStatAggMapper;
-import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformVideoDataStatMapper;
-import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformVideoMapper;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.*;
 import com.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformPlanMapperExt;
 import com.tzld.piaoquan.api.model.po.contentplatform.*;
 import com.tzld.piaoquan.api.util.CdnUtil;
@@ -44,7 +41,7 @@ public class ContentPlatformVideoJob {
     private ContentPlatformVideoDataStatMapper videoDataStatMapper;
 
     @Autowired
-    private ContentPlatformVideoDataStatAggMapper videoDataStatAggMapper;
+    private ContentPlatformIllegalVideoMapper illegalVideoMapper;
 
     @Autowired
     private MessageAttachmentService messageAttachmentService;
@@ -100,6 +97,11 @@ public class ContentPlatformVideoJob {
                 // save
                 if (CollectionUtils.isNotEmpty(saveList)) {
                     List<ContentPlatformVideo> videoList = getVideoList(dt);
+                    List<ContentPlatformIllegalVideo> illegalVideoList = getAllIllegalVideoList();
+                    List<Long> illegalVideoIds = illegalVideoList.stream().map(ContentPlatformIllegalVideo::getVideoId).collect(Collectors.toList());
+                    if (CollectionUtils.isNotEmpty(illegalVideoIds)) {
+                        saveList = saveList.stream().filter(item -> !illegalVideoIds.contains(item.getVideoId())).collect(Collectors.toList());
+                    }
                     if (CollectionUtils.isNotEmpty(videoList)) {
                         List<Long> existVideoIds = videoList.stream().map(ContentPlatformVideo::getVideoId).collect(Collectors.toList());
                         List<Long> videoIdList = saveList.stream().map(ContentPlatformVideo::getVideoId).collect(Collectors.toList());
@@ -156,18 +158,17 @@ public class ContentPlatformVideoJob {
         return ReturnT.SUCCESS;
     }
 
+    private List<ContentPlatformIllegalVideo> getAllIllegalVideoList() {
+        ContentPlatformIllegalVideoExample example = new ContentPlatformIllegalVideoExample();
+        return illegalVideoMapper.selectByExample(example);
+    }
+
     private List<ContentPlatformVideo> getVideoNullCover() {
         ContentPlatformVideoExample example = new ContentPlatformVideoExample();
         example.createCriteria().andCoverIsNull();
         return videoMapper.selectByExample(example);
     }
 
-    private long getVideoCount(String dt) {
-        ContentPlatformVideoExample example = new ContentPlatformVideoExample();
-        example.createCriteria().andDtEqualTo(dt);
-        return videoMapper.countByExample(example);
-    }
-
     private List<ContentPlatformVideo> getVideoList(String dt) {
         ContentPlatformVideoExample example = new ContentPlatformVideoExample();
         example.createCriteria().andDtEqualTo(dt);
@@ -195,17 +196,28 @@ public class ContentPlatformVideoJob {
                 VideoDetail videoDetail = videoDetailMap.get(video.getVideoId());
                 if (videoDetail == null
                         || videoDetail.getAuditStatus() != 5) {
-                    planMapperExt.updateVideoStatus(video.getVideoId(), 0, now);
-                    planMapperExt.updateVideoAggStatus(video.getVideoId(), 0, now);
+                    updateVideoStatusWithOldStatus(video.getVideoId(), 0, 1, now);
                 } else if (videoDetail.getRecommendStatus() == -6 && video.getStatus() == 0) {
-                    planMapperExt.updateVideoStatus(video.getVideoId(), 1, now);
-                    planMapperExt.updateVideoAggStatus(video.getVideoId(), 1, now);
+                    updateVideoStatusWithOldStatus(video.getVideoId(), 1, 0, now);
                 }
             }
         }
+        // 检查视频是否违规
+        List<ContentPlatformIllegalVideo> illegalVideoList = getAllIllegalVideoList();
+        List<Long> illegalVideoIds = illegalVideoList.stream().map(ContentPlatformIllegalVideo::getVideoId).collect(Collectors.toList());
+        if (CollectionUtils.isNotEmpty(illegalVideoIds)) {
+            for (Long illegalVideoId : illegalVideoIds) {
+                updateVideoStatusWithOldStatus(illegalVideoId, 0, 1, now);
+            }
+        }
         return ReturnT.SUCCESS;
     }
 
+    private void updateVideoStatusWithOldStatus(Long videoId, Integer status, Integer oldStatus, Long now) {
+        planMapperExt.updateVideoStatusWithOldStatus(videoId, status, oldStatus, now);
+        planMapperExt.updateVideoAggStatusWithOldStatus(videoId, status, oldStatus, now);
+    }
+
     private List<ContentPlatformVideoAgg> getVideoListByDt(String dt) {
         ContentPlatformVideoAggExample example = new ContentPlatformVideoAggExample();
         example.createCriteria().andDtEqualTo(dt);
@@ -261,12 +273,6 @@ public class ContentPlatformVideoJob {
         return ReturnT.SUCCESS;
     }
 
-    private long getVideoGroupScoreCount(String dt) {
-        ContentPlatformVideoDataStatExample example = new ContentPlatformVideoDataStatExample();
-        example.createCriteria().andDtEqualTo(dt);
-        return videoDataStatMapper.countByExample(example);
-    }
-
     private List<ContentPlatformVideoDataStatAgg> buildVideoDataStatAggList(String aggDt, List<String> dtList) {
         Long now = System.currentTimeMillis();
         List<ContentPlatformVideoDataStat> dataStatList = getVideoDatastatList(dtList);

+ 2 - 2
api-module/src/main/java/com/tzld/piaoquan/api/model/param/PageParam.java

@@ -12,8 +12,8 @@ import lombok.Setter;
 public class PageParam {
 
     @ApiModelProperty(value = "页码")
-    private Integer pageNum;
+    private Integer pageNum = 1;
     @ApiModelProperty(value = "每页个数")
-    private Integer pageSize;
+    private Integer pageSize = 20;
 
 }

+ 9 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/NoticeListParam.java

@@ -0,0 +1,9 @@
+package com.tzld.piaoquan.api.model.param.contentplatform;
+
+
+import com.tzld.piaoquan.api.model.param.PageParam;
+import lombok.Data;
+
+@Data
+public class NoticeListParam extends PageParam {
+}

+ 9 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/NoticeReadParam.java

@@ -0,0 +1,9 @@
+package com.tzld.piaoquan.api.model.param.contentplatform;
+
+
+import lombok.Data;
+
+@Data
+public class NoticeReadParam {
+    private Long id;
+}

+ 101 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalMsg.java

@@ -0,0 +1,101 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+public class ContentPlatformIllegalMsg {
+    private Long id;
+
+    private Long accountId;
+
+    private Long videoId;
+
+    private String title;
+
+    private String businessType;
+
+    private Integer status;
+
+    private Long createTimestamp;
+
+    private Long updateTimestamp;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public Long getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Long videoId) {
+        this.videoId = videoId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getBusinessType() {
+        return businessType;
+    }
+
+    public void setBusinessType(String businessType) {
+        this.businessType = businessType;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    public Long getUpdateTimestamp() {
+        return updateTimestamp;
+    }
+
+    public void setUpdateTimestamp(Long updateTimestamp) {
+        this.updateTimestamp = updateTimestamp;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", accountId=").append(accountId);
+        sb.append(", videoId=").append(videoId);
+        sb.append(", title=").append(title);
+        sb.append(", businessType=").append(businessType);
+        sb.append(", status=").append(status);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append(", updateTimestamp=").append(updateTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 711 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalMsgExample.java

@@ -0,0 +1,711 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContentPlatformIllegalMsgExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ContentPlatformIllegalMsgExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNull() {
+            addCriterion("account_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNotNull() {
+            addCriterion("account_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdEqualTo(Long value) {
+            addCriterion("account_id =", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotEqualTo(Long value) {
+            addCriterion("account_id <>", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThan(Long value) {
+            addCriterion("account_id >", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("account_id >=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThan(Long value) {
+            addCriterion("account_id <", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThanOrEqualTo(Long value) {
+            addCriterion("account_id <=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIn(List<Long> values) {
+            addCriterion("account_id in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotIn(List<Long> values) {
+            addCriterion("account_id not in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdBetween(Long value1, Long value2) {
+            addCriterion("account_id between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotBetween(Long value1, Long value2) {
+            addCriterion("account_id not between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNull() {
+            addCriterion("video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNotNull() {
+            addCriterion("video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdEqualTo(Long value) {
+            addCriterion("video_id =", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotEqualTo(Long value) {
+            addCriterion("video_id <>", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThan(Long value) {
+            addCriterion("video_id >", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("video_id >=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThan(Long value) {
+            addCriterion("video_id <", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThanOrEqualTo(Long value) {
+            addCriterion("video_id <=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIn(List<Long> values) {
+            addCriterion("video_id in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotIn(List<Long> values) {
+            addCriterion("video_id not in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdBetween(Long value1, Long value2) {
+            addCriterion("video_id between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotBetween(Long value1, Long value2) {
+            addCriterion("video_id not between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeIsNull() {
+            addCriterion("business_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeIsNotNull() {
+            addCriterion("business_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeEqualTo(String value) {
+            addCriterion("business_type =", value, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeNotEqualTo(String value) {
+            addCriterion("business_type <>", value, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeGreaterThan(String value) {
+            addCriterion("business_type >", value, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeGreaterThanOrEqualTo(String value) {
+            addCriterion("business_type >=", value, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeLessThan(String value) {
+            addCriterion("business_type <", value, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeLessThanOrEqualTo(String value) {
+            addCriterion("business_type <=", value, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeLike(String value) {
+            addCriterion("business_type like", value, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeNotLike(String value) {
+            addCriterion("business_type not like", value, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeIn(List<String> values) {
+            addCriterion("business_type in", values, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeNotIn(List<String> values) {
+            addCriterion("business_type not in", values, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeBetween(String value1, String value2) {
+            addCriterion("business_type between", value1, value2, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andBusinessTypeNotBetween(String value1, String value2) {
+            addCriterion("business_type not between", value1, value2, "businessType");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNull() {
+            addCriterion("create_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNotNull() {
+            addCriterion("create_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampEqualTo(Long value) {
+            addCriterion("create_timestamp =", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotEqualTo(Long value) {
+            addCriterion("create_timestamp <>", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThan(Long value) {
+            addCriterion("create_timestamp >", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp >=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThan(Long value) {
+            addCriterion("create_timestamp <", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp <=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIn(List<Long> values) {
+            addCriterion("create_timestamp in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotIn(List<Long> values) {
+            addCriterion("create_timestamp not in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampIsNull() {
+            addCriterion("update_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampIsNotNull() {
+            addCriterion("update_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampEqualTo(Long value) {
+            addCriterion("update_timestamp =", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampNotEqualTo(Long value) {
+            addCriterion("update_timestamp <>", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampGreaterThan(Long value) {
+            addCriterion("update_timestamp >", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("update_timestamp >=", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampLessThan(Long value) {
+            addCriterion("update_timestamp <", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("update_timestamp <=", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampIn(List<Long> values) {
+            addCriterion("update_timestamp in", values, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampNotIn(List<Long> values) {
+            addCriterion("update_timestamp not in", values, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampBetween(Long value1, Long value2) {
+            addCriterion("update_timestamp between", value1, value2, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("update_timestamp not between", value1, value2, "updateTimestamp");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 79 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalVideo.java

@@ -0,0 +1,79 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+public class ContentPlatformIllegalVideo {
+    private Long id;
+
+    private String dateStr;
+
+    private Long videoId;
+
+    private String title;
+
+    private Long createTimestamp;
+
+    private String content;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDateStr() {
+        return dateStr;
+    }
+
+    public void setDateStr(String dateStr) {
+        this.dateStr = dateStr;
+    }
+
+    public Long getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Long videoId) {
+        this.videoId = videoId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", dateStr=").append(dateStr);
+        sb.append(", videoId=").append(videoId);
+        sb.append(", title=").append(title);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append(", content=").append(content);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 531 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalVideoExample.java

@@ -0,0 +1,531 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContentPlatformIllegalVideoExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ContentPlatformIllegalVideoExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNull() {
+            addCriterion("date_str is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNotNull() {
+            addCriterion("date_str is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrEqualTo(String value) {
+            addCriterion("date_str =", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotEqualTo(String value) {
+            addCriterion("date_str <>", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThan(String value) {
+            addCriterion("date_str >", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThanOrEqualTo(String value) {
+            addCriterion("date_str >=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThan(String value) {
+            addCriterion("date_str <", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThanOrEqualTo(String value) {
+            addCriterion("date_str <=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLike(String value) {
+            addCriterion("date_str like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotLike(String value) {
+            addCriterion("date_str not like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIn(List<String> values) {
+            addCriterion("date_str in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotIn(List<String> values) {
+            addCriterion("date_str not in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrBetween(String value1, String value2) {
+            addCriterion("date_str between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotBetween(String value1, String value2) {
+            addCriterion("date_str not between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNull() {
+            addCriterion("video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNotNull() {
+            addCriterion("video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdEqualTo(Long value) {
+            addCriterion("video_id =", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotEqualTo(Long value) {
+            addCriterion("video_id <>", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThan(Long value) {
+            addCriterion("video_id >", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("video_id >=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThan(Long value) {
+            addCriterion("video_id <", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThanOrEqualTo(Long value) {
+            addCriterion("video_id <=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIn(List<Long> values) {
+            addCriterion("video_id in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotIn(List<Long> values) {
+            addCriterion("video_id not in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdBetween(Long value1, Long value2) {
+            addCriterion("video_id between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotBetween(Long value1, Long value2) {
+            addCriterion("video_id not between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNull() {
+            addCriterion("create_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNotNull() {
+            addCriterion("create_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampEqualTo(Long value) {
+            addCriterion("create_timestamp =", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotEqualTo(Long value) {
+            addCriterion("create_timestamp <>", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThan(Long value) {
+            addCriterion("create_timestamp >", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp >=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThan(Long value) {
+            addCriterion("create_timestamp <", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp <=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIn(List<Long> values) {
+            addCriterion("create_timestamp in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotIn(List<Long> values) {
+            addCriterion("create_timestamp not in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 12 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/PlanIllegalVideoDTO.java

@@ -0,0 +1,12 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import lombok.Data;
+
+@Data
+public class PlanIllegalVideoDTO {
+    private Long accountId;
+    private String channel;
+    private Integer type;
+    private Long videoId;
+    private String title;
+}

+ 23 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/NoticeItemVO.java

@@ -0,0 +1,23 @@
+package com.tzld.piaoquan.api.model.vo.contentplatform;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class NoticeItemVO {
+
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    @ApiModelProperty(value = "消息内容")
+    private String msg;
+
+    @ApiModelProperty(value = "状态 0-未读 1-已读")
+    private Integer status;
+
+    @ApiModelProperty(value = "创建时间")
+    private Long createTimestamp;
+}

+ 17 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformNoticeService.java

@@ -0,0 +1,17 @@
+package com.tzld.piaoquan.api.service.contentplatform;
+
+import com.tzld.piaoquan.api.model.param.contentplatform.NoticeListParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.NoticeReadParam;
+import com.tzld.piaoquan.api.model.vo.contentplatform.NoticeItemVO;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+
+public interface ContentPlatformNoticeService {
+
+    Page<NoticeItemVO> noticeList(NoticeListParam param);
+
+    Long getNotReadCount();
+
+    void noticeRead(NoticeReadParam param);
+
+    void noticeReadAll();
+}

+ 86 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformNoticeServiceImpl.java

@@ -0,0 +1,86 @@
+package com.tzld.piaoquan.api.service.contentplatform.impl;
+
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformIllegalMsgMapper;
+import com.tzld.piaoquan.api.model.config.LoginUserContext;
+import com.tzld.piaoquan.api.model.param.contentplatform.NoticeListParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.NoticeReadParam;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccount;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsgExample;
+import com.tzld.piaoquan.api.model.vo.contentplatform.NoticeItemVO;
+import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformNoticeService;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+@Service
+public class ContentPlatformNoticeServiceImpl implements ContentPlatformNoticeService {
+
+    @Autowired
+    private ContentPlatformIllegalMsgMapper msgMapper;
+
+    @Override
+    public Page<NoticeItemVO> noticeList(NoticeListParam param) {
+        ContentPlatformAccount loginAccount = LoginUserContext.getUser();
+        ContentPlatformIllegalMsgExample example = new ContentPlatformIllegalMsgExample();
+        example.createCriteria().andAccountIdEqualTo(loginAccount.getId());
+        example.setOrderByClause("create_timestamp desc");
+        Page<NoticeItemVO> page = new Page<>(param.getPageNum(), param.getPageSize());
+        example.setPage(page);
+        long totalCount = msgMapper.countByExample(example);
+        page.setTotalSize((int) totalCount);
+        List<ContentPlatformIllegalMsg> list = msgMapper.selectByExample(example);
+        List<NoticeItemVO> records = new ArrayList<>();
+        for (ContentPlatformIllegalMsg item : list) {
+            NoticeItemVO vo = new NoticeItemVO();
+            vo.setId(item.getId());
+            String videoTitle = item.getTitle();
+            if (videoTitle.length() >= 20) {
+                videoTitle = videoTitle.substring(0, 19) + "...";
+            }
+            String title = "视频“" + videoTitle + "”被封禁,请及时替换";
+            vo.setTitle(title);
+            String msg = "您在" + item.getBusinessType() + "栏目中使用的视频“" +
+                    videoTitle + "”(视频ID:" + item.getVideoId() + ")被微信封禁,请及时替换为其他视频。";
+            vo.setMsg(msg);
+            vo.setStatus(item.getStatus());
+            vo.setCreateTimestamp(item.getCreateTimestamp());
+            records.add(vo);
+        }
+        page.setObjs(records);
+        return page;
+    }
+
+    @Override
+    public Long getNotReadCount() {
+        ContentPlatformAccount loginAccount = LoginUserContext.getUser();
+        ContentPlatformIllegalMsgExample example = new ContentPlatformIllegalMsgExample();
+        example.createCriteria().andAccountIdEqualTo(loginAccount.getId()).andStatusEqualTo(0);
+        return msgMapper.countByExample(example);
+    }
+
+    @Override
+    public void noticeRead(NoticeReadParam param) {
+        ContentPlatformIllegalMsg illegalMsg = new ContentPlatformIllegalMsg();
+        illegalMsg.setId(param.getId());
+        illegalMsg.setStatus(1);
+        illegalMsg.setUpdateTimestamp(System.currentTimeMillis());
+        msgMapper.updateByPrimaryKeySelective(illegalMsg);
+    }
+
+    @Override
+    public void noticeReadAll() {
+        ContentPlatformAccount loginAccount = LoginUserContext.getUser();
+        ContentPlatformIllegalMsgExample example = new ContentPlatformIllegalMsgExample();
+        example.createCriteria().andAccountIdEqualTo(loginAccount.getId()).andStatusEqualTo(0);
+        ContentPlatformIllegalMsg record = new ContentPlatformIllegalMsg();
+        record.setStatus(1);
+        record.setUpdateTimestamp(System.currentTimeMillis());
+        msgMapper.updateByExampleSelective(record, example);
+    }
+}

+ 261 - 0
api-module/src/main/resources/mapper/contentplatform/ContentPlatformIllegalMsgMapper.xml

@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformIllegalMsgMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="account_id" jdbcType="BIGINT" property="accountId" />
+    <result column="video_id" jdbcType="BIGINT" property="videoId" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="business_type" jdbcType="VARCHAR" property="businessType" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
+    <result column="update_timestamp" jdbcType="BIGINT" property="updateTimestamp" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, account_id, video_id, title, business_type, `status`, create_timestamp, update_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsgExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from content_platform_illegal_msg
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from content_platform_illegal_msg
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from content_platform_illegal_msg
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsgExample">
+    delete from content_platform_illegal_msg
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
+    insert into content_platform_illegal_msg (id, account_id, video_id, 
+      title, business_type, `status`, 
+      create_timestamp, update_timestamp)
+    values (#{id,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, 
+      #{title,jdbcType=VARCHAR}, #{businessType,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
+      #{createTimestamp,jdbcType=BIGINT}, #{updateTimestamp,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
+    insert into content_platform_illegal_msg
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="accountId != null">
+        account_id,
+      </if>
+      <if test="videoId != null">
+        video_id,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="businessType != null">
+        business_type,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp,
+      </if>
+      <if test="updateTimestamp != null">
+        update_timestamp,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="accountId != null">
+        #{accountId,jdbcType=BIGINT},
+      </if>
+      <if test="videoId != null">
+        #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="businessType != null">
+        #{businessType,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTimestamp != null">
+        #{createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="updateTimestamp != null">
+        #{updateTimestamp,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsgExample" resultType="java.lang.Long">
+    select count(*) from content_platform_illegal_msg
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update content_platform_illegal_msg
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.accountId != null">
+        account_id = #{record.accountId,jdbcType=BIGINT},
+      </if>
+      <if test="record.videoId != null">
+        video_id = #{record.videoId,jdbcType=BIGINT},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.businessType != null">
+        business_type = #{record.businessType,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTimestamp != null">
+        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="record.updateTimestamp != null">
+        update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update content_platform_illegal_msg
+    set id = #{record.id,jdbcType=BIGINT},
+      account_id = #{record.accountId,jdbcType=BIGINT},
+      video_id = #{record.videoId,jdbcType=BIGINT},
+      title = #{record.title,jdbcType=VARCHAR},
+      business_type = #{record.businessType,jdbcType=VARCHAR},
+      `status` = #{record.status,jdbcType=INTEGER},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
+    update content_platform_illegal_msg
+    <set>
+      <if test="accountId != null">
+        account_id = #{accountId,jdbcType=BIGINT},
+      </if>
+      <if test="videoId != null">
+        video_id = #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="businessType != null">
+        business_type = #{businessType,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="updateTimestamp != null">
+        update_timestamp = #{updateTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalMsg">
+    update content_platform_illegal_msg
+    set account_id = #{accountId,jdbcType=BIGINT},
+      video_id = #{videoId,jdbcType=BIGINT},
+      title = #{title,jdbcType=VARCHAR},
+      business_type = #{businessType,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      update_timestamp = #{updateTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 276 - 0
api-module/src/main/resources/mapper/contentplatform/ContentPlatformIllegalVideoMapper.xml

@@ -0,0 +1,276 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformIllegalVideoMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideo">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="date_str" jdbcType="VARCHAR" property="dateStr" />
+    <result column="video_id" jdbcType="BIGINT" property="videoId" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideo">
+    <result column="content" jdbcType="LONGVARCHAR" property="content" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, date_str, video_id, title, create_timestamp
+  </sql>
+  <sql id="Blob_Column_List">
+    content
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideoExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from content_platform_illegal_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideoExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from content_platform_illegal_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from content_platform_illegal_video
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from content_platform_illegal_video
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideoExample">
+    delete from content_platform_illegal_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideo">
+    insert into content_platform_illegal_video (id, date_str, video_id, 
+      title, create_timestamp, content
+      )
+    values (#{id,jdbcType=BIGINT}, #{dateStr,jdbcType=VARCHAR}, #{videoId,jdbcType=BIGINT}, 
+      #{title,jdbcType=VARCHAR}, #{createTimestamp,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideo">
+    insert into content_platform_illegal_video
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="dateStr != null">
+        date_str,
+      </if>
+      <if test="videoId != null">
+        video_id,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="dateStr != null">
+        #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="videoId != null">
+        #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="createTimestamp != null">
+        #{createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideoExample" resultType="java.lang.Long">
+    select count(*) from content_platform_illegal_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update content_platform_illegal_video
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.dateStr != null">
+        date_str = #{record.dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="record.videoId != null">
+        video_id = #{record.videoId,jdbcType=BIGINT},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTimestamp != null">
+        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update content_platform_illegal_video
+    set id = #{record.id,jdbcType=BIGINT},
+      date_str = #{record.dateStr,jdbcType=VARCHAR},
+      video_id = #{record.videoId,jdbcType=BIGINT},
+      title = #{record.title,jdbcType=VARCHAR},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      content = #{record.content,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update content_platform_illegal_video
+    set id = #{record.id,jdbcType=BIGINT},
+      date_str = #{record.dateStr,jdbcType=VARCHAR},
+      video_id = #{record.videoId,jdbcType=BIGINT},
+      title = #{record.title,jdbcType=VARCHAR},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideo">
+    update content_platform_illegal_video
+    <set>
+      <if test="dateStr != null">
+        date_str = #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="videoId != null">
+        video_id = #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideo">
+    update content_platform_illegal_video
+    set date_str = #{dateStr,jdbcType=VARCHAR},
+      video_id = #{videoId,jdbcType=BIGINT},
+      title = #{title,jdbcType=VARCHAR},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      content = #{content,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideo">
+    update content_platform_illegal_video
+    set date_str = #{dateStr,jdbcType=VARCHAR},
+      video_id = #{videoId,jdbcType=BIGINT},
+      title = #{title,jdbcType=VARCHAR},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 30 - 2
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml

@@ -171,6 +171,14 @@
         </foreach>
     </insert>
 
+    <insert id="batchInsertContentPlatformIllegalVideo">
+        insert into content_platform_illegal_video (date_str, video_id, content, title, create_timestamp)
+        values
+        <foreach collection="records" item="item" separator=",">
+            (#{item.dateStr}, #{item.videoId}, #{item.content}, #{item.title}, #{item.createTimestamp})
+        </foreach>
+    </insert>
+
     <insert id="batchInsertContentPlatformVideoAgg">
         insert into content_platform_video_agg (dt, video_id, category, title, cover, video, score, create_timestamp)
         values
@@ -267,18 +275,20 @@
         WHERE t.rn = 1;
     </select>
 
-    <update id="updateVideoStatus">
+    <update id="updateVideoStatusWithOldStatus">
         update content_platform_video
         set status = #{status},
             update_timestamp = #{now}
         where video_id = #{videoId}
+        and status = #{oldStatus}
     </update>
 
-    <update id="updateVideoAggStatus">
+    <update id="updateVideoAggStatusWithOldStatus">
         update content_platform_video_agg
         set status = #{status},
             update_timestamp = #{now}
         where video_id = #{videoId}
+        and status = #{oldStatus}
     </update>
 
     <select id="getVideoListByIds"
@@ -343,4 +353,22 @@
         </foreach>
     </update>
 
+    <select id="getGzhPlanIllegalVideoList"
+            resultType="com.tzld.piaoquan.api.model.po.contentplatform.PlanIllegalVideoDTO">
+        select plan.create_account_id as account_id, plan.type, video.video_id, '公众号' as channel,
+               coalesce(nullif(video.custom_title, ''), video.title) as title
+        from content_platform_gzh_plan plan
+        join content_platform_gzh_plan_video video on plan.id = video.plan_id
+        where video.video_id = #{videoId} and plan.`status` = 1
+    </select>
+
+    <select id="getQwPlanIllegalVideoList"
+            resultType="com.tzld.piaoquan.api.model.po.contentplatform.PlanIllegalVideoDTO">
+        select plan.create_account_id as account_id, plan.type, video.video_id, '企微' as channel, video.title
+        from content_platform_qw_plan plan
+        join content_platform_qw_plan_video video on plan.id = video.plan_id
+        where video.video_id = #{videoId} and plan.`status` = 1
+    </select>
+
+
 </mapper>

+ 25 - 23
api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml

@@ -50,29 +50,31 @@
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
 
-        <table tableName="content_platform_account" domainObjectName="ContentPlatformAccount" alias=""/>
-        <table tableName="content_platform_gzh_account" domainObjectName="ContentPlatformGzhAccount" alias=""/>
-        <table tableName="content_platform_gzh_datastat" domainObjectName="ContentPlatformGzhDataStat" alias=""/>
-        <table tableName="content_platform_gzh_video_datastat" domainObjectName="ContentPlatformGzhVideoDataStat" alias=""/>
-        <table tableName="content_platform_gzh_datastat_total" domainObjectName="ContentPlatformGzhDataStatTotal" alias=""/>
-        <table tableName="content_platform_fwh_datastat" domainObjectName="ContentPlatformFwhDataStat" alias=""/>
-        <table tableName="content_platform_fwh_datastat_total" domainObjectName="ContentPlatformFwhDataStatTotal" alias=""/>
-        <table tableName="content_platform_gzh_push_datastat" domainObjectName="ContentPlatformGzhPushDataStat" alias=""/>
-        <table tableName="content_platform_gzh_push_datastat_total" domainObjectName="ContentPlatformGzhPushDataStatTotal" alias=""/>
-        <table tableName="content_platform_gzh_plan" domainObjectName="ContentPlatformGzhPlan" alias=""/>
-        <table tableName="content_platform_gzh_plan_video" domainObjectName="ContentPlatformGzhPlanVideo" alias=""/>
-        <table tableName="content_platform_gzh_plan_change_log" domainObjectName="ContentPlatformGzhPlanChangeLog" alias=""/>
-        <table tableName="content_platform_qw_datastat" domainObjectName="ContentPlatformQwDataStat" alias=""/>
-        <table tableName="content_platform_qw_datastat_total" domainObjectName="ContentPlatformQwDataStatTotal" alias=""/>
-        <table tableName="content_platform_qw_datastat_reply_total" domainObjectName="ContentPlatformQwDataStatReplyTotal" alias=""/>
-        <table tableName="content_platform_qw_datastat_sub_channel" domainObjectName="ContentPlatformQwDataStatSubChannel" alias=""/>
-        <table tableName="content_platform_qw_plan" domainObjectName="ContentPlatformQwPlan" alias=""/>
-        <table tableName="content_platform_qw_plan_video" domainObjectName="ContentPlatformQwPlanVideo" alias=""/>
-        <table tableName="content_platform_verify_code" domainObjectName="ContentPlatformVerifyCode" alias=""/>
-        <table tableName="content_platform_video" domainObjectName="ContentPlatformVideo" alias=""/>
-        <table tableName="content_platform_video_agg" domainObjectName="ContentPlatformVideoAgg" alias=""/>
-        <table tableName="content_platform_video_datastat" domainObjectName="ContentPlatformVideoDataStat" alias=""/>
-        <table tableName="content_platform_video_datastat_agg" domainObjectName="ContentPlatformVideoDataStatAgg" alias=""/>
+<!--        <table tableName="content_platform_account" domainObjectName="ContentPlatformAccount" alias=""/>-->
+<!--        <table tableName="content_platform_gzh_account" domainObjectName="ContentPlatformGzhAccount" alias=""/>-->
+<!--        <table tableName="content_platform_gzh_datastat" domainObjectName="ContentPlatformGzhDataStat" alias=""/>-->
+<!--        <table tableName="content_platform_gzh_video_datastat" domainObjectName="ContentPlatformGzhVideoDataStat" alias=""/>-->
+<!--        <table tableName="content_platform_gzh_datastat_total" domainObjectName="ContentPlatformGzhDataStatTotal" alias=""/>-->
+<!--        <table tableName="content_platform_fwh_datastat" domainObjectName="ContentPlatformFwhDataStat" alias=""/>-->
+<!--        <table tableName="content_platform_fwh_datastat_total" domainObjectName="ContentPlatformFwhDataStatTotal" alias=""/>-->
+<!--        <table tableName="content_platform_gzh_push_datastat" domainObjectName="ContentPlatformGzhPushDataStat" alias=""/>-->
+<!--        <table tableName="content_platform_gzh_push_datastat_total" domainObjectName="ContentPlatformGzhPushDataStatTotal" alias=""/>-->
+<!--        <table tableName="content_platform_gzh_plan" domainObjectName="ContentPlatformGzhPlan" alias=""/>-->
+<!--        <table tableName="content_platform_gzh_plan_video" domainObjectName="ContentPlatformGzhPlanVideo" alias=""/>-->
+<!--        <table tableName="content_platform_gzh_plan_change_log" domainObjectName="ContentPlatformGzhPlanChangeLog" alias=""/>-->
+<!--        <table tableName="content_platform_qw_datastat" domainObjectName="ContentPlatformQwDataStat" alias=""/>-->
+<!--        <table tableName="content_platform_qw_datastat_total" domainObjectName="ContentPlatformQwDataStatTotal" alias=""/>-->
+<!--        <table tableName="content_platform_qw_datastat_reply_total" domainObjectName="ContentPlatformQwDataStatReplyTotal" alias=""/>-->
+<!--        <table tableName="content_platform_qw_datastat_sub_channel" domainObjectName="ContentPlatformQwDataStatSubChannel" alias=""/>-->
+<!--        <table tableName="content_platform_qw_plan" domainObjectName="ContentPlatformQwPlan" alias=""/>-->
+<!--        <table tableName="content_platform_qw_plan_video" domainObjectName="ContentPlatformQwPlanVideo" alias=""/>-->
+<!--        <table tableName="content_platform_verify_code" domainObjectName="ContentPlatformVerifyCode" alias=""/>-->
+<!--        <table tableName="content_platform_video" domainObjectName="ContentPlatformVideo" alias=""/>-->
+<!--        <table tableName="content_platform_video_agg" domainObjectName="ContentPlatformVideoAgg" alias=""/>-->
+<!--        <table tableName="content_platform_video_datastat" domainObjectName="ContentPlatformVideoDataStat" alias=""/>-->
+<!--        <table tableName="content_platform_video_datastat_agg" domainObjectName="ContentPlatformVideoDataStatAgg" alias=""/>-->
+        <table tableName="content_platform_illegal_video" domainObjectName="ContentPlatformIllegalVideo" alias=""/>
+        <table tableName="content_platform_illegal_msg" domainObjectName="ContentPlatformIllegalMsg" alias=""/>
     </context>
 
 </generatorConfiguration>

+ 2 - 2
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/MessageAttachmentServiceImpl.java

@@ -431,7 +431,7 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
         param.setRemark(remark);
         param.setVideoId(videoId);
         Map<String, String> requestParam = new HashMap<>();
-        String jumpPage = "pages/user-videos?id=${videoId}&fromGzh=1&rootShareId=${uuid}&shareId=${uuid}&rootSourceId=[rootSourceId]"
+        String jumpPage = "pages/user-videos?fromGzh=1&rootShareId=${uuid}&id=${videoId}&shareId=${uuid}&rootSourceId=[rootSourceId]"
                 .replace("${videoId}", "" + videoId)
                 .replace("${uuid}", "" + UUID.randomUUID());
         requestParam.put("jumpPage", jumpPage);
@@ -509,7 +509,7 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
         param.setPutTypeThree(putTypeThree);
         param.setVideoId(videoId);
         Map<String, String> requestParam = new HashMap<>();
-        String jumpPage = "pages/user-videos?id=${videoId}&fromGzh=1&rootShareId=${uuid}&shareId=${uuid}&rootSourceId=[rootSourceId]"
+        String jumpPage = "pages/user-videos?fromGzh=1&rootShareId=${uuid}&id=${videoId}&shareId=${uuid}&rootSourceId=[rootSourceId]"
                 .replace("${videoId}", "" + videoId)
                 .replace("${uuid}", "" + UUID.randomUUID());
         requestParam.put("jumpPage", jumpPage);