wangyunpeng před 2 týdny
rodič
revize
6821a7c280

+ 11 - 11
core/src/main/java/com/tzld/supply/dao/mapper/supply/spider/ProduceVideoMapper.java

@@ -10,7 +10,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     long countByExample(ProduceVideoExample example);
 
@@ -18,7 +18,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     int deleteByExample(ProduceVideoExample example);
 
@@ -26,7 +26,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     int deleteByPrimaryKey(String id);
 
@@ -34,7 +34,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     int insert(ProduceVideo record);
 
@@ -42,7 +42,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     int insertSelective(ProduceVideo record);
 
@@ -50,7 +50,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     List<ProduceVideo> selectByExample(ProduceVideoExample example);
 
@@ -58,7 +58,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     ProduceVideo selectByPrimaryKey(String id);
 
@@ -66,7 +66,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     int updateByExampleSelective(@Param("record") ProduceVideo record, @Param("example") ProduceVideoExample example);
 
@@ -74,7 +74,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     int updateByExample(@Param("record") ProduceVideo record, @Param("example") ProduceVideoExample example);
 
@@ -82,7 +82,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     int updateByPrimaryKeySelective(ProduceVideo record);
 
@@ -90,7 +90,7 @@ public interface ProduceVideoMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     int updateByPrimaryKey(ProduceVideo record);
 }

+ 59 - 7
core/src/main/java/com/tzld/supply/job/VideoGenerateJob.java

@@ -16,6 +16,7 @@ import com.tzld.supply.dao.mapper.supply.spider.ext.SpiderMapperExt;
 import com.tzld.supply.model.param.FFmpeg.CommandParam;
 import com.tzld.supply.model.param.FFmpeg.VideoInfoParam;
 import com.tzld.supply.model.param.FFmpeg.VideoTimeCutParam;
+import com.tzld.supply.model.param.FFmpeg.VideoUrlsParam;
 import com.tzld.supply.model.po.supply.spider.*;
 import com.tzld.supply.util.AliOssFileTool;
 import com.tzld.supply.util.CdnUtil;
@@ -34,6 +35,7 @@ import org.springframework.stereotype.Component;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Component
@@ -142,6 +144,11 @@ public class VideoGenerateJob {
             return ReturnT.SUCCESS;
         }
         for (ProduceVideo produceVideo : produceList) {
+            // 检查是否存在素材
+            Long materialCount = countVideoMaterial(produceVideo);
+            if (materialCount > 0) {
+                continue;
+            }
             // image to short video
             imageToVideoMaterial(produceVideo);
             // video cut
@@ -150,6 +157,12 @@ public class VideoGenerateJob {
         return ReturnT.SUCCESS;
     }
 
+    private Long countVideoMaterial(ProduceVideo produceVideo) {
+        ProduceVideoMaterialExample example = new ProduceVideoMaterialExample();
+        example.createCriteria().andProduceVideoIdEqualTo(produceVideo.getId());
+        return produceVideoMaterialMapper.countByExample(example);
+    }
+
     private void imageToVideoMaterial(ProduceVideo produceVideo) {
         List<SpiderContentMedia> imageList = spiderMapperExt.getMediaSearchSpiderContentMedia(SpiderContentStatusEnum.PASSED.getCode(),
                 null, null, SpiderContentMediaStatusEnum.PASSED.getCode(), "image");
@@ -165,9 +178,9 @@ public class VideoGenerateJob {
                         .outputFile(outputVideoName)
                         .outputType("video")
                         .build();
-                String imageToVideoUrl = ffmpegApiService.command(commandParam);
-                String fileName = String.format("video/%s", outputVideoName);
-                String imageToVideoOssUrl = AliOssFileTool.downloadAndSaveInOSS(fileName, imageToVideoUrl, "video/mp4");
+                String commandResponseData = ffmpegApiService.command(commandParam);
+                String fileName = String.format("material/video/%s", outputVideoName);
+                String imageToVideoOssUrl = AliOssFileTool.downloadAndSaveInOSS(fileName, commandResponseData, "video/mp4");
 
                 // 获取视频信息
                 MediaInfo mediaInfo = getMediaInfo(imageToVideoOssUrl);
@@ -218,7 +231,7 @@ public class VideoGenerateJob {
                             .build();
                     lastEndTime = endTime;
                     String videoCutUrl = ffmpegApiService.timeCutVideo(timeCutParam);
-                    String fileName = String.format("video/%s_%d.mp4", produceVideo.getContentId(), System.currentTimeMillis());
+                    String fileName = String.format("material/video/%s_%d.mp4", produceVideo.getContentId(), System.currentTimeMillis());
                     String videoCutOssUrl = AliOssFileTool.downloadAndSaveInOSS(fileName, videoCutUrl, "video/mp4");
                     // 获取视频信息
                     MediaInfo mediaInfo = getMediaInfo(videoCutOssUrl);
@@ -277,10 +290,49 @@ public class VideoGenerateJob {
      */
     @XxlJob("videoGenerateJob")
     public ReturnT<String> videoGenerateJob(String param) {
-        // short video to long video
-        // add audio
-
+        List<ProduceVideo> produceList = getProcessingVideoList();
+        if (CollectionUtil.isEmpty(produceList)) {
+            return ReturnT.SUCCESS;
+        }
+        for (ProduceVideo produceVideo : produceList) {
+            // 检查是否存在素材
+             List<ProduceVideoMaterial> materialList = getVideoMaterialList(produceVideo);
+            if (materialList.size() < 10) {
+                continue;
+            }
+            // short video to long video
+             // 视频素材拼接长视频
+            VideoUrlsParam concatParam = VideoUrlsParam.builder()
+                    .videoUrls(materialList.stream().map(ProduceVideoMaterial::getUrl).collect(Collectors.toList()))
+                    .pretreatmentSwitch(1)
+                    .build();
+            String concatVideoUrl = ffmpegApiService.videoConcat(concatParam);
+            // add audio
+            String videoName = String.format("%s_%d.mp4", produceVideo.getId(), System.currentTimeMillis());
+            String command = "ffmpeg -i video.mp4 -i audio.mp3 -c:v copy -map 0:v:0 -map 1:a:0 -shortest -y output.mp4";
+            command = command.replace("video.mp4", concatVideoUrl);
+            command = command.replace("audio.mp3", materialList.get(0).getUrl());
+            command = command.replace("output.mp4", videoName);
+            CommandParam commandParam = CommandParam.builder()
+                    .ffmpegCommand(command)
+                    .outputFile(videoName)
+                    .outputType("video")
+                    .build();
+            String commandResponseData = ffmpegApiService.command(commandParam);
+            String fileName = String.format("video/%s", videoName);
+            String finalVideoUrl = AliOssFileTool.downloadAndSaveInOSS(fileName, commandResponseData, "video/mp4");
+             // 更新视频地址
+             produceVideo.setUrl(finalVideoUrl);
+             produceVideo.setStatus(ProduceVideoStatusEnum.PASSED.getCode());
+             produceVideoMapper.updateByPrimaryKeySelective(produceVideo);
+        }
         return ReturnT.SUCCESS;
     }
 
+    private List<ProduceVideoMaterial> getVideoMaterialList(ProduceVideo produceVideo) {
+        ProduceVideoMaterialExample example = new ProduceVideoMaterialExample();
+        example.createCriteria().andProduceVideoIdEqualTo(produceVideo.getId());
+        return produceVideoMaterialMapper.selectByExample(example);
+    }
+
 }

+ 2 - 0
core/src/main/java/com/tzld/supply/model/param/FFmpeg/VideoUrlsParam.java

@@ -1,5 +1,6 @@
 package com.tzld.supply.model.param.FFmpeg;
 
+import lombok.Builder;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.experimental.Accessors;
@@ -9,6 +10,7 @@ import java.util.List;
 @Getter
 @Setter
 @Accessors(chain = true)
+@Builder
 public class VideoUrlsParam {
     private List<String> videoUrls;
 

+ 52 - 16
core/src/main/java/com/tzld/supply/model/po/supply/spider/ProduceVideo.java

@@ -13,7 +13,7 @@ public class ProduceVideo {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video.id
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     private String id;
 
@@ -24,10 +24,21 @@ public class ProduceVideo {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video.content_id
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     private Long contentId;
 
+    /**
+     * Database Column Remarks:
+     *   生成视频url
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column produce_video.url
+     *
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
+     */
+    private String url;
+
     /**
      * Database Column Remarks:
      *   状态 0-待执行 1-执行中 2-成功 3-失败
@@ -35,7 +46,7 @@ public class ProduceVideo {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video.status
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     private Integer status;
 
@@ -44,7 +55,7 @@ public class ProduceVideo {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video.create_time
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     private Long createTime;
 
@@ -53,7 +64,7 @@ public class ProduceVideo {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video.update_time
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     private Long updateTime;
 
@@ -63,7 +74,7 @@ public class ProduceVideo {
      *
      * @return the value of produce_video.id
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public String getId() {
         return id;
@@ -75,7 +86,7 @@ public class ProduceVideo {
      *
      * @param id the value for produce_video.id
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public void setId(String id) {
         this.id = id;
@@ -87,7 +98,7 @@ public class ProduceVideo {
      *
      * @return the value of produce_video.content_id
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public Long getContentId() {
         return contentId;
@@ -99,19 +110,43 @@ public class ProduceVideo {
      *
      * @param contentId the value for produce_video.content_id
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public void setContentId(Long contentId) {
         this.contentId = contentId;
     }
 
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column produce_video.url
+     *
+     * @return the value of produce_video.url
+     *
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column produce_video.url
+     *
+     * @param url the value for produce_video.url
+     *
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
     /**
      * This method was generated by MyBatis Generator.
      * This method returns the value of the database column produce_video.status
      *
      * @return the value of produce_video.status
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public Integer getStatus() {
         return status;
@@ -123,7 +158,7 @@ public class ProduceVideo {
      *
      * @param status the value for produce_video.status
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public void setStatus(Integer status) {
         this.status = status;
@@ -135,7 +170,7 @@ public class ProduceVideo {
      *
      * @return the value of produce_video.create_time
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public Long getCreateTime() {
         return createTime;
@@ -147,7 +182,7 @@ public class ProduceVideo {
      *
      * @param createTime the value for produce_video.create_time
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public void setCreateTime(Long createTime) {
         this.createTime = createTime;
@@ -159,7 +194,7 @@ public class ProduceVideo {
      *
      * @return the value of produce_video.update_time
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public Long getUpdateTime() {
         return updateTime;
@@ -171,7 +206,7 @@ public class ProduceVideo {
      *
      * @param updateTime the value for produce_video.update_time
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
@@ -181,7 +216,7 @@ public class ProduceVideo {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     @Override
     public String toString() {
@@ -191,6 +226,7 @@ public class ProduceVideo {
         sb.append("Hash = ").append(hashCode());
         sb.append(", id=").append(id);
         sb.append(", contentId=").append(contentId);
+        sb.append(", url=").append(url);
         sb.append(", status=").append(status);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);

+ 87 - 17
core/src/main/java/com/tzld/supply/model/po/supply/spider/ProduceVideoExample.java

@@ -8,7 +8,7 @@ public class ProduceVideoExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     protected String orderByClause;
 
@@ -16,7 +16,7 @@ public class ProduceVideoExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     protected boolean distinct;
 
@@ -24,7 +24,7 @@ public class ProduceVideoExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     protected List<Criteria> oredCriteria;
 
@@ -32,7 +32,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public ProduceVideoExample() {
         oredCriteria = new ArrayList<Criteria>();
@@ -42,7 +42,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public void setOrderByClause(String orderByClause) {
         this.orderByClause = orderByClause;
@@ -52,7 +52,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public String getOrderByClause() {
         return orderByClause;
@@ -62,7 +62,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public void setDistinct(boolean distinct) {
         this.distinct = distinct;
@@ -72,7 +72,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public boolean isDistinct() {
         return distinct;
@@ -82,7 +82,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public List<Criteria> getOredCriteria() {
         return oredCriteria;
@@ -92,7 +92,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public void or(Criteria criteria) {
         oredCriteria.add(criteria);
@@ -102,7 +102,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public Criteria or() {
         Criteria criteria = createCriteriaInternal();
@@ -114,7 +114,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public Criteria createCriteria() {
         Criteria criteria = createCriteriaInternal();
@@ -128,7 +128,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     protected Criteria createCriteriaInternal() {
         Criteria criteria = new Criteria();
@@ -139,7 +139,7 @@ public class ProduceVideoExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public void clear() {
         oredCriteria.clear();
@@ -151,7 +151,7 @@ public class ProduceVideoExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     protected abstract static class GeneratedCriteria {
         protected List<Criterion> criteria;
@@ -324,6 +324,76 @@ public class ProduceVideoExample {
             return (Criteria) this;
         }
 
+        public Criteria andUrlIsNull() {
+            addCriterion("url is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlIsNotNull() {
+            addCriterion("url is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlEqualTo(String value) {
+            addCriterion("url =", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlNotEqualTo(String value) {
+            addCriterion("url <>", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlGreaterThan(String value) {
+            addCriterion("url >", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlGreaterThanOrEqualTo(String value) {
+            addCriterion("url >=", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlLessThan(String value) {
+            addCriterion("url <", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlLessThanOrEqualTo(String value) {
+            addCriterion("url <=", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlLike(String value) {
+            addCriterion("url like", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlNotLike(String value) {
+            addCriterion("url not like", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlIn(List<String> values) {
+            addCriterion("url in", values, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlNotIn(List<String> values) {
+            addCriterion("url not in", values, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlBetween(String value1, String value2) {
+            addCriterion("url between", value1, value2, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlNotBetween(String value1, String value2) {
+            addCriterion("url not between", value1, value2, "url");
+            return (Criteria) this;
+        }
+
         public Criteria andStatusIsNull() {
             addCriterion("`status` is null");
             return (Criteria) this;
@@ -509,7 +579,7 @@ public class ProduceVideoExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table produce_video
      *
-     * @mbg.generated do_not_delete_during_merge Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated do_not_delete_during_merge Mon Oct 27 16:49:13 CST 2025
      */
     public static class Criteria extends GeneratedCriteria {
 
@@ -522,7 +592,7 @@ public class ProduceVideoExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table produce_video
      *
-     * @mbg.generated Fri Oct 24 16:58:10 CST 2025
+     * @mbg.generated Mon Oct 27 16:49:13 CST 2025
      */
     public static class Criterion {
         private String condition;

+ 37 - 20
core/src/main/resources/mapper/supply/spider/ProduceVideoMapper.xml

@@ -5,10 +5,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="content_id" jdbcType="BIGINT" property="contentId" />
+    <result column="url" jdbcType="VARCHAR" property="url" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="create_time" jdbcType="BIGINT" property="createTime" />
     <result column="update_time" jdbcType="BIGINT" property="updateTime" />
@@ -17,7 +18,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -51,7 +52,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -85,15 +86,15 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
-    id, content_id, `status`, create_time, update_time
+    id, content_id, url, `status`, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.supply.model.po.supply.spider.ProduceVideoExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     select
     <if test="distinct">
@@ -112,7 +113,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -123,7 +124,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     delete from produce_video
     where id = #{id,jdbcType=VARCHAR}
@@ -132,7 +133,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     delete from produce_video
     <if test="_parameter != null">
@@ -143,18 +144,20 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
-    insert into produce_video (id, content_id, `status`, 
-      create_time, update_time)
-    values (#{id,jdbcType=VARCHAR}, #{contentId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT})
+    insert into produce_video (id, content_id, url, 
+      `status`, create_time, update_time
+      )
+    values (#{id,jdbcType=VARCHAR}, #{contentId,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.supply.model.po.supply.spider.ProduceVideo">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     insert into produce_video
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -164,6 +167,9 @@
       <if test="contentId != null">
         content_id,
       </if>
+      <if test="url != null">
+        url,
+      </if>
       <if test="status != null">
         `status`,
       </if>
@@ -181,6 +187,9 @@
       <if test="contentId != null">
         #{contentId,jdbcType=BIGINT},
       </if>
+      <if test="url != null">
+        #{url,jdbcType=VARCHAR},
+      </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
@@ -196,7 +205,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     select count(*) from produce_video
     <if test="_parameter != null">
@@ -207,7 +216,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     update produce_video
     <set>
@@ -217,6 +226,9 @@
       <if test="record.contentId != null">
         content_id = #{record.contentId,jdbcType=BIGINT},
       </if>
+      <if test="record.url != null">
+        url = #{record.url,jdbcType=VARCHAR},
+      </if>
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
       </if>
@@ -235,11 +247,12 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     update produce_video
     set id = #{record.id,jdbcType=VARCHAR},
       content_id = #{record.contentId,jdbcType=BIGINT},
+      url = #{record.url,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=BIGINT},
       update_time = #{record.updateTime,jdbcType=BIGINT}
@@ -251,13 +264,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     update produce_video
     <set>
       <if test="contentId != null">
         content_id = #{contentId,jdbcType=BIGINT},
       </if>
+      <if test="url != null">
+        url = #{url,jdbcType=VARCHAR},
+      </if>
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
       </if>
@@ -274,10 +290,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 24 16:58:10 CST 2025.
+      This element was generated on Mon Oct 27 16:49:13 CST 2025.
     -->
     update produce_video
     set content_id = #{contentId,jdbcType=BIGINT},
+      url = #{url,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=BIGINT},
       update_time = #{updateTime,jdbcType=BIGINT}

+ 6 - 0
server/src/main/java/com/tzld/supply/controller/XxlJobController.java

@@ -94,4 +94,10 @@ public class XxlJobController {
         return CommonResponse.success();
     }
 
+    @GetMapping("/videoGenerateJob")
+    public CommonResponse<Void> videoGenerateJob(String dateStr) {
+        videoGenerateJob.videoGenerateJob(dateStr);
+        return CommonResponse.success();
+    }
+
 }