java110 před 5 roky
rodič
revize
f3ffc6b584

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/feeDiscountSpec/FeeDiscountSpecDto.java

@@ -14,6 +14,7 @@ import java.util.Date;
  * add by wuxw 2019/4/24
  **/
 public class FeeDiscountSpecDto extends PageDto implements Serializable {
+    private String discountSpecId;
 
     private String specId;
     private String specName;
@@ -92,4 +93,12 @@ public class FeeDiscountSpecDto extends PageDto implements Serializable {
     public void setDiscountIds(String[] discountIds) {
         this.discountIds = discountIds;
     }
+
+    public String getDiscountSpecId() {
+        return discountSpecId;
+    }
+
+    public void setDiscountSpecId(String discountSpecId) {
+        this.discountSpecId = discountSpecId;
+    }
 }

+ 36 - 19
java110-bean/src/main/java/com/java110/po/feeDiscountSpec/FeeDiscountSpecPo.java

@@ -1,53 +1,70 @@
 package com.java110.po.feeDiscountSpec;
 
 import java.io.Serializable;
-import java.util.Date;
 
 public class FeeDiscountSpecPo implements Serializable {
 
+    private String discountSpecId;
     private String specId;
-private String specName;
-private String specValue;
-private String statusCd = "0";
-private String discountId;
-private String communityId;
-public String getSpecId() {
+    private String specName;
+    private String specValue;
+    private String statusCd = "0";
+    private String discountId;
+    private String communityId;
+
+    public String getSpecId() {
         return specId;
     }
-public void setSpecId(String specId) {
+
+    public void setSpecId(String specId) {
         this.specId = specId;
     }
-public String getSpecName() {
+
+    public String getSpecName() {
         return specName;
     }
-public void setSpecName(String specName) {
+
+    public void setSpecName(String specName) {
         this.specName = specName;
     }
-public String getSpecValue() {
+
+    public String getSpecValue() {
         return specValue;
     }
-public void setSpecValue(String specValue) {
+
+    public void setSpecValue(String specValue) {
         this.specValue = specValue;
     }
-public String getStatusCd() {
+
+    public String getStatusCd() {
         return statusCd;
     }
-public void setStatusCd(String statusCd) {
+
+    public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
-public String getDiscountId() {
+
+    public String getDiscountId() {
         return discountId;
     }
-public void setDiscountId(String discountId) {
+
+    public void setDiscountId(String discountId) {
         this.discountId = discountId;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
 
+    public String getDiscountSpecId() {
+        return discountSpecId;
+    }
 
-
+    public void setDiscountSpecId(String discountSpecId) {
+        this.discountSpecId = discountSpecId;
+    }
 }

+ 22 - 9
java110-db/src/main/resources/mapper/fee/FeeDiscountSpecServiceDaoImplMapper.xml

@@ -8,9 +8,10 @@
     <!-- 保存费用折扣信息 add by wuxw 2018-07-03 -->
     <insert id="saveFeeDiscountSpecInfo" parameterType="Map">
         insert into fee_discount_spec(
-        spec_id,spec_name,spec_value,discount_id,community_id
+        spec_id,spec_name,spec_value,discount_id,community_id, discount_spec_id;
+
         ) values (
-        #{specId},#{specName},#{specValue},#{discountId},#{communityId}
+        #{specId},#{specName},#{specValue},#{discountId},#{communityId},#{discountSpecId}
         )
     </insert>
 
@@ -19,7 +20,7 @@
     <select id="getFeeDiscountSpecInfo" parameterType="Map" resultType="Map">
         select t.spec_id,t.spec_id specId,t.spec_name,t.spec_name specName,t.spec_value,t.spec_value
         specValue,t.status_cd,t.status_cd statusCd,t.discount_id,t.discount_id discountId,t.community_id,t.community_id
-        communityId
+        communityId,t.discount_spec_id discountSpecId
         from fee_discount_spec t
         where 1 =1
         <if test="specId !=null and specId != ''">
@@ -46,6 +47,10 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
+        <if test="discountSpecId !=null and discountSpecId != ''">
+            and t.discount_spec_id= #{discountSpecId}
+        </if>
+
         order by t.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
@@ -66,16 +71,21 @@
         <if test="specValue !=null and specValue != ''">
             , t.spec_value= #{specValue}
         </if>
-        <if test="discountId !=null and discountId != ''">
-            , t.discount_id= #{discountId}
-        </if>
-        <if test="communityId !=null and communityId != ''">
-            , t.community_id= #{communityId}
-        </if>
+
+
         where 1=1
         <if test="specId !=null and specId != ''">
             and t.spec_id= #{specId}
         </if>
+        <if test="discountId !=null and discountId != ''">
+            and t.discount_id= #{discountId}
+        </if>
+        <if test="discountSpecId !=null and discountSpecId != ''">
+            and t.discount_spec_id= #{discountSpecId}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
     </update>
 
@@ -102,6 +112,9 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
+        <if test="discountSpecId !=null and discountSpecId != ''">
+            and t.discount_spec_id= #{discountSpecId}
+        </if>
 
 
     </select>

+ 1 - 0
service-fee/src/main/java/com/java110/fee/bmo/feeDiscount/impl/SaveFeeDiscountBMOImpl.java

@@ -83,6 +83,7 @@ public class SaveFeeDiscountBMOImpl implements ISaveFeeDiscountBMO {
             feeDiscountSpecPo.setSpecId(specObj.getString("specId"));
             feeDiscountSpecPo.setSpecName(specObj.getString("specName"));
             feeDiscountSpecPo.setSpecValue(specObj.getString("specValue"));
+            feeDiscountSpecPo.setDiscountSpecId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_specId));
             flag = feeDiscountSpecInnerServiceSMOImpl.saveFeeDiscountSpec(feeDiscountSpecPo);
             if (flag < 1) {
                 throw new IllegalArgumentException("保存 折扣规格失败");