Browse Source

商品添加sku和spu

wangzhuo 1 year ago
parent
commit
349138ceef

+ 19 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/domain/TGoods.java

@@ -125,11 +125,30 @@ public class TGoods extends BaseEntity {
     @TableLogic
     private String delFlag;
 
+    private String sku;
+    private String spu;
+
     /**
      * 库存警告
      */
     private BigDecimal stockWarning;
 
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getSpu() {
+        return spu;
+    }
+
+    public void setSpu(String spu) {
+        this.spu = spu;
+    }
+
     public BigDecimal getStockWarning() {
         return stockWarning;
     }

+ 12 - 2
ruoyi-warehouse/src/main/resources/mapper/basicData/TGoodsMapper.xml

@@ -29,10 +29,14 @@
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
         <result property="stockWarning"    column="stock_warning"    />
+        <result property="sku"    column="sku"    />
+        <result property="spu"    column="spu"    />
     </resultMap>
 
     <sql id="selectTGoodsVo">
-        select f_id, f_typeid, f_no, f_name, f_enam, f_specs, f_packagespecs, f_color, f_hscode, f_packageid, f_ems_no, f_ems_seq_no, f_goods_ts, f_wms_dcl_unit, f_wms_law_unit, if_cntrno, f_status, del_flag, create_by, create_time, update_by, update_time, remark,stock_warning from t_goods
+        select f_id, f_typeid, f_no, f_name, f_enam, f_specs, f_packagespecs, f_color, f_hscode, f_packageid, f_ems_no,
+               f_ems_seq_no, f_goods_ts, f_wms_dcl_unit, f_wms_law_unit, if_cntrno, f_status, del_flag, create_by,
+               create_time, update_by, update_time, remark,stock_warning, sku, spu from t_goods
     </sql>
 
     <select id="selectTGoodsList" parameterType="TGoods" resultMap="TGoodsResult">
@@ -84,6 +88,8 @@
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
             <if test="stockWarning != null ">stock_warning,</if>
+            <if test="sku != null ">sku,</if>
+            <if test="spu != null ">spu,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fTypeid != null">#{fTypeid},</if>
@@ -109,6 +115,8 @@
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
             <if test="stockWarning != null ">#{stockWarning},</if>
+            <if test="sku != null ">#{sku},</if>
+            <if test="spu != null ">#{spu},</if>
         </trim>
     </insert>
 
@@ -137,7 +145,9 @@
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
-            <if test="stockWarning != null ">stock_warning = #{stockWarning}</if>
+            <if test="stockWarning != null ">stock_warning = #{stockWarning},</if>
+            <if test="sku != null ">sku = #{sku},</if>
+            <if test="spu != null ">spu = #{spu},</if>
         </trim>
         where f_id = #{fId}
     </update>