Browse Source

违规视频使用通知

wangyunpeng 6 days ago
parent
commit
7fed93d939
16 changed files with 1226 additions and 60 deletions
  1. 52 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformNoticeController.java
  2. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformIllegalVideoMapper.java
  3. 10 2
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java
  4. 0 12
      api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformDatastatJob.java
  5. 87 0
      api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformIllegalVideoJob.java
  6. 27 21
      api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformVideoJob.java
  7. 9 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/NoticeListParam.java
  8. 8 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/NoticeReadParam.java
  9. 79 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalVideo.java
  10. 531 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalVideoExample.java
  11. 26 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/NoticeItemVO.java
  12. 15 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformNoticeService.java
  13. 34 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformNoticeServiceImpl.java
  14. 276 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformIllegalVideoMapper.xml
  15. 12 2
      api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml
  16. 24 23
      api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml

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

@@ -0,0 +1,52 @@
+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<Integer> getNotReadCount(@RequestBody NoticeListParam param) {
+        return CommonResponse.success(noticeService.getNotReadCount(param));
+    }
+
+    @ApiOperation(value = "通知已读")
+    @PostMapping("/read")
+    public CommonResponse<Void> noticeRead(@RequestBody NoticeReadParam param) {
+        noticeService.noticeRead(param);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "检查违规视频发送通知", hidden = true)
+    @JwtIgnore
+    @GetMapping("/job/checkContentPlatformIllegalVideoJob")
+    public CommonResponse<Void> checkContentPlatformIllegalVideoJob() {
+        job.checkContentPlatformIllegalVideoJob(null);
+        return CommonResponse.success();
+    }
+}

+ 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);
+}

+ 10 - 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);
 

+ 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);

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

@@ -0,0 +1,87 @@
+package com.tzld.piaoquan.api.job.contentplatform;
+
+import com.aliyun.odps.data.Record;
+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.ContentPlatformIllegalVideo;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideoExample;
+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.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+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 ContentPlatformPlanMapperExt planMapperExt;
+
+    @XxlJob("checkContentPlatformIllegalVideoJob")
+    public ReturnT<String> checkContentPlatformIllegalVideoJob(String param) {
+        String dtMin = DateUtil.getBeforeDayDateString(1, "yyyyMMdd") + "000000";
+        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));
+                item.setVideoId(Long.parseLong(getVideoIdFromContent(content)));
+                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);
+            }
+        }
+        // todo 发送违规通知
+        
+
+        return ReturnT.SUCCESS;
+    }
+
+    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);

+ 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 {
+}

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

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

+ 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);
+        }
+    }
+}

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

@@ -0,0 +1,26 @@
+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 = "公众号id")
+    private Long accountId;
+
+    @ApiModelProperty(value = "公众号名称")
+    private String accountName;
+
+    @ApiModelProperty(value = "发布计划类型 0-自动回复、1-服务号推送")
+    private Integer type;
+
+    @ApiModelProperty(value = "发布场景 0-关注回复")
+    private Integer scene;
+
+    @ApiModelProperty(value = "视频数量")
+    private Integer videoCount;
+}

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

@@ -0,0 +1,15 @@
+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);
+
+    Integer getNotReadCount(NoticeListParam param);
+
+    void noticeRead(NoticeReadParam param);
+}

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

@@ -0,0 +1,34 @@
+package com.tzld.piaoquan.api.service.contentplatform.impl;
+
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformGzhPlanMapper;
+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.utils.page.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Slf4j
+@Service
+public class ContentPlatformNoticeServiceImpl implements ContentPlatformNoticeService {
+
+    @Autowired
+    private ContentPlatformGzhPlanMapper gzhPlanMapper;
+
+    @Override
+    public Page<NoticeItemVO> noticeList(NoticeListParam param) {
+        return null;
+    }
+
+    @Override
+    public Integer getNotReadCount(NoticeListParam param) {
+        return null;
+    }
+
+    @Override
+    public void noticeRead(NoticeReadParam param) {
+
+    }
+}

+ 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>

+ 12 - 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"

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

@@ -50,29 +50,30 @@
             <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=""/>
     </context>
 
 </generatorConfiguration>