소스 검색

feat: 添加视频字段

xdd 1 개월 전
부모
커밋
51b46a7a2b

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/domain/FsStoreProduct.java

@@ -21,6 +21,8 @@ public class FsStoreProduct extends BaseEntity
     /** 商品id */
     private Long productId;
 
+    private String video;
+
     /** 商品图片 */
     @Excel(name = "商品图片")
     private String image;

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/param/FsStoreProductAddEditParam.java

@@ -24,6 +24,8 @@ public class FsStoreProductAddEditParam implements Serializable
 
     /** 商品图片 */
     private String image;
+    private String video;
+
 
     /** 轮播图 */
     private String sliderImage;

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/service/impl/FsStoreProductServiceImpl.java

@@ -250,6 +250,7 @@ public class FsStoreProductServiceImpl implements IFsStoreProductService
             product.setCost(countDto.getMinCost());
             product.setIntegral(Long.parseLong(countDto.getMinIntegral().toString()));
             product.setStock(Long.parseLong(countDto.getStock().toString()));
+            product.setVideo(param.getVideo());
             fsStoreProductMapper.updateFsStoreProduct(product);
             if (param.getSpecType().equals(0)) {
                 ProductArrtDTO fromatDetailDto = ProductArrtDTO.builder()
@@ -272,6 +273,7 @@ public class FsStoreProductServiceImpl implements IFsStoreProductService
             product.setCost(countDto.getMinCost());
             product.setIntegral(Long.parseLong(countDto.getMinIntegral().toString()));
             product.setStock(Long.parseLong(countDto.getStock().toString()));
+            product.setVideo(param.getVideo());
             fsStoreProductMapper.insertFsStoreProduct(product);
             if (param.getSpecType().equals(0)) {
                 ProductArrtDTO fromatDetailDto = ProductArrtDTO.builder()

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/vo/FsStoreProductQueryVO.java

@@ -15,6 +15,8 @@ public class FsStoreProductQueryVO implements Serializable
     /** 商品图片 */
     private String image;
 
+    private String video;
+
     /** 轮播图 */
     private String sliderImage;
 

+ 5 - 1
fs-service-system/src/main/resources/mapper/store/FsStoreProductMapper.xml

@@ -47,10 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="prescribeName"    column="prescribe_name"    />
         <result property="isDisplay"    column="is_display"    />
         <result property="tuiCateId"    column="tui_cate_id"    />
+        <result property="video"    column="video"    />
     </resultMap>
 
     <sql id="selectFsStoreProductVo">
-        select product_id, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, postage, unit_name, sort, sales, stock, is_show, is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage, is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral, integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,is_display,tui_cate_id,warehouse_id,warehouse_code from fs_store_product
+        select product_id, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, postage, unit_name, sort, sales, stock, is_show, is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage, is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral, integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,is_display,tui_cate_id,warehouse_id,warehouse_code,video from fs_store_product
     </sql>
 
     <select id="selectFsStoreProductList" parameterType="FsStoreProduct" resultMap="FsStoreProductResult">
@@ -108,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into fs_store_product
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">image,</if>
+            <if test="video != null and video != ''">video,</if>
             <if test="sliderImage != null and sliderImage != ''">slider_image,</if>
             <if test="productName != null and productName != ''">product_name,</if>
             <if test="productInfo != null and productInfo != ''">product_info,</if>
@@ -153,6 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">#{image},</if>
+            <if test="video != null and video != ''">#{video},</if>
             <if test="sliderImage != null and sliderImage != ''">#{sliderImage},</if>
             <if test="productName != null and productName != ''">#{productName},</if>
             <if test="productInfo != null and productInfo != ''">#{productInfo},</if>
@@ -202,6 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update fs_store_product
         <trim prefix="SET" suffixOverrides=",">
             <if test="image != null and image != ''">image = #{image},</if>
+            <if test="video != null and video != ''">video = #{video},</if>
             <if test="sliderImage != null and sliderImage != ''">slider_image = #{sliderImage},</if>
             <if test="productName != null and productName != ''">product_name = #{productName},</if>
             <if test="productInfo != null and productInfo != ''">product_info = #{productInfo},</if>