lyhzzz 2 éve
szülő
commit
e41fb871fe

+ 9 - 0
src/main/java/com/fdkankan/manage/vo/request/OrderParam.java

@@ -1,9 +1,12 @@
 package com.fdkankan.manage.vo.request;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fdkankan.manage.vo.request.RequestBase;
 import com.fdkankan.manage.util.Dateutils;
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 @Data
 public class OrderParam extends RequestBase {
     private String orderSn;         //订单号
@@ -13,6 +16,12 @@ public class OrderParam extends RequestBase {
     private String tradeNum;        //交易号
     private String expressNum;      //快递单号
 
+    private Integer customerType;    //客户类别0直销,1经销
+    private Integer payMethod;       //充值方式0线上,1线下
+    private Integer useType;        //使用类型
+    @JsonFormat(shape = JsonFormat.Shape.STRING)
+    private BigDecimal amount;      //订单金额
+
     public String getStartTime() {
         return Dateutils.getStartTime(startTime);
     }

+ 12 - 1
src/main/resources/mapper/manage/DownloadOrderMapper.xml

@@ -9,11 +9,19 @@
         from  t_download_order o
         left join t_user u on o.user_id = u.id
         <include refid="commonWhere"></include>
+        <if test="param.customerType!=null or param.payMethod!=null or param.useType!=null">
+            o.rec_status = 'ABC'
+        </if>
         union all
         SELECT o.*,u.user_name ,'线下'as payMethod from t_download_order_mg o
         left join t_user u on o.user_id = u.id
         <include refid="commonWhere"></include>
-
+        <if test="param.customerType!=null">
+            o.customer_type = #{param.customerType}
+        </if>
+        <if test="param.useType!=null">
+            o.use_type = #{param.useType}
+        </if>
         order by create_time desc
     </select>
 
@@ -34,5 +42,8 @@
         <if test="param.endTime != null and param.endTime !='' ">
             and o.trade_time &lt;= #{param.endTime}
         </if>
+        <if test="param.amount != null">
+            and o.amount = #{param.amount}
+        </if>
     </sql>
 </mapper>

+ 12 - 1
src/main/resources/mapper/manage/IncrementOrderMapper.xml

@@ -9,11 +9,19 @@
         from  t_increment_order o
         left join t_user u on o.user_id = u.id
         <include refid="commonWhere"></include>
+        <if test="param.customerType!=null or param.payMethod!=null or param.useType!=null">
+            o.rec_status = 'ABC'
+        </if>
         union all
         SELECT o.*,u.user_name,u.nick_name ,'线下'as payMethod from t_increment_order_mg o
         left join t_user u on o.user_id = u.id
         <include refid="commonWhere"></include>
-
+        <if test="param.customerType!=null">
+            o.customer_type = #{param.customerType}
+        </if>
+        <if test="param.useType!=null">
+            o.use_type = #{param.useType}
+        </if>
         order by create_time desc
     </select>
 
@@ -34,5 +42,8 @@
         <if test="param.endTime != null and param.endTime !='' ">
             and o.trade_time &lt;= #{param.endTime}
         </if>
+        <if test="param.amount != null">
+            and o.amount = #{param.amount}
+        </if>
     </sql>
 </mapper>