wangyunpeng 1 месяц назад
Родитель
Сommit
687cbc9909

+ 87 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/thirdpart/WeComThirdPartyJobController.java

@@ -0,0 +1,87 @@
+package com.tzld.piaoquan.api.controller.wecom.thirdpart;
+
+import com.tzld.piaoquan.api.job.wecom.thirdpart.*;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@RestController
+@RequestMapping("/wecom/thirdpart/job")
+public class WeComThirdPartyJobController {
+
+    @Autowired
+    WeComSendMsgJob weComSendMsgJob;
+    @Autowired
+    WeComAccountJob weComAccountJob;
+    @Autowired
+    WeComUserDetailJob weComUserDetailJob;
+    @Autowired
+    WeComCreateRoomJob weComCreateRoomJob;
+    @Autowired
+    WeComVideoJob weComVideoJob;
+
+    @GetMapping("/autoSendAppMsg")
+    public CommonResponse<Void> autoSendAppMsg() {
+        weComSendMsgJob.autoSendAppMsg(null);
+        return CommonResponse.success();
+    }
+
+    @GetMapping("/autoOpenSendStatusJob")
+    public CommonResponse<Void> autoOpenSendStatusJob() {
+        weComSendMsgJob.autoOpenSendStatusJob(null);
+        return CommonResponse.success();
+    }
+
+    @GetMapping("/randomRoomSendTimeJob")
+    public CommonResponse<Void> randomRoomSendTimeJob() {
+        weComSendMsgJob.randomRoomSendTimeJob(null);
+        return CommonResponse.success();
+    }
+
+    @GetMapping("/checkAccountOnline")
+    public CommonResponse<Void> checkAccountOnline() {
+        weComAccountJob.checkAccountOnline(null);
+        return CommonResponse.success();
+    }
+
+    @GetMapping("/syncUserDetail")
+    public CommonResponse<Void> syncUserDetail() {
+        weComUserDetailJob.syncUserDetail(null);
+        return CommonResponse.success();
+    }
+
+    @GetMapping("/syncRoomDetail")
+    public CommonResponse<Void> syncRoomDetail() {
+        weComUserDetailJob.syncRoomDetail(null);
+        return CommonResponse.success();
+    }
+
+    @GetMapping("/autoCreateRoom")
+    public CommonResponse<Void> autoCreateRoom() {
+        weComCreateRoomJob.autoCreateRoomJob(null);
+        return CommonResponse.success();
+    }
+
+    @GetMapping("/autoAddRoomUser")
+    public CommonResponse<Void> autoAddRoomUser() {
+        weComCreateRoomJob.autoAddRoomUserJob(null);
+        return CommonResponse.success();
+    }
+
+    @GetMapping("/syncThirdPartWeComVideoJob")
+    public CommonResponse<Void> syncThirdPartWeComVideoJob() {
+        weComVideoJob.syncThirdPartWeComVideoJob(null);
+        return CommonResponse.success();
+    }
+
+    @GetMapping("/checkThirdPartWeComVideoStatusJob")
+    public CommonResponse<Void> checkThirdPartWeComVideoStatusJob() {
+        weComVideoJob.checkThirdPartWeComVideoStatusJob(null);
+        return CommonResponse.success();
+    }
+
+}

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComVideoMapper.java

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

+ 27 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ext/ThirdPartWeComVideoMapperExt.java

@@ -0,0 +1,27 @@
+package com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext;
+
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformVideo;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComVideo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ThirdPartWeComVideoMapperExt {
+
+    String getVideoMaxDt();
+
+    void updateOtherVideoStatus(@Param("dt") String dt, @Param("videoIdList") List<Long> videoIdList, @Param("now") Long now);
+
+    void batchInsertThirdPartWeComVideo(@Param("records") List<ThirdPartWeComVideo> saveList);
+
+    void updateVideoStatusWithOldStatus(@Param("videoId") Long videoId,
+                                        @Param("status") Integer status,
+                                        @Param("oldStatus") Integer oldStatus,
+                                        @Param("now") Long now);
+
+    List<ContentPlatformVideo> getVideoMinScoreList(@Param("videoMinScore") Double videoMinScore,
+                                                    @Param("roomId") String roomId,
+                                                    @Param("offset") int offset,
+                                                    @Param("limit") int limit,
+                                                    @Param("sort") String sort);
+}

+ 8 - 19
api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComSendMsgJob.java

@@ -7,6 +7,7 @@ import com.tzld.piaoquan.api.component.VideoApiService;
 import com.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformPlanMapperExt;
 import com.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformPlanMapperExt;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComMsgMapper;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComMsgMapper;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomMapper;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComVideoMapperExt;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.CdnUploadImgLinkRequest;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.CdnUploadImgLinkRequest;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.CdnUploadImgLinkResponse;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.CdnUploadImgLinkResponse;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.SendAppMsgRequest;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.SendAppMsgRequest;
@@ -54,6 +55,8 @@ public class WeComSendMsgJob {
     @Autowired
     @Autowired
     ContentPlatformPlanMapperExt planMapperExt;
     ContentPlatformPlanMapperExt planMapperExt;
     @Autowired
     @Autowired
+    ThirdPartWeComVideoMapperExt videoMapperExt;
+    @Autowired
     ThirdPartWeComRoomMapper roomMapper;
     ThirdPartWeComRoomMapper roomMapper;
     @Autowired
     @Autowired
     ThirdPartWeComMsgMapper msgMapper;
     ThirdPartWeComMsgMapper msgMapper;
@@ -167,16 +170,10 @@ public class WeComSendMsgJob {
     }
     }
 
 
     private List<CgiReplyBucketData> getCgiReplyBucketData(String roomId, ThirdPartWeComStaff thirdPartWeComStaff) {
     private List<CgiReplyBucketData> getCgiReplyBucketData(String roomId, ThirdPartWeComStaff thirdPartWeComStaff) {
-        String dt = planMapperExt.getVideoMaxDt();
-        String datastatDt = planMapperExt.getVideoDatastatMaxDt();
         // 排除最近发送过的视频
         // 排除最近发送过的视频
         List<Long> sentVideoIds = getSentVideoIds(Long.valueOf(roomId));
         List<Long> sentVideoIds = getSentVideoIds(Long.valueOf(roomId));
-        // 按行业获取视频
-        String sort = "datastat.fission_rate desc, video.score desc";
-        String type = "企微-社群";
-        String channel = "sum";
-        List<ContentPlatformVideo> videoList = getVideoByStrategy(thirdPartWeComStaff.getThirdStaffId(), roomId, dt, datastatDt, type, channel, videoMinScore,
-                sentVideoIds, 1, 100, sort);
+        List<ContentPlatformVideo> videoList = getVideoByStrategy(thirdPartWeComStaff.getThirdStaffId(), roomId, videoMinScore,
+                sentVideoIds, 1, 100);
         if (CollectionUtils.isEmpty(videoList)) {
         if (CollectionUtils.isEmpty(videoList)) {
             LarkRobotUtil.sendWeComThirdPartMessage(
             LarkRobotUtil.sendWeComThirdPartMessage(
                     "【账号发送群消息,视频数量不足通知】\n" +
                     "【账号发送群消息,视频数量不足通知】\n" +
@@ -208,15 +205,10 @@ public class WeComSendMsgJob {
 
 
     private List<ContentPlatformVideo> getVideoByStrategy(Long staffId,
     private List<ContentPlatformVideo> getVideoByStrategy(Long staffId,
                                                           String roomId,
                                                           String roomId,
-                                                          String dt,
-                                                          String datastatDt,
-                                                          String type,
-                                                          String channel,
                                                           Double videoMinScore,
                                                           Double videoMinScore,
                                                           List<Long> sentVideoIds,
                                                           List<Long> sentVideoIds,
                                                           int pageNum,
                                                           int pageNum,
-                                                          int pageSize,
-                                                          String sort) {
+                                                          int pageSize) {
         List<ContentPlatformVideo> result = new ArrayList<>();
         List<ContentPlatformVideo> result = new ArrayList<>();
         JSONObject staffConfig = videoSourceStaffConfig.get(staffId);
         JSONObject staffConfig = videoSourceStaffConfig.get(staffId);
         if (staffConfig == null) {
         if (staffConfig == null) {
@@ -244,11 +236,8 @@ public class WeComSendMsgJob {
                 result.addAll(videoList);
                 result.addAll(videoList);
                 break;
                 break;
             default:
             default:
-                result = planMapperExt.getVideoMinDatastatScoreList(dt, datastatDt,
-                        type, channel, "normal", videoMinScore, sentVideoIds, 0, 100, sort);
-                // 行业数量不足,按平台推荐top选取视频
-                sort = "video.score desc";
-                result.addAll(planMapperExt.getVideoMinScoreList(dt, videoMinScore, sentVideoIds, 0, 100, sort));
+                // 按平台推荐top选取视频
+                result.addAll(videoMapperExt.getVideoMinScoreList(videoMinScore, roomId, 0, 100, "video.score desc"));
         }
         }
         return result;
         return result;
     }
     }

+ 198 - 0
api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComVideoJob.java

@@ -0,0 +1,198 @@
+package com.tzld.piaoquan.api.job.wecom.thirdpart;
+
+import com.aliyun.odps.data.Record;
+import com.google.common.collect.Lists;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformIllegalVideoMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComVideoMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComVideoMapperExt;
+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.wecom.thirdpart.ThirdPartWeComVideo;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComVideoExample;
+import com.tzld.piaoquan.api.util.CdnUtil;
+import com.tzld.piaoquan.growth.common.model.bo.VideoDetail;
+import com.tzld.piaoquan.growth.common.service.MessageAttachmentService;
+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.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Component
+public class WeComVideoJob {
+
+    @Autowired
+    private ThirdPartWeComVideoMapperExt videoMapperExt;
+    @Autowired
+    private ThirdPartWeComVideoMapper videoMapper;
+    @Autowired
+    private ContentPlatformIllegalVideoMapper illegalVideoMapper;
+    @Autowired
+    private MessageAttachmentService messageAttachmentService;
+
+
+    @XxlJob("syncThirdPartWeComVideoJob")
+    public ReturnT<String> syncThirdPartWeComVideoJob(String param) {
+        String dt = DateUtil.getBeforeDayDateString("yyyyMMdd");
+        if (StringUtils.hasText(param)) {
+            dt = param;
+        }
+
+        String sql = String.format("SELECT * FROM loghubods.wecom_cooperation_video_candidate_pool WHERE dt=%s;", dt);
+        List<Record> dataList = OdpsUtil.getOdpsData(sql);
+        Long now = System.currentTimeMillis();
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            List<ThirdPartWeComVideo> saveList = new ArrayList<>();
+            List<Long> existVideoIds = new ArrayList<>();
+            for (Record record : dataList) {
+                ThirdPartWeComVideo item = new ThirdPartWeComVideo();
+                Long videoId = Long.parseLong((String) record.get(0));
+                if (existVideoIds.contains(videoId)) {
+                    continue;
+                }
+                existVideoIds.add(videoId);
+                String category = (String) record.get(1);
+                String title = (String) record.get(2);
+                String videoUrl = (String) record.get(3);
+                Double score = Double.parseDouble((String) record.get(4));
+                item.setDt(dt);
+                item.setVideoId(videoId);
+                item.setCategory(category);
+                item.setTitle(title);
+                item.setVideo(videoUrl);
+                item.setScore(score);
+                item.setCreateTimestamp(now);
+                saveList.add(item);
+            }
+            // 获取视频封面
+            for (List<ThirdPartWeComVideo> partition : Lists.partition(saveList, 20)) {
+                List<Long> videoIds = partition.stream().map(ThirdPartWeComVideo::getVideoId).distinct().collect(Collectors.toList());
+                Map<Long, VideoDetail> coverMap = messageAttachmentService.getVideoDetail(new HashSet<>(videoIds));
+                for (ThirdPartWeComVideo item : partition) {
+                    VideoDetail detail = coverMap.get(item.getVideoId());
+                    if (Objects.nonNull(detail)) {
+                        String cover = detail.getCover().substring(0, detail.getCover().indexOf("/watermark"));
+                        item.setCover(cover);
+                        if (detail.getAuditStatus() != 5) {
+                            item.setStatus(0);
+                        }
+                    }
+                }
+            }
+            // save
+            if (CollectionUtils.isNotEmpty(saveList)) {
+                List<ThirdPartWeComVideo> 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> tempExistVideoIds = videoList.stream().map(ThirdPartWeComVideo::getVideoId).collect(Collectors.toList());
+                    List<Long> videoIdList = saveList.stream().map(ThirdPartWeComVideo::getVideoId).collect(Collectors.toList());
+                    videoMapperExt.updateOtherVideoStatus(dt, videoIdList, now);
+                    saveList = saveList.stream().filter(item -> !tempExistVideoIds.contains(item.getVideoId())).collect(Collectors.toList());
+                    if (CollectionUtils.isNotEmpty(saveList)) {
+                        videoMapperExt.batchInsertThirdPartWeComVideo(saveList);
+                    }
+                } else {
+                    videoMapperExt.batchInsertThirdPartWeComVideo(saveList);
+                }
+            }
+        }
+        // 更新封面
+        List<ThirdPartWeComVideo> nullCoverVideoList = getVideoNullCover();
+        if (CollectionUtils.isNotEmpty(nullCoverVideoList)) {
+            for (List<ThirdPartWeComVideo> partition : Lists.partition(nullCoverVideoList, 20)) {
+                List<Long> videoIds = partition.stream().map(ThirdPartWeComVideo::getVideoId).distinct().collect(Collectors.toList());
+                Map<Long, VideoDetail> coverMap = messageAttachmentService.getVideoDetail(new HashSet<>(videoIds));
+                for (ThirdPartWeComVideo item : partition) {
+                    VideoDetail detail = coverMap.get(item.getVideoId());
+                    if (Objects.isNull(detail)) {
+                        continue;
+                    }
+                    String cover = detail.getCover().substring(0, detail.getCover().indexOf("/watermark"));
+                    if (!cover.startsWith(CdnUtil.VIDEO_CDN_URL_HOST)
+                            && StringUtils.hasText(detail.getVideoCoverSnapshotPath())
+                            && detail.getVideoCoverSnapshotPath().startsWith(CdnUtil.VIDEO_CDN_URL_HOST)) {
+                        cover = detail.getVideoCoverSnapshotPath() + cover.substring(cover.indexOf("?"));
+                    }
+                    item.setCover(cover);
+                    if (detail.getAuditStatus() != 5) {
+                        item.setStatus(0);
+                    }
+                    videoMapper.updateByPrimaryKeySelective(item);
+                }
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    private List<ContentPlatformIllegalVideo> getAllIllegalVideoList() {
+        ContentPlatformIllegalVideoExample example = new ContentPlatformIllegalVideoExample();
+        return illegalVideoMapper.selectByExample(example);
+    }
+
+    private List<ThirdPartWeComVideo> getVideoNullCover() {
+        ThirdPartWeComVideoExample example = new ThirdPartWeComVideoExample();
+        example.createCriteria().andCoverIsNull();
+        return videoMapper.selectByExample(example);
+    }
+
+    private List<ThirdPartWeComVideo> getVideoList(String dt) {
+        ThirdPartWeComVideoExample example = new ThirdPartWeComVideoExample();
+        example.createCriteria().andDtEqualTo(dt);
+        return videoMapper.selectByExample(example);
+    }
+
+    private List<ThirdPartWeComVideo> getVideoListByDt(String dt) {
+        ThirdPartWeComVideoExample example = new ThirdPartWeComVideoExample();
+        example.createCriteria().andDtEqualTo(dt);
+        return videoMapper.selectByExample(example);
+    }
+
+    @XxlJob("checkThirdPartWeComVideoStatusJob")
+    public ReturnT<String> checkThirdPartWeComVideoStatusJob(String param) {
+        String dt = videoMapperExt.getVideoMaxDt();
+        if (StringUtils.hasText(param)) {
+            dt = param;
+        }
+        List<ThirdPartWeComVideo> videoList = getVideoListByDt(dt);
+        Long now = System.currentTimeMillis();
+        for (List<ThirdPartWeComVideo> partition : Lists.partition(videoList, 20)) {
+            List<Long> videoIds = partition.stream().map(ThirdPartWeComVideo::getVideoId).collect(Collectors.toList());
+            Map<Long, VideoDetail> videoDetailMap = messageAttachmentService.getVideoDetail(new HashSet<>(videoIds));
+            for (ThirdPartWeComVideo video : partition) {
+                VideoDetail videoDetail = videoDetailMap.get(video.getVideoId());
+                if (videoDetail == null
+                        || videoDetail.getAuditStatus() != 5) {
+                    updateVideoStatusWithOldStatus(video.getVideoId(), 0, 1, now);
+                } else if (videoDetail.getRecommendStatus() == -6 && video.getStatus() == 0) {
+                    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) {
+        videoMapperExt.updateVideoStatusWithOldStatus(videoId, status, oldStatus, now);
+    }
+
+}

+ 134 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComVideo.java

@@ -0,0 +1,134 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+public class ThirdPartWeComVideo {
+    private Long id;
+
+    private String dt;
+
+    private Long videoId;
+
+    private String category;
+
+    private String title;
+
+    private String cover;
+
+    private String video;
+
+    private Double score;
+
+    private Integer status;
+
+    private Long createTimestamp;
+
+    private Long updateTimestamp;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDt() {
+        return dt;
+    }
+
+    public void setDt(String dt) {
+        this.dt = dt;
+    }
+
+    public Long getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Long videoId) {
+        this.videoId = videoId;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getCover() {
+        return cover;
+    }
+
+    public void setCover(String cover) {
+        this.cover = cover;
+    }
+
+    public String getVideo() {
+        return video;
+    }
+
+    public void setVideo(String video) {
+        this.video = video;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    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(", dt=").append(dt);
+        sb.append(", videoId=").append(videoId);
+        sb.append(", category=").append(category);
+        sb.append(", title=").append(title);
+        sb.append(", cover=").append(cover);
+        sb.append(", video=").append(video);
+        sb.append(", score=").append(score);
+        sb.append(", status=").append(status);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append(", updateTimestamp=").append(updateTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 921 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComVideoExample.java

@@ -0,0 +1,921 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ThirdPartWeComVideoExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ThirdPartWeComVideoExample() {
+        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 andDtIsNull() {
+            addCriterion("dt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtIsNotNull() {
+            addCriterion("dt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtEqualTo(String value) {
+            addCriterion("dt =", value, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtNotEqualTo(String value) {
+            addCriterion("dt <>", value, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtGreaterThan(String value) {
+            addCriterion("dt >", value, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtGreaterThanOrEqualTo(String value) {
+            addCriterion("dt >=", value, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtLessThan(String value) {
+            addCriterion("dt <", value, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtLessThanOrEqualTo(String value) {
+            addCriterion("dt <=", value, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtLike(String value) {
+            addCriterion("dt like", value, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtNotLike(String value) {
+            addCriterion("dt not like", value, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtIn(List<String> values) {
+            addCriterion("dt in", values, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtNotIn(List<String> values) {
+            addCriterion("dt not in", values, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtBetween(String value1, String value2) {
+            addCriterion("dt between", value1, value2, "dt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtNotBetween(String value1, String value2) {
+            addCriterion("dt not between", value1, value2, "dt");
+            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 andCategoryIsNull() {
+            addCriterion("category is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIsNotNull() {
+            addCriterion("category is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryEqualTo(String value) {
+            addCriterion("category =", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotEqualTo(String value) {
+            addCriterion("category <>", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryGreaterThan(String value) {
+            addCriterion("category >", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryGreaterThanOrEqualTo(String value) {
+            addCriterion("category >=", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLessThan(String value) {
+            addCriterion("category <", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLessThanOrEqualTo(String value) {
+            addCriterion("category <=", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLike(String value) {
+            addCriterion("category like", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotLike(String value) {
+            addCriterion("category not like", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIn(List<String> values) {
+            addCriterion("category in", values, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotIn(List<String> values) {
+            addCriterion("category not in", values, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryBetween(String value1, String value2) {
+            addCriterion("category between", value1, value2, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotBetween(String value1, String value2) {
+            addCriterion("category not between", value1, value2, "category");
+            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 andCoverIsNull() {
+            addCriterion("cover is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverIsNotNull() {
+            addCriterion("cover is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverEqualTo(String value) {
+            addCriterion("cover =", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotEqualTo(String value) {
+            addCriterion("cover <>", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverGreaterThan(String value) {
+            addCriterion("cover >", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverGreaterThanOrEqualTo(String value) {
+            addCriterion("cover >=", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverLessThan(String value) {
+            addCriterion("cover <", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverLessThanOrEqualTo(String value) {
+            addCriterion("cover <=", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverLike(String value) {
+            addCriterion("cover like", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotLike(String value) {
+            addCriterion("cover not like", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverIn(List<String> values) {
+            addCriterion("cover in", values, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotIn(List<String> values) {
+            addCriterion("cover not in", values, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverBetween(String value1, String value2) {
+            addCriterion("cover between", value1, value2, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotBetween(String value1, String value2) {
+            addCriterion("cover not between", value1, value2, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIsNull() {
+            addCriterion("video is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIsNotNull() {
+            addCriterion("video is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoEqualTo(String value) {
+            addCriterion("video =", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoNotEqualTo(String value) {
+            addCriterion("video <>", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoGreaterThan(String value) {
+            addCriterion("video >", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoGreaterThanOrEqualTo(String value) {
+            addCriterion("video >=", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoLessThan(String value) {
+            addCriterion("video <", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoLessThanOrEqualTo(String value) {
+            addCriterion("video <=", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoLike(String value) {
+            addCriterion("video like", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoNotLike(String value) {
+            addCriterion("video not like", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIn(List<String> values) {
+            addCriterion("video in", values, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoNotIn(List<String> values) {
+            addCriterion("video not in", values, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoBetween(String value1, String value2) {
+            addCriterion("video between", value1, value2, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoNotBetween(String value1, String value2) {
+            addCriterion("video not between", value1, value2, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNull() {
+            addCriterion("score is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNotNull() {
+            addCriterion("score is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreEqualTo(Double value) {
+            addCriterion("score =", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotEqualTo(Double value) {
+            addCriterion("score <>", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThan(Double value) {
+            addCriterion("score >", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThanOrEqualTo(Double value) {
+            addCriterion("score >=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThan(Double value) {
+            addCriterion("score <", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThanOrEqualTo(Double value) {
+            addCriterion("score <=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIn(List<Double> values) {
+            addCriterion("score in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotIn(List<Double> values) {
+            addCriterion("score not in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreBetween(Double value1, Double value2) {
+            addCriterion("score between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotBetween(Double value1, Double value2) {
+            addCriterion("score not between", value1, value2, "score");
+            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);
+        }
+    }
+}

+ 309 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComVideoMapper.xml

@@ -0,0 +1,309 @@
+<?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.wecom.thirdpart.ThirdPartWeComVideoMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComVideo">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="dt" jdbcType="VARCHAR" property="dt" />
+    <result column="video_id" jdbcType="BIGINT" property="videoId" />
+    <result column="category" jdbcType="VARCHAR" property="category" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="cover" jdbcType="VARCHAR" property="cover" />
+    <result column="video" jdbcType="VARCHAR" property="video" />
+    <result column="score" jdbcType="DOUBLE" property="score" />
+    <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, dt, video_id, category, title, cover, video, score, `status`, create_timestamp, 
+    update_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComVideoExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_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="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_video
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from third_part_we_com_video
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComVideoExample">
+    delete from third_part_we_com_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComVideo">
+    insert into third_part_we_com_video (id, dt, video_id, 
+      category, title, cover, 
+      video, score, `status`, 
+      create_timestamp, update_timestamp)
+    values (#{id,jdbcType=BIGINT}, #{dt,jdbcType=VARCHAR}, #{videoId,jdbcType=BIGINT}, 
+      #{category,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{cover,jdbcType=VARCHAR}, 
+      #{video,jdbcType=VARCHAR}, #{score,jdbcType=DOUBLE}, #{status,jdbcType=INTEGER}, 
+      #{createTimestamp,jdbcType=BIGINT}, #{updateTimestamp,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComVideo">
+    insert into third_part_we_com_video
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="dt != null">
+        dt,
+      </if>
+      <if test="videoId != null">
+        video_id,
+      </if>
+      <if test="category != null">
+        category,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="cover != null">
+        cover,
+      </if>
+      <if test="video != null">
+        video,
+      </if>
+      <if test="score != null">
+        score,
+      </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="dt != null">
+        #{dt,jdbcType=VARCHAR},
+      </if>
+      <if test="videoId != null">
+        #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="category != null">
+        #{category,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="cover != null">
+        #{cover,jdbcType=VARCHAR},
+      </if>
+      <if test="video != null">
+        #{video,jdbcType=VARCHAR},
+      </if>
+      <if test="score != null">
+        #{score,jdbcType=DOUBLE},
+      </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.wecom.thirdpart.ThirdPartWeComVideoExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_video
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.dt != null">
+        dt = #{record.dt,jdbcType=VARCHAR},
+      </if>
+      <if test="record.videoId != null">
+        video_id = #{record.videoId,jdbcType=BIGINT},
+      </if>
+      <if test="record.category != null">
+        category = #{record.category,jdbcType=VARCHAR},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.cover != null">
+        cover = #{record.cover,jdbcType=VARCHAR},
+      </if>
+      <if test="record.video != null">
+        video = #{record.video,jdbcType=VARCHAR},
+      </if>
+      <if test="record.score != null">
+        score = #{record.score,jdbcType=DOUBLE},
+      </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 third_part_we_com_video
+    set id = #{record.id,jdbcType=BIGINT},
+      dt = #{record.dt,jdbcType=VARCHAR},
+      video_id = #{record.videoId,jdbcType=BIGINT},
+      category = #{record.category,jdbcType=VARCHAR},
+      title = #{record.title,jdbcType=VARCHAR},
+      cover = #{record.cover,jdbcType=VARCHAR},
+      video = #{record.video,jdbcType=VARCHAR},
+      score = #{record.score,jdbcType=DOUBLE},
+      `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.wecom.thirdpart.ThirdPartWeComVideo">
+    update third_part_we_com_video
+    <set>
+      <if test="dt != null">
+        dt = #{dt,jdbcType=VARCHAR},
+      </if>
+      <if test="videoId != null">
+        video_id = #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="category != null">
+        category = #{category,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="cover != null">
+        cover = #{cover,jdbcType=VARCHAR},
+      </if>
+      <if test="video != null">
+        video = #{video,jdbcType=VARCHAR},
+      </if>
+      <if test="score != null">
+        score = #{score,jdbcType=DOUBLE},
+      </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.wecom.thirdpart.ThirdPartWeComVideo">
+    update third_part_we_com_video
+    set dt = #{dt,jdbcType=VARCHAR},
+      video_id = #{videoId,jdbcType=BIGINT},
+      category = #{category,jdbcType=VARCHAR},
+      title = #{title,jdbcType=VARCHAR},
+      cover = #{cover,jdbcType=VARCHAR},
+      video = #{video,jdbcType=VARCHAR},
+      score = #{score,jdbcType=DOUBLE},
+      `status` = #{status,jdbcType=INTEGER},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      update_timestamp = #{updateTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 46 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ext/ThirdPartWeComVideoMapperExt.xml

@@ -0,0 +1,46 @@
+<?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.wecom.thirdpart.ext.ThirdPartWeComVideoMapperExt">
+
+    <insert id="batchInsertThirdPartWeComVideo">
+        insert into third_part_we_com_video (dt, video_id, category, title, cover, video, score, create_timestamp)
+        values
+        <foreach collection="records" item="item" separator=",">
+            (#{item.dt}, #{item.videoId}, #{item.category}, #{item.title}, #{item.cover}, #{item.video}, #{item.score},
+            #{item.createTimestamp})
+        </foreach>
+    </insert>
+
+    <select id="getVideoMaxDt" resultType="java.lang.String">
+        select max(dt)
+        from third_part_we_com_video
+    </select>
+
+    <update id="updateOtherVideoStatus">
+        update third_part_we_com_video
+        set status = 0,
+            update_timestamp = #{now}
+        where dt = #{dt} and video_id not in
+        <foreach collection="videoIdList" item="item" open="(" close=")" separator=",">
+            #{item}
+        </foreach>
+    </update>
+
+    <update id="updateVideoStatusWithOldStatus">
+        update third_part_we_com_video
+        set status = #{status},
+            update_timestamp = #{now}
+        where video_id = #{videoId}
+          and status = #{oldStatus}
+    </update>
+
+    <select id="getVideoMinScoreList" resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformVideo">
+        select *
+        from third_part_we_com_video video
+        where video.dt = #{dt} and video.status = 1 and video.score > #{minScore}
+          and video.video_id not in (select video_id from third_part_we_com_msg where send_userid = #{roomId} and video_id is not null)
+        order by ${sort}
+        limit #{offset}, #{pageSize}
+    </select>
+
+</mapper>

+ 13 - 6
api-module/src/main/resources/mybatis-api-wecomThirdpart-generator-config.xml

@@ -50,12 +50,19 @@
             <property name="enableSubPackages" value="true"/>
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
         </javaClientGenerator>
 
 
-        <table tableName="third_part_we_com_corp" domainObjectName="ThirdPartWeComCorp" alias=""/>
-        <table tableName="third_part_we_com_room" domainObjectName="ThirdPartWeComRoom" alias=""/>
-        <table tableName="third_part_we_com_room_user" domainObjectName="ThirdPartWeComRoomUser" alias=""/>
-        <table tableName="third_part_we_com_staff" domainObjectName="ThirdPartWeComStaff" alias=""/>
-        <table tableName="third_part_we_com_staff_user" domainObjectName="ThirdPartWeComStaffUser" alias=""/>
-        <table tableName="third_part_we_com_msg" domainObjectName="ThirdPartWeComMsg" alias=""/>
+<!--        <table tableName="third_part_we_com_corp" domainObjectName="ThirdPartWeComCorp" alias=""/>-->
+<!--        <table tableName="third_part_we_com_room" domainObjectName="ThirdPartWeComRoom" alias=""/>-->
+<!--        <table tableName="third_part_we_com_room_user" domainObjectName="ThirdPartWeComRoomUser" alias=""/>-->
+<!--        <table tableName="third_part_we_com_room_config" domainObjectName="ThirdPartWeComRoomConfig" alias=""/>-->
+<!--        <table tableName="third_part_we_com_room_config_task" domainObjectName="ThirdPartWeComRoomConfigTask" alias=""/>-->
+<!--        <table tableName="third_part_we_com_room_config_task_content" domainObjectName="ThirdPartWeComRoomConfigTaskContent" alias=""/>-->
+<!--        <table tableName="third_part_we_com_staff" domainObjectName="ThirdPartWeComStaff" alias=""/>-->
+<!--        <table tableName="third_part_we_com_staff_user" domainObjectName="ThirdPartWeComStaffUser" alias=""/>-->
+<!--        <table tableName="third_part_we_com_staff_config" domainObjectName="ThirdPartWeComStaffConfig" alias=""/>-->
+<!--        <table tableName="third_part_we_com_staff_config_task" domainObjectName="ThirdPartWeComStaffConfigTask" alias=""/>-->
+<!--        <table tableName="third_part_we_com_staff_config_task_content" domainObjectName="ThirdPartWeComStaffConfigTaskContent" alias=""/>-->
+<!--        <table tableName="third_part_we_com_msg" domainObjectName="ThirdPartWeComMsg" alias=""/>-->
+        <table tableName="third_part_we_com_video" domainObjectName="ThirdPartWeComVideo" alias=""/>
     </context>
     </context>
 
 
 </generatorConfiguration>
 </generatorConfiguration>