Browse Source

sku表修改及添加购物流程图

zhh 6 years ago
parent
commit
6b573d261a

BIN
document/axure/mall-flow.rp


File diff suppressed because it is too large
+ 139 - 115
document/pdm/mall.pdb


File diff suppressed because it is too large
+ 139 - 115
document/pdm/mall.pdm


+ 1 - 1
mall-admin/pom.xml

@@ -26,7 +26,7 @@
 
     <dependencies>
         <dependency>
-            <groupId>com.macro</groupId>
+            <groupId>com.macro.mall</groupId>
             <artifactId>mall-mbg</artifactId>
             <version>1.0-SNAPSHOT</version>
         </dependency>

+ 1 - 1
mall-demo/pom.xml

@@ -26,7 +26,7 @@
 
     <dependencies>
         <dependency>
-            <groupId>com.macro</groupId>
+            <groupId>com.macro.mall</groupId>
             <artifactId>mall-mbg</artifactId>
             <version>1.0-SNAPSHOT</version>
         </dependency>

+ 32 - 0
mall-mbg/src/main/java/com/macro/mall/model/PmsSkuStock.java

@@ -56,6 +56,20 @@ public class PmsSkuStock implements Serializable {
      */
     private Integer sale;
 
+    /**
+     * 单品促销价格
+     *
+     * @mbggenerated
+     */
+    private BigDecimal promotionPrice;
+
+    /**
+     * 锁定库存
+     *
+     * @mbggenerated
+     */
+    private Integer lockStock;
+
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -146,6 +160,22 @@ public class PmsSkuStock implements Serializable {
         this.sale = sale;
     }
 
+    public BigDecimal getPromotionPrice() {
+        return promotionPrice;
+    }
+
+    public void setPromotionPrice(BigDecimal promotionPrice) {
+        this.promotionPrice = promotionPrice;
+    }
+
+    public Integer getLockStock() {
+        return lockStock;
+    }
+
+    public void setLockStock(Integer lockStock) {
+        this.lockStock = lockStock;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -163,6 +193,8 @@ public class PmsSkuStock implements Serializable {
         sb.append(", sp3=").append(sp3);
         sb.append(", pic=").append(pic);
         sb.append(", sale=").append(sale);
+        sb.append(", promotionPrice=").append(promotionPrice);
+        sb.append(", lockStock=").append(lockStock);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 120 - 0
mall-mbg/src/main/java/com/macro/mall/model/PmsSkuStockExample.java

@@ -814,6 +814,126 @@ public class PmsSkuStockExample {
             addCriterion("sale not between", value1, value2, "sale");
             return (Criteria) this;
         }
+
+        public Criteria andPromotionPriceIsNull() {
+            addCriterion("promotion_price is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceIsNotNull() {
+            addCriterion("promotion_price is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceEqualTo(BigDecimal value) {
+            addCriterion("promotion_price =", value, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceNotEqualTo(BigDecimal value) {
+            addCriterion("promotion_price <>", value, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceGreaterThan(BigDecimal value) {
+            addCriterion("promotion_price >", value, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceGreaterThanOrEqualTo(BigDecimal value) {
+            addCriterion("promotion_price >=", value, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceLessThan(BigDecimal value) {
+            addCriterion("promotion_price <", value, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceLessThanOrEqualTo(BigDecimal value) {
+            addCriterion("promotion_price <=", value, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceIn(List<BigDecimal> values) {
+            addCriterion("promotion_price in", values, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceNotIn(List<BigDecimal> values) {
+            addCriterion("promotion_price not in", values, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("promotion_price between", value1, value2, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andPromotionPriceNotBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("promotion_price not between", value1, value2, "promotionPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockIsNull() {
+            addCriterion("lock_stock is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockIsNotNull() {
+            addCriterion("lock_stock is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockEqualTo(Integer value) {
+            addCriterion("lock_stock =", value, "lockStock");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockNotEqualTo(Integer value) {
+            addCriterion("lock_stock <>", value, "lockStock");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockGreaterThan(Integer value) {
+            addCriterion("lock_stock >", value, "lockStock");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockGreaterThanOrEqualTo(Integer value) {
+            addCriterion("lock_stock >=", value, "lockStock");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockLessThan(Integer value) {
+            addCriterion("lock_stock <", value, "lockStock");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockLessThanOrEqualTo(Integer value) {
+            addCriterion("lock_stock <=", value, "lockStock");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockIn(List<Integer> values) {
+            addCriterion("lock_stock in", values, "lockStock");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockNotIn(List<Integer> values) {
+            addCriterion("lock_stock not in", values, "lockStock");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockBetween(Integer value1, Integer value2) {
+            addCriterion("lock_stock between", value1, value2, "lockStock");
+            return (Criteria) this;
+        }
+
+        public Criteria andLockStockNotBetween(Integer value1, Integer value2) {
+            addCriterion("lock_stock not between", value1, value2, "lockStock");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 38 - 7
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsSkuStockMapper.xml

@@ -13,6 +13,8 @@
     <result column="sp3" jdbcType="VARCHAR" property="sp3" />
     <result column="pic" jdbcType="VARCHAR" property="pic" />
     <result column="sale" jdbcType="INTEGER" property="sale" />
+    <result column="promotion_price" jdbcType="DECIMAL" property="promotionPrice" />
+    <result column="lock_stock" jdbcType="INTEGER" property="lockStock" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -73,7 +75,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, product_id, sku_code, price, stock, low_stock, sp1, sp2, sp3, pic, sale
+    id, product_id, sku_code, price, stock, low_stock, sp1, sp2, sp3, pic, sale, promotion_price, 
+    lock_stock
   </sql>
   <select id="selectByExample" parameterType="com.macro.mall.model.PmsSkuStockExample" resultMap="BaseResultMap">
     select
@@ -111,12 +114,12 @@
     </selectKey>
     insert into pms_sku_stock (product_id, sku_code, price, 
       stock, low_stock, sp1, 
-      sp2, sp3, pic, sale
-      )
+      sp2, sp3, pic, sale, 
+      promotion_price, lock_stock)
     values (#{productId,jdbcType=BIGINT}, #{skuCode,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, 
       #{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER}, #{sp1,jdbcType=VARCHAR}, 
-      #{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{sale,jdbcType=INTEGER}
-      )
+      #{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{sale,jdbcType=INTEGER}, 
+      #{promotionPrice,jdbcType=DECIMAL}, #{lockStock,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.macro.mall.model.PmsSkuStock">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -154,6 +157,12 @@
       <if test="sale != null">
         sale,
       </if>
+      <if test="promotionPrice != null">
+        promotion_price,
+      </if>
+      <if test="lockStock != null">
+        lock_stock,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="productId != null">
@@ -186,6 +195,12 @@
       <if test="sale != null">
         #{sale,jdbcType=INTEGER},
       </if>
+      <if test="promotionPrice != null">
+        #{promotionPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="lockStock != null">
+        #{lockStock,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.macro.mall.model.PmsSkuStockExample" resultType="java.lang.Integer">
@@ -230,6 +245,12 @@
       <if test="record.sale != null">
         sale = #{record.sale,jdbcType=INTEGER},
       </if>
+      <if test="record.promotionPrice != null">
+        promotion_price = #{record.promotionPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="record.lockStock != null">
+        lock_stock = #{record.lockStock,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -247,7 +268,9 @@
       sp2 = #{record.sp2,jdbcType=VARCHAR},
       sp3 = #{record.sp3,jdbcType=VARCHAR},
       pic = #{record.pic,jdbcType=VARCHAR},
-      sale = #{record.sale,jdbcType=INTEGER}
+      sale = #{record.sale,jdbcType=INTEGER},
+      promotion_price = #{record.promotionPrice,jdbcType=DECIMAL},
+      lock_stock = #{record.lockStock,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -285,6 +308,12 @@
       <if test="sale != null">
         sale = #{sale,jdbcType=INTEGER},
       </if>
+      <if test="promotionPrice != null">
+        promotion_price = #{promotionPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="lockStock != null">
+        lock_stock = #{lockStock,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -299,7 +328,9 @@
       sp2 = #{sp2,jdbcType=VARCHAR},
       sp3 = #{sp3,jdbcType=VARCHAR},
       pic = #{pic,jdbcType=VARCHAR},
-      sale = #{sale,jdbcType=INTEGER}
+      sale = #{sale,jdbcType=INTEGER},
+      promotion_price = #{promotionPrice,jdbcType=DECIMAL},
+      lock_stock = #{lockStock,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 1 - 1
mall-mbg/src/main/resources/generatorConfig.xml

@@ -32,7 +32,7 @@
 
         <javaClientGenerator type="XMLMAPPER" targetPackage="com.macro.mall.mapper"
                              targetProject="mall-mbg\src\main\java"/>
-
+        <!--生成全部表tableName设为%-->
         <table tableName="%">
             <generatedKey column="id" sqlStatement="MySql" identity="true"/>
         </table>

+ 1 - 1
mall-portal/pom.xml

@@ -27,7 +27,7 @@
 
     <dependencies>
         <dependency>
-            <groupId>com.macro</groupId>
+            <groupId>com.macro.mall</groupId>
             <artifactId>mall-mbg</artifactId>
             <version>1.0-SNAPSHOT</version>
         </dependency>

+ 1 - 1
mall-search/pom.xml

@@ -27,7 +27,7 @@
 
     <dependencies>
         <dependency>
-            <groupId>com.macro</groupId>
+            <groupId>com.macro.mall</groupId>
             <artifactId>mall-mbg</artifactId>
             <version>1.0-SNAPSHOT</version>
         </dependency>

Some files were not shown because too many files changed in this diff