Quellcode durchsuchen

增加竖屏视频比例

wangyunpeng vor 4 Tagen
Ursprung
Commit
d877925a8f

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

@@ -10,7 +10,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     long countByExample(ProduceVideoMaterialExample example);
 
@@ -18,7 +18,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     int deleteByExample(ProduceVideoMaterialExample example);
 
@@ -26,7 +26,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     int deleteByPrimaryKey(String id);
 
@@ -34,7 +34,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     int insert(ProduceVideoMaterial record);
 
@@ -42,7 +42,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     int insertSelective(ProduceVideoMaterial record);
 
@@ -50,7 +50,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     List<ProduceVideoMaterial> selectByExample(ProduceVideoMaterialExample example);
 
@@ -58,7 +58,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     ProduceVideoMaterial selectByPrimaryKey(String id);
 
@@ -66,7 +66,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     int updateByExampleSelective(@Param("record") ProduceVideoMaterial record, @Param("example") ProduceVideoMaterialExample example);
 
@@ -74,7 +74,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     int updateByExample(@Param("record") ProduceVideoMaterial record, @Param("example") ProduceVideoMaterialExample example);
 
@@ -82,7 +82,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     int updateByPrimaryKeySelective(ProduceVideoMaterial record);
 
@@ -90,7 +90,7 @@ public interface ProduceVideoMaterialMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     int updateByPrimaryKey(ProduceVideoMaterial record);
 }

+ 52 - 16
core/src/main/java/com/tzld/supply/job/VideoGenerateJob.java

@@ -59,6 +59,9 @@ public class VideoGenerateJob {
     @Value("${produce.video.max.size:10}")
     private Integer maxProduceSize;
 
+    @Value("${produce.video.vertical.rate:8}")
+    private Integer verticalRate;
+
     /**
      * 生成音频
      *
@@ -272,7 +275,11 @@ public class VideoGenerateJob {
         return JSONObject.parseObject(mediaInfo, MediaInfo.class);
     }
 
-    private void saveVideoMaterial(ProduceVideo produceVideo, Long mediaId, String imageToVideoOssUrl, MediaInfo videoInfo, Integer sourceType) {
+    private void saveVideoMaterial(ProduceVideo produceVideo,
+                                   Long mediaId,
+                                   String imageToVideoOssUrl,
+                                   MediaInfo mediaInfo,
+                                   Integer sourceType) {
         Long now = System.currentTimeMillis();
         ProduceVideoMaterial material = new ProduceVideoMaterial();
         material.setId(DistributedIdGenerator.generate());
@@ -280,7 +287,12 @@ public class VideoGenerateJob {
         material.setSourceMediaId(mediaId);
         material.setSourceType(sourceType);
         material.setUrl(imageToVideoOssUrl);
-        material.setDuration(videoInfo.getDuration());
+        if (Objects.nonNull(mediaInfo)) {
+            material.setDuration(mediaInfo.getDuration());
+            material.setWidth(mediaInfo.getWidth());
+            material.setHeight(mediaInfo.getHeight());
+            material.setSize(mediaInfo.getSize());
+        }
         material.setCreateTime(now);
         material.setUpdateTime(now);
         produceVideoMaterialMapper.insertSelective(material);
@@ -405,7 +417,7 @@ public class VideoGenerateJob {
             // 视频素材拼接长视频 随机排序
             Collections.shuffle(materialList);
             // 时长大于音频停止 拼接视频
-            List<String> videoUrls = selectMaterial(materialList, audio);
+            List<String> videoUrls = selectMaterial(materialList, audio.getDuration());
             VideoUrlsParam concatParam = VideoUrlsParam.builder()
                     .videoUrls(videoUrls)
                     .pretreatmentSwitch(1)
@@ -450,25 +462,49 @@ public class VideoGenerateJob {
         return spiderContentMediaMapper.selectByExample(example);
     }
 
-    private List<String> selectMaterial(List<ProduceVideoMaterial> materialList, ProduceVideoAudio audio) {
-        Integer duration = audio.getDuration();
+    private List<String> selectMaterial(List<ProduceVideoMaterial> materialList, Integer duration) {
         List<String> videoUrls = new ArrayList<>();
-        // 开头素材使用图片生成视频 固定生成视频比例
-        Iterator<ProduceVideoMaterial> iterator = materialList.iterator();
-        while (iterator.hasNext()) {
-            ProduceVideoMaterial material = iterator.next();
-            if (material.getSourceType() == 1) {
+
+        // 分离竖屏素材(width < height)和横屏素材(width >= height)
+        List<ProduceVideoMaterial> verticalMaterials = materialList.stream()
+                .filter(material -> material.getWidth() < material.getHeight())
+                .collect(Collectors.toList());
+        List<ProduceVideoMaterial> horizontalMaterials = materialList.stream()
+                .filter(material -> material.getWidth() >= material.getHeight())
+                .collect(Collectors.toList());
+
+        // 开头优先使用竖屏素材(若存在)
+        if (!verticalMaterials.isEmpty()) {
+            // 随机选择一个竖屏素材(允许重复使用,不从列表中移除)
+            ProduceVideoMaterial firstMaterial = verticalMaterials.get(new Random().nextInt(verticalMaterials.size()));
+            videoUrls.add(firstMaterial.getUrl());
+            duration -= firstMaterial.getDuration();
+        } else if (!horizontalMaterials.isEmpty()) {
+            // 无竖屏素材时使用横屏素材
+            ProduceVideoMaterial firstMaterial = horizontalMaterials.get(new Random().nextInt(horizontalMaterials.size()));
+            videoUrls.add(firstMaterial.getUrl());
+            duration -= firstMaterial.getDuration();
+        }
+
+        // 剩余时长填充:优先竖屏,穿插横屏,允许重复使用
+        Random random = new Random();
+        while (duration > 0) {
+            // 优先选择竖屏素材,若竖屏列表为空则强制选择横屏
+            boolean chooseVertical = !verticalMaterials.isEmpty() && (random.nextInt(10) < verticalRate);
+
+            if (chooseVertical) {
+                ProduceVideoMaterial material = verticalMaterials.get(random.nextInt(verticalMaterials.size()));
+                videoUrls.add(material.getUrl());
+                duration -= material.getDuration();
+            } else if (!horizontalMaterials.isEmpty()) {
+                ProduceVideoMaterial material = horizontalMaterials.get(random.nextInt(horizontalMaterials.size()));
                 videoUrls.add(material.getUrl());
                 duration -= material.getDuration();
-                iterator.remove();
+            } else {
+                // 若所有素材列表为空,避免无限循环
                 break;
             }
         }
-        while (duration > 0) {
-            ProduceVideoMaterial material = materialList.get(new Random().nextInt(materialList.size()));
-            videoUrls.add(material.getUrl());
-            duration -= material.getDuration();
-        }
         return videoUrls;
     }
 

+ 2 - 4
core/src/main/java/com/tzld/supply/model/param/FFmpeg/VideoInfoParam.java

@@ -1,14 +1,12 @@
 package com.tzld.supply.model.param.FFmpeg;
 
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
+import lombok.*;
 
 @Getter
 @Setter
 @NoArgsConstructor
 @AllArgsConstructor
+@Builder
 public class VideoInfoParam {
     private String videoUrl;
 }

+ 136 - 28
core/src/main/java/com/tzld/supply/model/po/supply/spider/ProduceVideoMaterial.java

@@ -13,7 +13,7 @@ public class ProduceVideoMaterial {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video_material.id
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     private String id;
 
@@ -24,7 +24,7 @@ public class ProduceVideoMaterial {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video_material.produce_video_id
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     private String produceVideoId;
 
@@ -35,7 +35,7 @@ public class ProduceVideoMaterial {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video_material.source_media_id
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     private Long sourceMediaId;
 
@@ -46,7 +46,7 @@ public class ProduceVideoMaterial {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video_material.source_type
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     private Integer sourceType;
 
@@ -57,10 +57,43 @@ public class ProduceVideoMaterial {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video_material.url
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     private String url;
 
+    /**
+     * Database Column Remarks:
+     *   宽
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column produce_video_material.width
+     *
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
+     */
+    private Integer width;
+
+    /**
+     * Database Column Remarks:
+     *   高
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column produce_video_material.height
+     *
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
+     */
+    private Integer height;
+
+    /**
+     * Database Column Remarks:
+     *   文件大小
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column produce_video_material.size
+     *
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
+     */
+    private Integer size;
+
     /**
      * Database Column Remarks:
      *   时长
@@ -68,7 +101,7 @@ public class ProduceVideoMaterial {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video_material.duration
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     private Integer duration;
 
@@ -79,7 +112,7 @@ public class ProduceVideoMaterial {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video_material.status
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     private Integer status;
 
@@ -88,7 +121,7 @@ public class ProduceVideoMaterial {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video_material.create_time
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     private Long createTime;
 
@@ -97,7 +130,7 @@ public class ProduceVideoMaterial {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column produce_video_material.update_time
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     private Long updateTime;
 
@@ -107,7 +140,7 @@ public class ProduceVideoMaterial {
      *
      * @return the value of produce_video_material.id
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public String getId() {
         return id;
@@ -119,7 +152,7 @@ public class ProduceVideoMaterial {
      *
      * @param id the value for produce_video_material.id
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setId(String id) {
         this.id = id;
@@ -131,7 +164,7 @@ public class ProduceVideoMaterial {
      *
      * @return the value of produce_video_material.produce_video_id
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public String getProduceVideoId() {
         return produceVideoId;
@@ -143,7 +176,7 @@ public class ProduceVideoMaterial {
      *
      * @param produceVideoId the value for produce_video_material.produce_video_id
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setProduceVideoId(String produceVideoId) {
         this.produceVideoId = produceVideoId;
@@ -155,7 +188,7 @@ public class ProduceVideoMaterial {
      *
      * @return the value of produce_video_material.source_media_id
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public Long getSourceMediaId() {
         return sourceMediaId;
@@ -167,7 +200,7 @@ public class ProduceVideoMaterial {
      *
      * @param sourceMediaId the value for produce_video_material.source_media_id
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setSourceMediaId(Long sourceMediaId) {
         this.sourceMediaId = sourceMediaId;
@@ -179,7 +212,7 @@ public class ProduceVideoMaterial {
      *
      * @return the value of produce_video_material.source_type
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public Integer getSourceType() {
         return sourceType;
@@ -191,7 +224,7 @@ public class ProduceVideoMaterial {
      *
      * @param sourceType the value for produce_video_material.source_type
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setSourceType(Integer sourceType) {
         this.sourceType = sourceType;
@@ -203,7 +236,7 @@ public class ProduceVideoMaterial {
      *
      * @return the value of produce_video_material.url
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public String getUrl() {
         return url;
@@ -215,19 +248,91 @@ public class ProduceVideoMaterial {
      *
      * @param url the value for produce_video_material.url
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 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_material.width
+     *
+     * @return the value of produce_video_material.width
+     *
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
+     */
+    public Integer getWidth() {
+        return width;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column produce_video_material.width
+     *
+     * @param width the value for produce_video_material.width
+     *
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
+     */
+    public void setWidth(Integer width) {
+        this.width = width;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column produce_video_material.height
+     *
+     * @return the value of produce_video_material.height
+     *
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
+     */
+    public Integer getHeight() {
+        return height;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column produce_video_material.height
+     *
+     * @param height the value for produce_video_material.height
+     *
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
+     */
+    public void setHeight(Integer height) {
+        this.height = height;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column produce_video_material.size
+     *
+     * @return the value of produce_video_material.size
+     *
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
+     */
+    public Integer getSize() {
+        return size;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column produce_video_material.size
+     *
+     * @param size the value for produce_video_material.size
+     *
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
+     */
+    public void setSize(Integer size) {
+        this.size = size;
+    }
+
     /**
      * This method was generated by MyBatis Generator.
      * This method returns the value of the database column produce_video_material.duration
      *
      * @return the value of produce_video_material.duration
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public Integer getDuration() {
         return duration;
@@ -239,7 +344,7 @@ public class ProduceVideoMaterial {
      *
      * @param duration the value for produce_video_material.duration
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setDuration(Integer duration) {
         this.duration = duration;
@@ -251,7 +356,7 @@ public class ProduceVideoMaterial {
      *
      * @return the value of produce_video_material.status
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public Integer getStatus() {
         return status;
@@ -263,7 +368,7 @@ public class ProduceVideoMaterial {
      *
      * @param status the value for produce_video_material.status
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setStatus(Integer status) {
         this.status = status;
@@ -275,7 +380,7 @@ public class ProduceVideoMaterial {
      *
      * @return the value of produce_video_material.create_time
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public Long getCreateTime() {
         return createTime;
@@ -287,7 +392,7 @@ public class ProduceVideoMaterial {
      *
      * @param createTime the value for produce_video_material.create_time
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setCreateTime(Long createTime) {
         this.createTime = createTime;
@@ -299,7 +404,7 @@ public class ProduceVideoMaterial {
      *
      * @return the value of produce_video_material.update_time
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public Long getUpdateTime() {
         return updateTime;
@@ -311,7 +416,7 @@ public class ProduceVideoMaterial {
      *
      * @param updateTime the value for produce_video_material.update_time
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
@@ -321,7 +426,7 @@ public class ProduceVideoMaterial {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     @Override
     public String toString() {
@@ -334,6 +439,9 @@ public class ProduceVideoMaterial {
         sb.append(", sourceMediaId=").append(sourceMediaId);
         sb.append(", sourceType=").append(sourceType);
         sb.append(", url=").append(url);
+        sb.append(", width=").append(width);
+        sb.append(", height=").append(height);
+        sb.append(", size=").append(size);
         sb.append(", duration=").append(duration);
         sb.append(", status=").append(status);
         sb.append(", createTime=").append(createTime);

+ 197 - 17
core/src/main/java/com/tzld/supply/model/po/supply/spider/ProduceVideoMaterialExample.java

@@ -8,7 +8,7 @@ public class ProduceVideoMaterialExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     protected String orderByClause;
 
@@ -16,7 +16,7 @@ public class ProduceVideoMaterialExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     protected boolean distinct;
 
@@ -24,7 +24,7 @@ public class ProduceVideoMaterialExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     protected List<Criteria> oredCriteria;
 
@@ -32,7 +32,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public ProduceVideoMaterialExample() {
         oredCriteria = new ArrayList<Criteria>();
@@ -42,7 +42,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setOrderByClause(String orderByClause) {
         this.orderByClause = orderByClause;
@@ -52,7 +52,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public String getOrderByClause() {
         return orderByClause;
@@ -62,7 +62,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void setDistinct(boolean distinct) {
         this.distinct = distinct;
@@ -72,7 +72,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public boolean isDistinct() {
         return distinct;
@@ -82,7 +82,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public List<Criteria> getOredCriteria() {
         return oredCriteria;
@@ -92,7 +92,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void or(Criteria criteria) {
         oredCriteria.add(criteria);
@@ -102,7 +102,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public Criteria or() {
         Criteria criteria = createCriteriaInternal();
@@ -114,7 +114,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public Criteria createCriteria() {
         Criteria criteria = createCriteriaInternal();
@@ -128,7 +128,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     protected Criteria createCriteriaInternal() {
         Criteria criteria = new Criteria();
@@ -139,7 +139,7 @@ public class ProduceVideoMaterialExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public void clear() {
         oredCriteria.clear();
@@ -151,7 +151,7 @@ public class ProduceVideoMaterialExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     protected abstract static class GeneratedCriteria {
         protected List<Criterion> criteria;
@@ -524,6 +524,186 @@ public class ProduceVideoMaterialExample {
             return (Criteria) this;
         }
 
+        public Criteria andWidthIsNull() {
+            addCriterion("width is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthIsNotNull() {
+            addCriterion("width is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthEqualTo(Integer value) {
+            addCriterion("width =", value, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthNotEqualTo(Integer value) {
+            addCriterion("width <>", value, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthGreaterThan(Integer value) {
+            addCriterion("width >", value, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthGreaterThanOrEqualTo(Integer value) {
+            addCriterion("width >=", value, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthLessThan(Integer value) {
+            addCriterion("width <", value, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthLessThanOrEqualTo(Integer value) {
+            addCriterion("width <=", value, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthIn(List<Integer> values) {
+            addCriterion("width in", values, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthNotIn(List<Integer> values) {
+            addCriterion("width not in", values, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthBetween(Integer value1, Integer value2) {
+            addCriterion("width between", value1, value2, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andWidthNotBetween(Integer value1, Integer value2) {
+            addCriterion("width not between", value1, value2, "width");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightIsNull() {
+            addCriterion("height is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightIsNotNull() {
+            addCriterion("height is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightEqualTo(Integer value) {
+            addCriterion("height =", value, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightNotEqualTo(Integer value) {
+            addCriterion("height <>", value, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightGreaterThan(Integer value) {
+            addCriterion("height >", value, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightGreaterThanOrEqualTo(Integer value) {
+            addCriterion("height >=", value, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightLessThan(Integer value) {
+            addCriterion("height <", value, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightLessThanOrEqualTo(Integer value) {
+            addCriterion("height <=", value, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightIn(List<Integer> values) {
+            addCriterion("height in", values, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightNotIn(List<Integer> values) {
+            addCriterion("height not in", values, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightBetween(Integer value1, Integer value2) {
+            addCriterion("height between", value1, value2, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeightNotBetween(Integer value1, Integer value2) {
+            addCriterion("height not between", value1, value2, "height");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeIsNull() {
+            addCriterion("`size` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeIsNotNull() {
+            addCriterion("`size` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeEqualTo(Integer value) {
+            addCriterion("`size` =", value, "size");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeNotEqualTo(Integer value) {
+            addCriterion("`size` <>", value, "size");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeGreaterThan(Integer value) {
+            addCriterion("`size` >", value, "size");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`size` >=", value, "size");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeLessThan(Integer value) {
+            addCriterion("`size` <", value, "size");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeLessThanOrEqualTo(Integer value) {
+            addCriterion("`size` <=", value, "size");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeIn(List<Integer> values) {
+            addCriterion("`size` in", values, "size");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeNotIn(List<Integer> values) {
+            addCriterion("`size` not in", values, "size");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeBetween(Integer value1, Integer value2) {
+            addCriterion("`size` between", value1, value2, "size");
+            return (Criteria) this;
+        }
+
+        public Criteria andSizeNotBetween(Integer value1, Integer value2) {
+            addCriterion("`size` not between", value1, value2, "size");
+            return (Criteria) this;
+        }
+
         public Criteria andDurationIsNull() {
             addCriterion("duration is null");
             return (Criteria) this;
@@ -769,7 +949,7 @@ public class ProduceVideoMaterialExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table produce_video_material
      *
-     * @mbg.generated do_not_delete_during_merge Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated do_not_delete_during_merge Tue Nov 11 19:09:57 CST 2025
      */
     public static class Criteria extends GeneratedCriteria {
 
@@ -782,7 +962,7 @@ public class ProduceVideoMaterialExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table produce_video_material
      *
-     * @mbg.generated Tue Oct 28 10:44:35 CST 2025
+     * @mbg.generated Tue Nov 11 19:09:57 CST 2025
      */
     public static class Criterion {
         private String condition;

+ 66 - 19
core/src/main/resources/mapper/supply/spider/ProduceVideoMaterialMapper.xml

@@ -5,13 +5,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="produce_video_id" jdbcType="VARCHAR" property="produceVideoId" />
     <result column="source_media_id" jdbcType="BIGINT" property="sourceMediaId" />
     <result column="source_type" jdbcType="INTEGER" property="sourceType" />
     <result column="url" jdbcType="VARCHAR" property="url" />
+    <result column="width" jdbcType="INTEGER" property="width" />
+    <result column="height" jdbcType="INTEGER" property="height" />
+    <result column="size" jdbcType="INTEGER" property="size" />
     <result column="duration" jdbcType="INTEGER" property="duration" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="create_time" jdbcType="BIGINT" property="createTime" />
@@ -21,7 +24,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -55,7 +58,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -89,16 +92,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
-    id, produce_video_id, source_media_id, source_type, url, duration, `status`, create_time, 
-    update_time
+    id, produce_video_id, source_media_id, source_type, url, width, height, `size`, duration, 
+    `status`, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.supply.model.po.supply.spider.ProduceVideoMaterialExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     select
     <if test="distinct">
@@ -117,7 +120,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -128,7 +131,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     delete from produce_video_material
     where id = #{id,jdbcType=VARCHAR}
@@ -137,7 +140,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     delete from produce_video_material
     <if test="_parameter != null">
@@ -148,14 +151,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     insert into produce_video_material (id, produce_video_id, source_media_id, 
-      source_type, url, duration, 
+      source_type, url, width, 
+      height, `size`, duration, 
       `status`, create_time, update_time
       )
     values (#{id,jdbcType=VARCHAR}, #{produceVideoId,jdbcType=VARCHAR}, #{sourceMediaId,jdbcType=BIGINT}, 
-      #{sourceType,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR}, #{duration,jdbcType=INTEGER}, 
+      #{sourceType,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR}, #{width,jdbcType=INTEGER}, 
+      #{height,jdbcType=INTEGER}, #{size,jdbcType=INTEGER}, #{duration,jdbcType=INTEGER}, 
       #{status,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}
       )
   </insert>
@@ -163,7 +168,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     insert into produce_video_material
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -182,6 +187,15 @@
       <if test="url != null">
         url,
       </if>
+      <if test="width != null">
+        width,
+      </if>
+      <if test="height != null">
+        height,
+      </if>
+      <if test="size != null">
+        `size`,
+      </if>
       <if test="duration != null">
         duration,
       </if>
@@ -211,6 +225,15 @@
       <if test="url != null">
         #{url,jdbcType=VARCHAR},
       </if>
+      <if test="width != null">
+        #{width,jdbcType=INTEGER},
+      </if>
+      <if test="height != null">
+        #{height,jdbcType=INTEGER},
+      </if>
+      <if test="size != null">
+        #{size,jdbcType=INTEGER},
+      </if>
       <if test="duration != null">
         #{duration,jdbcType=INTEGER},
       </if>
@@ -229,7 +252,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     select count(*) from produce_video_material
     <if test="_parameter != null">
@@ -240,7 +263,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     update produce_video_material
     <set>
@@ -259,6 +282,15 @@
       <if test="record.url != null">
         url = #{record.url,jdbcType=VARCHAR},
       </if>
+      <if test="record.width != null">
+        width = #{record.width,jdbcType=INTEGER},
+      </if>
+      <if test="record.height != null">
+        height = #{record.height,jdbcType=INTEGER},
+      </if>
+      <if test="record.size != null">
+        `size` = #{record.size,jdbcType=INTEGER},
+      </if>
       <if test="record.duration != null">
         duration = #{record.duration,jdbcType=INTEGER},
       </if>
@@ -280,7 +312,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     update produce_video_material
     set id = #{record.id,jdbcType=VARCHAR},
@@ -288,6 +320,9 @@
       source_media_id = #{record.sourceMediaId,jdbcType=BIGINT},
       source_type = #{record.sourceType,jdbcType=INTEGER},
       url = #{record.url,jdbcType=VARCHAR},
+      width = #{record.width,jdbcType=INTEGER},
+      height = #{record.height,jdbcType=INTEGER},
+      `size` = #{record.size,jdbcType=INTEGER},
       duration = #{record.duration,jdbcType=INTEGER},
       `status` = #{record.status,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=BIGINT},
@@ -300,7 +335,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     update produce_video_material
     <set>
@@ -316,6 +351,15 @@
       <if test="url != null">
         url = #{url,jdbcType=VARCHAR},
       </if>
+      <if test="width != null">
+        width = #{width,jdbcType=INTEGER},
+      </if>
+      <if test="height != null">
+        height = #{height,jdbcType=INTEGER},
+      </if>
+      <if test="size != null">
+        `size` = #{size,jdbcType=INTEGER},
+      </if>
       <if test="duration != null">
         duration = #{duration,jdbcType=INTEGER},
       </if>
@@ -335,13 +379,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 28 10:44:35 CST 2025.
+      This element was generated on Tue Nov 11 19:09:57 CST 2025.
     -->
     update produce_video_material
     set produce_video_id = #{produceVideoId,jdbcType=VARCHAR},
       source_media_id = #{sourceMediaId,jdbcType=BIGINT},
       source_type = #{sourceType,jdbcType=INTEGER},
       url = #{url,jdbcType=VARCHAR},
+      width = #{width,jdbcType=INTEGER},
+      height = #{height,jdbcType=INTEGER},
+      `size` = #{size,jdbcType=INTEGER},
       duration = #{duration,jdbcType=INTEGER},
       `status` = #{status,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=BIGINT},