Bläddra i källkod

门店商品信息显示新增园区库存字段

hhq 4 år sedan
förälder
incheckning
883f24eca4

+ 20 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/ProductStoreRelaEntity.java

@@ -133,6 +133,26 @@ public class ProductStoreRelaEntity implements Serializable {
     private String batchSn;
     //批次到期日期
     private String batchExpireDate;
+    //底线价   bottom_line_price
+    private String bottomLinePrice;
+    //园区库存  park_stock
+    private String parkStock;
+
+    public String getBottomLinePrice() {
+        return bottomLinePrice;
+    }
+
+    public void setBottomLinePrice(String bottomLinePrice) {
+        this.bottomLinePrice = bottomLinePrice;
+    }
+
+    public String getParkStock() {
+        return parkStock;
+    }
+
+    public void setParkStock(String parkStock) {
+        this.parkStock = parkStock;
+    }
 
     public String getBatchSn() {
         return batchSn;

+ 36 - 2
kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml

@@ -46,6 +46,8 @@
 
         <result column="batch_sn" property="batchSn" />
         <result column="batch_expire_date" property="batchExpireDate" />
+        <result column="bottom_line_price" property="bottomLinePrice" />
+        <result column="park_stock" property="parkStock" />
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.ProductStoreRelaEntity">
@@ -68,6 +70,8 @@
             a.mod_time,
             a.`batch_sn`,
             a.`batch_expire_date`,
+            a.`bottom_line_price`,
+            a.`park_stock`,
             a.tstm,
             b.goods_sn goodsSn,
             c.goods_sn productSn,
@@ -161,6 +165,8 @@
         a.`sell_volume`,
         a.`batch_sn`,
         a.`batch_expire_date`,
+        a.`bottom_line_price`,
+        b.goods_number as parkStock,
         b.is_hot 'isHot',
         b.is_on_sale 'isOnSale',
         b.sell_volume 'goodsSellVolume',
@@ -416,7 +422,13 @@
             batch_sn,
         </if>
         <if test="batchExpireDate != null" >
-            batch_expire_date
+            batch_expire_date,
+        </if>
+        <if test="bottomLinePrice != null" >
+            bottom_line_price,
+        </if>
+        <if test="parkStock != null" >
+            park_stock
         </if>
         )
 		values(
@@ -468,7 +480,13 @@
             #{batchSn,jdbcType=VARCHAR},
         </if>
         <if test="batchExpireDate != null" >
-            #{batchExpireDate,jdbcType=VARCHAR}
+            #{batchExpireDate,jdbcType=VARCHAR},
+        </if>
+        <if test="bottomLinePrice != null" >
+            #{bottomLinePrice,jdbcType=VARCHAR},
+        </if>
+        <if test="parkStock != null" >
+            #{parkStock,jdbcType=VARCHAR}
         </if>
         )
 	</insert>
@@ -526,6 +544,12 @@
             <if test="batchExpireDate != null" >
                 batch_expire_date = #{batchExpireDate,jdbcType=VARCHAR},
             </if>
+            <if test="bottomLinePrice != null" >
+                bottom_line_price = #{bottomLinePrice,jdbcType=VARCHAR},
+            </if>
+            <if test="parkStock != null" >
+                park_stock = #{parkStock,jdbcType=VARCHAR},
+            </if>
         </set>
         where id = #{id}
     </update>
@@ -716,4 +740,14 @@
         where a.goods_id = #{goodsId}
     </update>
 
+    <!--<select id="queryParkStock" resultType="com.kmall.admin.entity.ProductStoreRelaEntity">-->
+        <!--select a.store_id,a.sku,gs.goods_number as park_stock,a.stock_num-->
+        <!--FROM-->
+        <!--mall_product_store_rela a-->
+        <!--LEFT JOIN mall_goods gs ON a.goods_id = gs.id-->
+        <!--<if test="sku != null and sku != '' ">-->
+            <!--WHERE  a.sku = #{sku}-->
+        <!--</if>-->
+    <!--</select>-->
+
 </mapper>

+ 1 - 0
kmall-admin/src/main/webapp/js/shop/storeProductStock.js

@@ -51,6 +51,7 @@ $(function () {
                     return '-';
                 }},
             {label: '门店库存', name: 'stockNum', index: 'stockNum', width: 80, align: 'center'},
+            {label: '园区库存', name: 'parkStock', index: 'parkStock', width: 80, align: 'center'},
             {label: '零售价格', name: 'retailPrice', index: 'retailPrice', width: 80, align: 'right'},
             {label: '市场价', name: 'marketPrice', index: 'marketPrice', width: 80, align: 'right'},
             // {label: '库存价格', name: 'stockPrice', index: 'stockPrice', width: 80},