Explorar o código

违规视频使用通知

wangyunpeng hai 1 día
pai
achega
9e06ebd6bd
Modificáronse 15 ficheiros con 1289 adicións e 31 borrados
  1. 4 4
      api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformNoticeController.java
  2. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformIllegalMsgMapper.java
  3. 4 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java
  4. 92 7
      api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformIllegalVideoJob.java
  5. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/PageParam.java
  6. 1 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/NoticeReadParam.java
  7. 101 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalMsg.java
  8. 711 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformIllegalMsgExample.java
  9. 12 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/PlanIllegalVideoDTO.java
  10. 8 11
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/NoticeItemVO.java
  11. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformNoticeService.java
  12. 43 6
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformNoticeServiceImpl.java
  13. 261 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformIllegalMsgMapper.xml
  14. 18 0
      api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml
  15. 1 0
      api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml

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

@@ -31,8 +31,8 @@ public class ContentPlatformNoticeController {
 
     @ApiOperation(value = "获取未读通知数量")
     @PostMapping("/getNotReadCount")
-    public CommonResponse<Integer> getNotReadCount(@RequestBody NoticeListParam param) {
-        return CommonResponse.success(noticeService.getNotReadCount(param));
+    public CommonResponse<Long> getNotReadCount() {
+        return CommonResponse.success(noticeService.getNotReadCount());
     }
 
     @ApiOperation(value = "通知已读")
@@ -45,8 +45,8 @@ public class ContentPlatformNoticeController {
     @ApiOperation(value = "检查违规视频发送通知", hidden = true)
     @JwtIgnore
     @GetMapping("/job/checkContentPlatformIllegalVideoJob")
-    public CommonResponse<Void> checkContentPlatformIllegalVideoJob() {
-        job.checkContentPlatformIllegalVideoJob(null);
+    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);
+}

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

@@ -109,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);
 }

+ 92 - 7
api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformIllegalVideoJob.java

@@ -1,21 +1,23 @@
 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.ContentPlatformIllegalVideo;
-import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformIllegalVideoExample;
+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.ArrayList;
-import java.util.List;
+import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
@@ -27,11 +29,16 @@ 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();
@@ -43,7 +50,11 @@ public class ContentPlatformIllegalVideoJob {
                 String content = (String) record.get(1);
                 String title = (String) record.get(2);
                 item.setDateStr(String.valueOf(dt));
-                item.setVideoId(Long.parseLong(getVideoIdFromContent(content)));
+                String videoId = getVideoIdFromContent(content);
+                if (Objects.isNull(videoId)) {
+                    continue;
+                }
+                item.setVideoId(Long.parseLong(videoId));
                 item.setContent(content);
                 item.setTitle(title);
                 item.setCreateTimestamp(now);
@@ -58,12 +69,86 @@ public class ContentPlatformIllegalVideoJob {
                 planMapperExt.batchInsertContentPlatformIllegalVideo(filterList);
             }
         }
-        // todo 发送违规通知
-        
+        // 发送违规通知
+        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);

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

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

@@ -5,4 +5,5 @@ 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);
+        }
+    }
+}

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

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

@@ -9,18 +9,15 @@ public class NoticeItemVO {
     @ApiModelProperty(value = "id")
     private Long id;
 
-    @ApiModelProperty(value = "公众号id")
-    private Long accountId;
+    @ApiModelProperty(value = "标题")
+    private String title;
 
-    @ApiModelProperty(value = "公众号名称")
-    private String accountName;
+    @ApiModelProperty(value = "消息内容")
+    private String msg;
 
-    @ApiModelProperty(value = "发布计划类型 0-自动回复、1-服务号推送")
-    private Integer type;
+    @ApiModelProperty(value = "状态 0-未读 1-已读")
+    private Integer status;
 
-    @ApiModelProperty(value = "发布场景 0-关注回复")
-    private Integer scene;
-
-    @ApiModelProperty(value = "视频数量")
-    private Integer videoCount;
+    @ApiModelProperty(value = "创建时间")
+    private Long createTimestamp;
 }

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

@@ -9,7 +9,7 @@ public interface ContentPlatformNoticeService {
 
     Page<NoticeItemVO> noticeList(NoticeListParam param);
 
-    Integer getNotReadCount(NoticeListParam param);
+    Long getNotReadCount();
 
     void noticeRead(NoticeReadParam param);
 }

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

@@ -1,8 +1,12 @@
 package com.tzld.piaoquan.api.service.contentplatform.impl;
 
-import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformGzhPlanMapper;
+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;
@@ -10,25 +14,58 @@ 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 ContentPlatformGzhPlanMapper gzhPlanMapper;
+    private ContentPlatformIllegalMsgMapper msgMapper;
 
     @Override
     public Page<NoticeItemVO> noticeList(NoticeListParam param) {
-        return null;
+        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 title = "视频“" + item.getTitle() + "”被封禁,请及时替换";
+            vo.setTitle(title);
+            String msg = "您在" + item.getBusinessType() + "栏目中使用的视频“" +
+                    item.getTitle() + "”(视频ID:" + item.getVideoId() + ")被微信封禁,请及时替换为其他视频。";
+            vo.setMsg(msg);
+            vo.setStatus(item.getStatus());
+            vo.setCreateTimestamp(item.getCreateTimestamp());
+            records.add(vo);
+        }
+        page.setObjs(records);
+        return page;
     }
 
     @Override
-    public Integer getNotReadCount(NoticeListParam param) {
-        return null;
+    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);
     }
 }

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

+ 18 - 0
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml

@@ -353,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>

+ 1 - 0
api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml

@@ -74,6 +74,7 @@
 <!--        <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>