Forráskód Böngészése

产品新增仓库id、仓库code字段

xdd 1 hónapja
szülő
commit
f04bc2f5f7

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

@@ -170,6 +170,32 @@ public class FsStoreProduct extends BaseEntity
 
     private Integer tuiCateId;
 
+    /**
+     * 仓库id
+     */
+    private Long warehouseId;
+    /**
+     * 仓库代码
+     */
+    @Excel(name = "仓库代码")
+    private String warehouseCode;
+
+    public Long getWarehouseId() {
+        return warehouseId;
+    }
+
+    public void setWarehouseId(Long warehouseId) {
+        this.warehouseId = warehouseId;
+    }
+
+    public String getWarehouseCode() {
+        return warehouseCode;
+    }
+
+    public void setWarehouseCode(String warehouseCode) {
+        this.warehouseCode = warehouseCode;
+    }
+
     public Integer getTuiCateId() {
         return tuiCateId;
     }

+ 10 - 2
fs-service-system/src/main/java/com/fs/store/vo/FsStoreProductActivityListVO.java

@@ -1,5 +1,6 @@
 package com.fs.store.vo;
 
+import com.fs.common.annotation.Excel;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -8,7 +9,7 @@ import java.math.BigDecimal;
 @Data
 /**
  * 商品对象 fs_store_product
- * 
+ *
  * @author fs
  * @date 2022-03-15
  */
@@ -46,7 +47,14 @@ public class FsStoreProductActivityListVO implements Serializable
 
     /** 库存 */
     private Long stock;
-
+    /**
+     * 仓库id
+     */
+    private Long warehouseId;
+    /**
+     * 仓库代码
+     */
+    private String warehouseCode;
 
 
 }

+ 5 - 0
fs-service-system/src/main/java/com/fs/store/vo/FsStoreProductExportVO.java

@@ -190,4 +190,9 @@ public class FsStoreProductExportVO implements Serializable {
     @Excel(name = "代理价")
     private BigDecimal agentPrice;
 
+    /**
+     * 仓库代码
+     */
+    @Excel(name = "仓库代码")
+    private String warehouseCode;
 }

+ 9 - 1
fs-service-system/src/main/java/com/fs/store/vo/FsStoreProductListQueryVO.java

@@ -1,5 +1,6 @@
 package com.fs.store.vo;
 
+import com.fs.common.annotation.Excel;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -35,7 +36,14 @@ public class FsStoreProductListQueryVO implements Serializable
     private String unitName;
 
 
-
+    /**
+     * 仓库id
+     */
+    private Long warehouseId;
+    /**
+     * 仓库代码
+     */
+    private String warehouseCode;
 
 
 

+ 10 - 1
fs-service-system/src/main/java/com/fs/store/vo/FsStoreProductListVO.java

@@ -7,7 +7,7 @@ import java.math.BigDecimal;
 @Data
 /**
  * 商品对象 fs_store_product
- * 
+ *
  * @author fs
  * @date 2022-03-15
  */
@@ -69,4 +69,13 @@ public class FsStoreProductListVO  implements Serializable
 
     private String cateName;
 
+    /**
+     * 仓库id
+     */
+    private Long warehouseId;
+    /**
+     * 仓库代码
+     */
+    private String warehouseCode;
+
 }

+ 9 - 1
fs-service-system/src/main/java/com/fs/store/vo/FsStoreProductQueryVO.java

@@ -1,5 +1,6 @@
 package com.fs.store.vo;
 
+import com.fs.common.annotation.Excel;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -114,5 +115,12 @@ public class FsStoreProductQueryVO implements Serializable
     /** 处方名 */
     private String prescribeName;
 
-
+    /**
+     * 仓库id
+     */
+    private Long warehouseId;
+    /**
+     * 仓库代码
+     */
+    private String warehouseCode;
 }

+ 16 - 9
fs-service-system/src/main/resources/mapper/store/FsStoreProductMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fs.store.mapper.FsStoreProductMapper">
-    
+
     <resultMap type="FsStoreProduct" id="FsStoreProductResult">
         <result property="productId"    column="product_id"    />
         <result property="image"    column="image"    />
@@ -50,12 +50,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </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 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 from fs_store_product
     </sql>
 
     <select id="selectFsStoreProductList" parameterType="FsStoreProduct" resultMap="FsStoreProductResult">
         <include refid="selectFsStoreProductVo"/>
-        <where>  
+        <where>
             <if test="image != null  and image != ''"> and image = #{image}</if>
             <if test="sliderImage != null  and sliderImage != ''"> and slider_image = #{sliderImage}</if>
             <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
@@ -94,15 +94,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="prescribeFactory != null  and prescribeFactory != ''"> and prescribe_factory = #{prescribeFactory}</if>
             <if test="prescribeName != null  and prescribeName != ''"> and prescribe_name like concat('%', #{prescribeName}, '%')</if>
             <if test="isDisplay != null "> and is_display = #{isDisplay}</if>
-
+            <if test="warehouseId != null"> and warehouse_id = #{warehouseId}</if>
+            <if test="warehouseCode != null"> and warehouse_code = #{warehouseCode}</if>
         </where>
     </select>
-    
+
     <select id="selectFsStoreProductById" parameterType="Long" resultMap="FsStoreProductResult">
         <include refid="selectFsStoreProductVo"/>
         where product_id = #{productId}
     </select>
-        
+
     <insert id="insertFsStoreProduct" parameterType="FsStoreProduct" useGeneratedKeys="true" keyProperty="productId">
         insert into fs_store_product
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -147,6 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="prescribeName != null">prescribe_name,</if>
             <if test="isDisplay != null">is_display,</if>
             <if test="tuiCateId != null">tui_cate_id,</if>
+            <if test="warehouseId != null">warehouse_id,</if>
+            <if test="warehouseCode != null">warehouse_code,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">#{image},</if>
@@ -190,6 +193,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="prescribeName != null">#{prescribeName},</if>
             <if test="isDisplay != null">#{isDisplay},</if>
             <if test="tuiCateId != null">#{tuiCateId},</if>
+            <if test="warehouseId != null">#{warehouseId},</if>
+            <if test="warehouseCode != null">#{warehouseCode},</if>
          </trim>
     </insert>
 
@@ -237,6 +242,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="prescribeName != null">prescribe_name = #{prescribeName},</if>
             <if test="isDisplay != null">is_display = #{isDisplay},</if>
             <if test="tuiCateId != null">tui_cate_id = #{tuiCateId},</if>
+            <if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
+            <if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
         </trim>
         where product_id = #{productId}
     </update>
@@ -246,10 +253,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteFsStoreProductByIds" parameterType="String">
-        delete from fs_store_product where product_id in 
+        delete from fs_store_product where product_id in
         <foreach item="productId" collection="array" open="(" separator="," close=")">
             #{productId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>