Browse Source

bug fixes

PLF 5 năm trước cách đây
mục cha
commit
689162f672

+ 0 - 10
src/main/java/com/caimei/modules/order/entity/CmReceiptOrderRelation.java

@@ -1,8 +1,5 @@
 package com.caimei.modules.order.entity;
 
-import org.hibernate.validator.constraints.Length;
-
-import java.beans.Transient;
 import java.io.Serializable;
 
 /**
@@ -19,7 +16,6 @@ public class CmReceiptOrderRelation implements Serializable {
     private String receiptID;        // 识别款项Id(对应cm_discern_receipt表)
     private String associateAmount;        // 关联金额:1普通收款(线下):收款具体对该应母订单的收金额、2线上支付:付款金额就等于该金额、3返佣收款:默认为0
     private String orderID;        // 订单Id(relationType值为1是为子订单ID,为2时为主订单ID)
-
     private String payType;    //收款类型
     private String receiptDate;    //收款时间
     private String confirmType;        //确认订单类型
@@ -32,7 +28,6 @@ public class CmReceiptOrderRelation implements Serializable {
         this.id = id;
     }
 
-    @Length(min = 0, max = 1, message = "关系类型:1返佣订单(返佣款)、2非返佣订单(订单款或者非订单款)长度必须介于 0 和 1 之间")
     public String getRelationType() {
         return relationType;
     }
@@ -41,7 +36,6 @@ public class CmReceiptOrderRelation implements Serializable {
         this.relationType = relationType;
     }
 
-    @Length(min = 0, max = 11, message = "识别款项Id(对应cm_discern_receipt表)长度必须介于 0 和 11 之间")
     public String getReceiptID() {
         return receiptID;
     }
@@ -58,7 +52,6 @@ public class CmReceiptOrderRelation implements Serializable {
         this.associateAmount = associateAmount;
     }
 
-    @Length(min = 0, max = 11, message = "订单Id(relationType值为1是为子订单ID,为2时为主订单ID)长度必须介于 0 和 11 之间")
     public String getOrderID() {
         return orderID;
     }
@@ -67,7 +60,6 @@ public class CmReceiptOrderRelation implements Serializable {
         this.orderID = orderID;
     }
 
-    @Transient
     public String getPayType() {
         return payType;
     }
@@ -76,7 +68,6 @@ public class CmReceiptOrderRelation implements Serializable {
         this.payType = payType;
     }
 
-    @Transient
     public String getReceiptDate() {
         return receiptDate;
     }
@@ -85,7 +76,6 @@ public class CmReceiptOrderRelation implements Serializable {
         this.receiptDate = receiptDate;
     }
 
-    @Transient
     public String getConfirmType() {
         return confirmType;
     }

+ 11 - 1
src/main/resources/mapper/CmMallOrganizeProductsMapper.xml

@@ -81,7 +81,17 @@
                 AND s.name LIKE concat('%',#{shopName},'%')
             </if>
         </where>
-            ORDER BY a.addTime DESC,a.id DESC
+            ORDER BY
+        <if test="preferredProduct != null and preferredProduct !=  '' and preferredProduct == 1">
+            -a.preferredProductSort DESC,
+        </if>
+        <if test="commonlyProduct != null and commonlyProduct != '' and commonlyProduct == 1 ">
+            -a.commonlyProductSort DESC,
+        </if>
+        <if test="preferentialProduct != null and preferentialProduct != '' and preferentialProduct == 1">
+            -a.preferentialProductSort DESC,
+        </if>
+            a.addTime DESC,a.id DESC
     </select>
 
     <select id="findAllModule" resultType="com.caimei.modules.products.entity.CmMallPageModules" parameterType="int">