소스 검색

Merge branch 'dev-yhq'

tsurumure 1 개월 전
부모
커밋
70fbb95a6d

+ 1 - 0
db/ai_material.sql

@@ -15,6 +15,7 @@ CREATE TABLE `ai_material` (
     `image_thumb_url` VARCHAR(1000) COMMENT '缩略图',
     `image_url` VARCHAR(1000) COMMENT '高清图',
     `file_url` VARCHAR(1000) COMMENT '文件地址',
+    `pan_baidu_url` VARCHAR(1000) COMMENT '百度网盘地址',
     `is_copyright` TINYINT DEFAULT '-1' COMMENT '是否有版权 (-1否, 1是)',
     `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
     `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',

+ 3 - 1
src/main/java/com/backendsys/modules/material/entity/Material.java

@@ -55,8 +55,10 @@ public class Material {
     private String image_thumb_url;
     @Size(max = 1000, message = "高清图路径长度不超过 {max} 个字符", groups = { Create.class, Update.class })
     private String image_url;
-    @Size(max = 1000, message = "FLA路径长度不超过 {max} 个字符", groups = { Create.class, Update.class })
+    @Size(max = 1000, message = "文件地址长度不超过 {max} 个字符", groups = { Create.class, Update.class })
     private String file_url;
+    @Size(max = 1000, message = "百度网盘地址长度不超过 {max} 个字符", groups = { Create.class, Update.class })
+    private String pan_baidu_url;
 
     @RangeArray(message="是否有版权,范围应是(-1否, 1是)", value = {"-1", "1"}, groups = { Create.class, Update.class })
     private Integer is_copyright;

+ 0 - 3
src/main/java/com/backendsys/modules/material/service/impl/MaterialCategoryImpl.java

@@ -37,14 +37,11 @@ public class MaterialCategoryImpl implements MaterialCategoryService {
         // [DB] 查询非共享的素材分类 { is_share = -1 }
         materialCategory.setIs_share(-1);
         List<MaterialCategory> list = materialCategoryDao.selectMaterialCategoryList(materialCategory);
-        System.out.println("list = " + list);
-        System.out.println("-----------------");
 
         // [DB] 查询共享的素材分类 { is_share = 1, lora_id = null }
         materialCategory.setLora_id(null);
         materialCategory.setIs_share(1);
         List<MaterialCategory> list_of_share = materialCategoryDao.selectMaterialCategoryList(materialCategory);
-        System.out.println("list_of_share = " + list_of_share);
 
         // 将共享分类追加到非共享分类后面
         list.addAll(list_of_share);

+ 5 - 0
src/main/resources/mapper/ai/material/MaterialDao.xml

@@ -27,6 +27,7 @@
         COALESCE(m.image_thumb_url, '') image_thumb_url,
         COALESCE(m.image_url, '') image_url,
         COALESCE(m.file_url, '') file_url,
+        COALESCE(m.pan_baidu_url, '') pan_baidu_url,
         m.is_copyright,
         m.create_time,
         m.update_time
@@ -61,6 +62,7 @@
         <result property="image_thumb_url" column="image_thumb_url" />
         <result property="image_url" column="image_url" />
         <result property="file_url" column="file_url" />
+        <result property="pan_baidu_url" column="pan_baidu_url" />
         <result property="is_copyright" column="is_copyright" javaType="java.lang.Integer" />
         <result property="create_time" column="create_time"
                 typeHandler="com.backendsys.config.Mybatis.handler.timezone.LocalDateTimeHandler" />
@@ -109,6 +111,7 @@
             <if test="image_thumb_url != null and image_thumb_url != ''">, image_thumb_url</if>
             <if test="image_url != null and image_url != ''">, image_url</if>
             <if test="file_url != null and file_url != ''">, file_url</if>
+            <if test="pan_baidu_url != null and pan_baidu_url != ''">, pan_baidu_url</if>
             <if test="is_copyright != null and is_copyright != ''">, is_copyright</if>
         )
         VALUES (
@@ -117,6 +120,7 @@
             <if test="image_thumb_url != null and image_thumb_url != ''">, #{image_thumb_url}</if>
             <if test="image_url != null and image_url != ''">, #{image_url}</if>
             <if test="file_url != null and file_url != ''">, #{file_url}</if>
+            <if test="pan_baidu_url != null and pan_baidu_url != ''">, #{pan_baidu_url}</if>
             <if test="is_copyright != null and is_copyright != ''">, #{is_copyright}</if>
        )
     </insert>
@@ -132,6 +136,7 @@
         <if test="image_thumb_url != null and image_thumb_url != ''">, image_thumb_url = #{image_thumb_url}</if>
         <if test="image_url != null and image_url != ''">, image_url = #{image_url}</if>
         <if test="file_url != null and file_url != ''">, file_url = #{file_url}</if>
+        <if test="pan_baidu_url != null and pan_baidu_url != ''">, pan_baidu_url = #{pan_baidu_url}</if>
         <if test="is_copyright != null and is_copyright != ''">, is_copyright = #{is_copyright}</if>
         WHERE id = #{material_id}
     </update>