Browse Source

部分接口修改

zhh 6 years ago
parent
commit
a97a2fe7bc

+ 1 - 0
README.md

@@ -55,6 +55,7 @@ OSS上传功能 | ✔
 SpringSecurity权限管理功能 |
 Elasticsearch搜索功能 |
 MongoDb 日志存储功能 |
+数字型ID生成 |
 
 ### 后台功能
 

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


+ 10 - 9
mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java

@@ -10,19 +10,12 @@ import java.util.List;
  * Created by macro on 2018/4/26.
  */
 public class PmsProductResult extends PmsProductParam{
-    private String feightTemplateName;
+    //商品所选分类的父id
+    private Long cateParentId;
     private String productAttributeCategoryName;
     private List<CmsSubject> subjectList;
     private List<CmsPrefrenceArea> prefrenceAreaList;
 
-    public String getFeightTemplateName() {
-        return feightTemplateName;
-    }
-
-    public void setFeightTemplateName(String feightTemplateName) {
-        this.feightTemplateName = feightTemplateName;
-    }
-
     public String getProductAttributeCategoryName() {
         return productAttributeCategoryName;
     }
@@ -46,4 +39,12 @@ public class PmsProductResult extends PmsProductParam{
     public void setPrefrenceAreaList(List<CmsPrefrenceArea> prefrenceAreaList) {
         this.prefrenceAreaList = prefrenceAreaList;
     }
+
+    public Long getCateParentId() {
+        return cateParentId;
+    }
+
+    public void setCateParentId(Long cateParentId) {
+        this.cateParentId = cateParentId;
+    }
 }

+ 10 - 8
mall-admin/src/main/resources/dao/PmsProductDao.xml

@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.macro.mall.dao.PmsProductDao">
-    <resultMap id="updateInfoMap" type="com.macro.mall.dto.PmsProductResult" extends="com.macro.mall.mapper.PmsProductMapper.BaseResultMap">
+    <resultMap id="updateInfoMap" type="com.macro.mall.dto.PmsProductResult" extends="com.macro.mall.mapper.PmsProductMapper.ResultMapWithBLOBs">
+        <result column="cateParentId" jdbcType="BIGINT" property="cateParentId" />
         <collection property="productLadderList" columnPrefix="ladder_" resultMap="com.macro.mall.mapper.PmsProductLadderMapper.BaseResultMap">
         </collection>
         <collection property="productFullReductionList" columnPrefix="full_" resultMap="com.macro.mall.mapper.PmsProductFullReductionMapper.BaseResultMap">
@@ -16,19 +17,20 @@
         </collection>
         <collection property="prefrenceAreaList" column="{productId=id}" select="selectPrefrenceAreaByProductId">
         </collection>
+
     </resultMap>
 
     <select id="getUpdateInfo" resultMap="updateInfoMap">
         SELECT *,
-            f.name feightTemplateName,
+            pc.parent_id cateParentId,
             ac.name productAttributeCategoryName,
-            l.id ladder_id,l.discount ladder_discount,l.count ladder_count,l.price ladder_price,
-            pf.id full_id,pf.full_price full_full_price,pf.reduce_price full_reduce_price,
-            m.id member_id,m.member_level_id member_member_level_id,m.member_price member_member_price,
-            s.id sku_id,s.price sku_price,s.low_stock sku_low_stock,s.pic sku_pic,s.sale sku_sale,s.sku_code sku_sku_code,s.sp1 sku_sp1,s.sp2 sku_sp2,s.sp3 sku_sp3,s.stock sku_stock,
-            a.id attribute_id,a.product_attribute_id attribute_product_attribute_id,a.value attribute_value
+            l.id ladder_id,l.product_id ladder_product_id,l.discount ladder_discount,l.count ladder_count,l.price ladder_price,
+            pf.id full_id,pf.product_id full_product_id,pf.full_price full_full_price,pf.reduce_price full_reduce_price,
+            m.id member_id,m.product_id member_product_id,m.member_level_id member_member_level_id,m.member_price member_member_price,m.member_level_name member_member_level_name,
+            s.id sku_id,s.product_id sku_product_id,s.price sku_price,s.low_stock sku_low_stock,s.pic sku_pic,s.sale sku_sale,s.sku_code sku_sku_code,s.sp1 sku_sp1,s.sp2 sku_sp2,s.sp3 sku_sp3,s.stock sku_stock,
+            a.id attribute_id,a.product_id attribute_product_id,a.product_attribute_id attribute_product_attribute_id,a.value attribute_value
         FROM pms_product p
-        LEFT JOIN pms_feight_template f ON p.feight_template_id = f.id
+        LEFT JOIN pms_product_category pc on pc.id = p.product_category_id
         LEFT JOIN pms_product_attribute_category ac ON p.product_attribute_category_id= ac.id
         LEFT JOIN pms_product_ladder l ON p.id = l.product_id
         LEFT JOIN pms_product_full_reduction pf ON pf.product_id=p.id

+ 11 - 0
mall-mbg/src/main/java/com/macro/mall/model/PmsMemberPrice.java

@@ -17,6 +17,8 @@ public class PmsMemberPrice implements Serializable {
      */
     private BigDecimal memberPrice;
 
+    private String memberLevelName;
+
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -51,6 +53,14 @@ public class PmsMemberPrice implements Serializable {
         this.memberPrice = memberPrice;
     }
 
+    public String getMemberLevelName() {
+        return memberLevelName;
+    }
+
+    public void setMemberLevelName(String memberLevelName) {
+        this.memberLevelName = memberLevelName;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -61,6 +71,7 @@ public class PmsMemberPrice implements Serializable {
         sb.append(", productId=").append(productId);
         sb.append(", memberLevelId=").append(memberLevelId);
         sb.append(", memberPrice=").append(memberPrice);
+        sb.append(", memberLevelName=").append(memberLevelName);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 70 - 0
mall-mbg/src/main/java/com/macro/mall/model/PmsMemberPriceExample.java

@@ -344,6 +344,76 @@ public class PmsMemberPriceExample {
             addCriterion("member_price not between", value1, value2, "memberPrice");
             return (Criteria) this;
         }
+
+        public Criteria andMemberLevelNameIsNull() {
+            addCriterion("member_level_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameIsNotNull() {
+            addCriterion("member_level_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameEqualTo(String value) {
+            addCriterion("member_level_name =", value, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameNotEqualTo(String value) {
+            addCriterion("member_level_name <>", value, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameGreaterThan(String value) {
+            addCriterion("member_level_name >", value, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameGreaterThanOrEqualTo(String value) {
+            addCriterion("member_level_name >=", value, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameLessThan(String value) {
+            addCriterion("member_level_name <", value, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameLessThanOrEqualTo(String value) {
+            addCriterion("member_level_name <=", value, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameLike(String value) {
+            addCriterion("member_level_name like", value, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameNotLike(String value) {
+            addCriterion("member_level_name not like", value, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameIn(List<String> values) {
+            addCriterion("member_level_name in", values, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameNotIn(List<String> values) {
+            addCriterion("member_level_name not in", values, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameBetween(String value1, String value2) {
+            addCriterion("member_level_name between", value1, value2, "memberLevelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberLevelNameNotBetween(String value1, String value2) {
+            addCriterion("member_level_name not between", value1, value2, "memberLevelName");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 22 - 7
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsMemberPriceMapper.xml

@@ -6,6 +6,7 @@
     <result column="product_id" jdbcType="BIGINT" property="productId" />
     <result column="member_level_id" jdbcType="BIGINT" property="memberLevelId" />
     <result column="member_price" jdbcType="DECIMAL" property="memberPrice" />
+    <result column="member_level_name" jdbcType="VARCHAR" property="memberLevelName" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -66,7 +67,7 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, product_id, member_level_id, member_price
+    id, product_id, member_level_id, member_price, member_level_name
   </sql>
   <select id="selectByExample" parameterType="com.macro.mall.model.PmsMemberPriceExample" resultMap="BaseResultMap">
     select
@@ -102,10 +103,10 @@
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
       SELECT LAST_INSERT_ID()
     </selectKey>
-    insert into pms_member_price (product_id, member_level_id, member_price
-      )
-    values (#{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, #{memberPrice,jdbcType=DECIMAL}
-      )
+    insert into pms_member_price (product_id, member_level_id, member_price, 
+      member_level_name)
+    values (#{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, #{memberPrice,jdbcType=DECIMAL}, 
+      #{memberLevelName,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.macro.mall.model.PmsMemberPrice">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -122,6 +123,9 @@
       <if test="memberPrice != null">
         member_price,
       </if>
+      <if test="memberLevelName != null">
+        member_level_name,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="productId != null">
@@ -133,6 +137,9 @@
       <if test="memberPrice != null">
         #{memberPrice,jdbcType=DECIMAL},
       </if>
+      <if test="memberLevelName != null">
+        #{memberLevelName,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.macro.mall.model.PmsMemberPriceExample" resultType="java.lang.Integer">
@@ -156,6 +163,9 @@
       <if test="record.memberPrice != null">
         member_price = #{record.memberPrice,jdbcType=DECIMAL},
       </if>
+      <if test="record.memberLevelName != null">
+        member_level_name = #{record.memberLevelName,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -166,7 +176,8 @@
     set id = #{record.id,jdbcType=BIGINT},
       product_id = #{record.productId,jdbcType=BIGINT},
       member_level_id = #{record.memberLevelId,jdbcType=BIGINT},
-      member_price = #{record.memberPrice,jdbcType=DECIMAL}
+      member_price = #{record.memberPrice,jdbcType=DECIMAL},
+      member_level_name = #{record.memberLevelName,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -183,6 +194,9 @@
       <if test="memberPrice != null">
         member_price = #{memberPrice,jdbcType=DECIMAL},
       </if>
+      <if test="memberLevelName != null">
+        member_level_name = #{memberLevelName,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -190,7 +204,8 @@
     update pms_member_price
     set product_id = #{productId,jdbcType=BIGINT},
       member_level_id = #{memberLevelId,jdbcType=BIGINT},
-      member_price = #{memberPrice,jdbcType=DECIMAL}
+      member_price = #{memberPrice,jdbcType=DECIMAL},
+      member_level_name = #{memberLevelName,jdbcType=VARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

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